Hi Julian,

You can check how we did it for ARC. In a nutshell, you need to define
HAVS_AS_TLS macro, you need to legitimize the new TLS address and
calls. Please have a look in arc.cc and search for TLS, also use git
blame to see the original patches. Of course, there are different ways
to implement TLS, in ARC is the simplest solution. Also, u need to
hack the assembler, linker and the OS for a full implementation.

Cheers,
Claudiu

On Tue, Jul 9, 2024 at 7:14 PM Julian Waters via Gcc <gcc@gcc.gnu.org> wrote:
>
> Hi all,
>
> I'm currently trying to implement Native TLS on a platform that gcc uses
> emutls for at the moment, but I can't seem to figure out where and how to
> implement it. I have a rough idea of the assembly required for TLS on this
> platform, but I don't know where to plug it in to the compiler to make it
> work. Could someone point me in the right direction for implementing TLS
> for a platform that doesn't have it implemented at the moment?
>
> I'm aware that I am being vague as to which platform I want to implement it
> for. It's a platform that is likely low priority in the eyes of most gcc
> maintainers, so I'm deliberately avoiding mentioning what platform it is so
> I don't get crickets for a reply :)
>
> best regards,
> Julian

Reply via email to