Re: %fs and %gs segments on x86/x86-64

2015-07-13 Thread Bin.Cheng
On Thu, Jul 9, 2015 at 8:02 PM, Armin Rigo wrote: > Hi all, > > Here is an updated patch (attached) for __seg_fs and __seg_gs: > > * added a target hook "default_pointer_address_modes" to avoid > disabling a few gcc optimizations which, according to my reading of > the documentation, should contin

Re: %fs and %gs segments on x86/x86-64

2015-07-09 Thread Armin Rigo
Hi all, Here is an updated patch (attached) for __seg_fs and __seg_gs: * added a target hook "default_pointer_address_modes" to avoid disabling a few gcc optimizations which, according to my reading of the documentation, should continue to work even in the presence of multiple address spaces as l

Re: %fs and %gs segments on x86/x86-64

2015-07-04 Thread Armin Rigo
Hi Richard, On 3 July 2015 at 10:29, Richard Biener wrote: > It's nice to have the ability to test address-space issues on a > commonly available target at least (not sure if adding runtime > testcases is easy though). It should be easy to add testcases that run only on CPUs with the "fsgsbase"

Re: %fs and %gs segments on x86/x86-64

2015-07-03 Thread Jay
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 an

Re: %fs and %gs segments on x86/x86-64

2015-07-03 Thread Richard Biener
On Thu, Jul 2, 2015 at 5:57 PM, Armin Rigo 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 us

%fs and %gs segments on x86/x86-64

2015-07-02 Thread Armin Rigo
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 instruction.