All of lore.kernel.org
 help / color / mirror / Atom feed
* Work on adding TLS support to LLVM on m68k
@ 2023-01-28 20:33 John Paul Adrian Glaubitz
  2023-01-28 22:44 ` Chris Hanson
  2023-01-29  0:15 ` Finn Thain
  0 siblings, 2 replies; 5+ messages in thread
From: John Paul Adrian Glaubitz @ 2023-01-28 20:33 UTC (permalink / raw)
  To: linux-m68k; +Cc: Debian m68k, port-m68k

Hello!

The maintainers of the m68k backend in LLVM have started initial planning for adding
TLS support. An issue for that has been opened in the LLVM Github tracker [1].

If anyone can help shed more light on how TLS works on m68k, please add your comments
to this Github issue. Any information on the topic is highly appreciated.

Thanks,
Adrian

> [1] https://github.com/llvm/llvm-project/issues/60354

-- 
  .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
   `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Work on adding TLS support to LLVM on m68k
  2023-01-28 20:33 Work on adding TLS support to LLVM on m68k John Paul Adrian Glaubitz
@ 2023-01-28 22:44 ` Chris Hanson
  2023-01-29 10:00   ` Karoly Balogh
  2023-01-29  0:15 ` Finn Thain
  1 sibling, 1 reply; 5+ messages in thread
From: Chris Hanson @ 2023-01-28 22:44 UTC (permalink / raw)
  To: John Paul Adrian Glaubitz; +Cc: linux-m68k, Debian m68k, port-m68k

There wasn't really a TLS standard on any 68K ABIs that I know about. If the SVR4 ABI for 68K defined one then that's probably the one I'd use for LLVM's default, as most everything else should follow the SVR4 ABI for 68K by default too, right?

That said, any compiler or linker for 68K needs to support multiple ABI standards since Mac OS, Atari, Amiga, and all the different UNIX and UNIX-like operating systems had their own ABI. Fortunately LLVM itself supports the concept of multiple ABIs…

  -- Chris

> On Jan 28, 2023, at 12:33 PM, John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> wrote:
> 
> Hello!
> 
> The maintainers of the m68k backend in LLVM have started initial planning for adding
> TLS support. An issue for that has been opened in the LLVM Github tracker [1].
> 
> If anyone can help shed more light on how TLS works on m68k, please add your comments
> to this Github issue. Any information on the topic is highly appreciated.
> 
> Thanks,
> Adrian
> 
>> [1] https://github.com/llvm/llvm-project/issues/60354
> 
> -- 
> .''`.  John Paul Adrian Glaubitz
> : :' :  Debian Developer
> `. `'   Physicist
>  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Work on adding TLS support to LLVM on m68k
  2023-01-28 20:33 Work on adding TLS support to LLVM on m68k John Paul Adrian Glaubitz
  2023-01-28 22:44 ` Chris Hanson
@ 2023-01-29  0:15 ` Finn Thain
  2023-01-30 10:17   ` John Paul Adrian Glaubitz
  1 sibling, 1 reply; 5+ messages in thread
From: Finn Thain @ 2023-01-29  0:15 UTC (permalink / raw)
  To: John Paul Adrian Glaubitz; +Cc: linux-m68k, Debian m68k, port-m68k


On Sat, 28 Jan 2023, John Paul Adrian Glaubitz wrote:

> Hello!
> 
> The maintainers of the m68k backend in LLVM have started initial 
> planning for adding TLS support. An issue for that has been opened in 
> the LLVM Github tracker [1].
> 
> If anyone can help shed more light on how TLS works on m68k, please add 
> your comments to this Github issue. Any information on the topic is 
> highly appreciated.
> 
> Thanks,
> Adrian
> 
> > [1] https://github.com/llvm/llvm-project/issues/60354
> 

The developers of the TLS/NPTL support for m68k/coldfire were working for 
Freescale and Codesourcery at the time...

https://lists.debian.org/debian-68k/2008/02/msg00212.html
https://lists.debian.org/debian-68k/2007/11/msg00071.html

The toolchain mailing lists at sourceware.org might be a good place to 
seek technical information about the implementation. Or you could try 
sending a question to the old e-mail addresses of the people who sent the 
patches e.g.

https://git.kernel.org/torvalds/c/9674cdc74d63

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Work on adding TLS support to LLVM on m68k
  2023-01-28 22:44 ` Chris Hanson
@ 2023-01-29 10:00   ` Karoly Balogh
  0 siblings, 0 replies; 5+ messages in thread
From: Karoly Balogh @ 2023-01-29 10:00 UTC (permalink / raw)
  To: Chris Hanson
  Cc: John Paul Adrian Glaubitz, linux-m68k, Debian m68k, port-m68k

[-- Attachment #1: Type: TEXT/PLAIN, Size: 951 bytes --]

Hi,

On Sat, 28 Jan 2023, Chris Hanson wrote:

> That said, any compiler or linker for 68K needs to support multiple ABI
> standards since Mac OS, Atari, Amiga, and all the different UNIX and
> UNIX-like operating systems had their own ABI. Fortunately LLVM itself
> supports the concept of multiple ABIs…

Indeed, but the systems you mention A., use a mixure of ABIs, I mean one
system with many ABIs, even if there are some "basic assumptions" about
volatile/nonvolatile registers and so on, but otherwise "you're on your
own", and B., neither of these have "threads" as such, let alone anything
that resembles the concept of a Thread Local Storage in the modern sense.

Point is: it's safe to start on Linux/NetBSD, because there the OS at
least knows about these as a concept, so there's some framework for it to
follow as guard rails. Elsewhere - prepare for a lot of faking, and
hacking, and cheating. :)

(Ask me where I know... ;) )

Charlie

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Work on adding TLS support to LLVM on m68k
  2023-01-29  0:15 ` Finn Thain
@ 2023-01-30 10:17   ` John Paul Adrian Glaubitz
  0 siblings, 0 replies; 5+ messages in thread
From: John Paul Adrian Glaubitz @ 2023-01-30 10:17 UTC (permalink / raw)
  To: Finn Thain; +Cc: linux-m68k, Debian m68k, port-m68k

Hi Finn!

On 1/29/23 01:15, Finn Thain wrote:
> The developers of the TLS/NPTL support for m68k/coldfire were working for
> Freescale and Codesourcery at the time...
> 
> https://lists.debian.org/debian-68k/2008/02/msg00212.html
> https://lists.debian.org/debian-68k/2007/11/msg00071.html

Thanks, these links are very useful, especially the one describing the ABI.

I have copied the ABI description into the Github issue, crediting the source:

> https://github.com/llvm/llvm-project/issues/60354

> The toolchain mailing lists at sourceware.org might be a good place to
> seek technical information about the implementation. Or you could try
> sending a question to the old e-mail addresses of the people who sent the
> patches e.g.
> 
> https://git.kernel.org/torvalds/c/9674cdc74d63

I have sent an email to both Joseph and Maxim, but I haven't got any reply yet.

Adrian

-- 
  .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
   `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-01-30 10:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-28 20:33 Work on adding TLS support to LLVM on m68k John Paul Adrian Glaubitz
2023-01-28 22:44 ` Chris Hanson
2023-01-29 10:00   ` Karoly Balogh
2023-01-29  0:15 ` Finn Thain
2023-01-30 10:17   ` John Paul Adrian Glaubitz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.