Re: [PATCH RFC 3/6] Use %gs as the PDA base-segment in the kernel.

Jan Beulich
2006-08-28T09:50:31Z

>>> Andi Kleen <ak@suse.de> 27.08.06 20:19 >>>
>On Sunday 27 August 2006 19:20, Jeremy Fitzhardinge wrote:
>> Andi Kleen wrote:
>> >> +1: movw GS(%esp), %gs
>> >>
>> >
>> > movl is recommended in 32bit mode
>> >
>>
>> arch/i386/kernel/entry.S: Assembler messages:
>> arch/i386/kernel/entry.S:334: Error: suffix or operands invalid for `mov'
>
>Looks like a gas bug to me.

This was an intentional change (by H.J. if I recall right) as using movl
with segment registers gives the incorrect impression that one gets a
32-bit memory access (especially for stores this is important, since
there's really nothing stored to the upper 16 bits). One should always
use suffix-less 'mov' for segment register accesses.

Jan