This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Wrong mappin of registers in location lists


On Fri, 14 Feb 2003, Andrew Haley wrote:

> 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.

How about the attached one to fix the difference?
(Note that I haven't run the GDB testsuite with this gcc yet, but the
patch seems to be reasonable, doesn't it?)

Michal Ludvig
-- 
* SuSE CR, s.r.o     * mludvig@suse.cz
* (+420) 296.545.373 * http://www.suse.cz

Attachment: gcc-dw2map.diff
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]