This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: %fs and %gs segments on x86/x86-64
- From: Jay <jay dot krell at cornell dot edu>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: Armin Rigo <arigo at tunes dot org>, GCC Development <gcc at gcc dot gnu dot org>
- Date: Fri, 3 Jul 2015 11:34:47 -0700
- Subject: Re: %fs and %gs segments on x86/x86-64
- Authentication-results: sourceware.org; auth=none
- References: <CAFiYyc2X-bq2YRj5F-=YkR-UfO14cBgYN9qftd3xSt-z+zBUiA at mail dot gmail dot com>
FYI similarly, fs: is special on NT/x86 & gs: is special on NT/amd64.
In both cases they point to "mostly private builtin" thread locals and from there "publically extensible" thread locals -- TlsGetValue & __declspec(thread) are accessed, & x86 exception handling frame chain, which is just another builtin thread local.
(fs: retains the same meaning for NT/x86-on-ia64-or-amd64 as on native NT/x86.)
- Jay
On Jul 3, 2015, at 1:29 AM, Richard Biener <richard.guenther@gmail.com> wrote:
> On Thu, Jul 2, 2015 at 5:57 PM, Armin Rigo <arigo@tunes.org> wrote:
>> Hi all,
>>
>> I implemented support for %fs and %gs segment prefixes on the x86 and
>> x86-64 platforms, in what turns out to be a small patch.
>>
>> For those not familiar with it, at least on x86-64, %fs and %gs are
>> two special registers that a user program can ask be added to any
>> address machine ...