Using GS for TLS on x86-64 for target RDOS
Leif Ekblad
leif@rdos.net
Tue May 14 16:45:00 GMT 2013
I've made a patch along these lines (enclosed).
Change log:
* gcc/config/i386/i386.c: Use DEFAULT_TLS_SEG_REG to access TLS
* gcc/config/i386/i386.h: Define default segment register for TLS
* gcc/config/i386/rdos.h: Added TLS configuration for RDOS
Regards,
Leif Ekblad
----- Original Message -----
From: "Uros Bizjak" <ubizjak@gmail.com>
To: "Michael Matz" <matz@suse.de>
Cc: <gcc-patches@gcc.gnu.org>; "Leif Ekblad" <leif@rdos.net>
Sent: Tuesday, May 14, 2013 11:35 AM
Subject: Re: Using GS for TLS on x86-64 for target RDOS
> On Tue, May 14, 2013 at 11:13 AM, Michael Matz <matz@suse.de> wrote:
>
>> On Tue, 14 May 2013, Uros Bizjak wrote:
>>
>>> I'd propose to introduce:
>>>
>>> a) #define DEFAULT_TLS_SEG_REG in i386.h to SEG_GS
>>>
>>> b) #undef and #define DEFAULT_TLS_SEG_REG in x86-64.h to SEG_FS
>>
>> This would break -m32.
>
> Uh, yes.
>
> So instead of a) and b), there should be:
>
> #define DEFAULT_TLS_SEG_REG TARGET_64BIT ? SEG_FS : SEG_GS in i386.h.
>
> Uros.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcc-tls.diff
Type: application/octet-stream
Size: 3123 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20130514/017ed1c9/attachment.obj>
More information about the Gcc-patches
mailing list