Wrong mappin of registers in location lists

Andreas Jaeger aj@suse.de
Fri Feb 14 18:07:00 GMT 2003


Andrew Haley <aph@redhat.com> writes:

> Daniel Berlin writes:
>  > 
>  > 
>  > >
>  > > And of course with 64-bit registers:
>  > >
>  > > #define ADDITIONAL_REGISTER_NAMES \
>  > > { { "eax", 0 }, { "edx", 1 }, { "ecx", 2 }, { "ebx", 3 },       \
>  > >   { "esi", 4 }, { "edi", 5 }, { "ebp", 6 }, { "esp", 7 },       \
>  > >   { "rax", 0 }, { "rdx", 1 }, { "rcx", 2 }, { "rbx", 3 },       \
>  > >   { "rsi", 4 }, { "rdi", 5 }, { "rbp", 6 }, { "rsp", 7 },       \
>  > >   { "al", 0 }, { "dl", 1 }, { "cl", 2 }, { "bl", 3 },           \
>  > >   { "ah", 0 }, { "dh", 1 }, { "ch", 2 }, { "bh", 3 },           \
>  > >   { "mm0", 8},  { "mm1", 9},  { "mm2", 10}, { "mm3", 11},       \
>  > >   { "mm4", 12}, { "mm5", 13}, { "mm6", 14}, { "mm7", 15} }
>  > >
>  > > I do not know whether the numbering is wrong or not.
>  > 
>  > However, we do know that the loclist is right, given this information.
>  > 
>  > The numbering says rbx == DW_OP_reg3, which is what we output.
>
> It does, but that's not what Draft 0.21 ABI says.  See Section 3.6.2.

That's a problem.

> Maybe the ABI doc is wrong.

The ABI should be ok, we changed it especially at some point to
reflect GCC usage so I'm surpised to see this.  Perhaps GCC is
inconsistent here or some broken patch went in ;-).



Andreas
-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj



More information about the Gcc mailing list