On Sun, Mar 4, 2012 at 11:01 PM, H.J. Lu <hjl.to...@gmail.com> wrote:
>> @@ -11388,6 +11400,11 @@ ix86_decompose_address (rtx addr, struct >> ix86_address *out) >> else >> disp = addr; /* displacement */ >> >> + /* Since address override works only on the (reg) part in fs:(reg), >> + we can't use it as memory operand. */ >> + if (Pmode != word_mode && seg == SEG_FS && (base || index)) >> + return 0; >> >> Can you explain the above some more? IMO, if the override works on >> (reg) part, this is just what we want. > > When Pmode == SImode, we have > > fs segment register == 0x1001 > > and > > base register (SImode) == -1 (0xffffffff). > > We are expecting address to be 0x1001 - 1 == 0x1000. But, what we get > is 0x1000 + 0xffffffff, not 0x1000 since 0x67 address prefix only applies to > base register to zero-extend 0xffffffff to 64bit. I would call this a bug in the specification - I guess that 0x1001(%eax) works correctly. We will treat this issue as a bug. Uros.