sign-extending smaller modes

DJ Delorie dj@delorie.com
Tue Aug 8 12:33:00 GMT 2000


> What was the failure mode?

Something like this:

On a CPU with 64-bit integers but a 32-bit address space, a C
construct like "char *p = v - 2;" would result in a 32-bit version of
"-2" being created, then manipulated in 64-bit mode, and emitted in
the assembler as "v + 4294967294", then the assembler would do the
math in 64-bit mode and determine that the relocation exceeds the
32-bit range, and error.


More information about the Gcc-patches mailing list