[cfe-dev] linux/i386 and mregparm

pageexec at freemail.hu pageexec at freemail.hu
Tue Mar 1 15:44:18 PST 2011


On 2 Mar 2011 at 3:19, Anton Korobeynikov wrote:

> > if you want to follow the ABI then it's not correct to exclude all
> > of them.
> As you cited the ABI document by yourself:
> "The range offsets for sign extended reference changes to 0 to
>   2^31 + 2^24 or 0x00000000 to 0x81000000."
> 
> No negative offsets here, sorry.

0x80000000-0x81000000 is negative when treated as a 32 bit signed
value and isOffsetSuitableForCodeModel checks for >0 only. this is
clear from the language used for the small code model as well:

    This allows the compiler to encode symbolic references with offsets in
    the range from -(2^31) to 2^24 or from 0x80000000 to 0x01000000 directly
    in the sign extended immediate operands,

if 0x80000000 was supposed to be treated as an unsigned value there
then the current check against <16MB would be wrong too.




More information about the cfe-dev mailing list