This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Wrong mappin of registers in location lists
Michal Ludvig writes:
> 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?)
You'll break GDB and Lord knows what else.
MD_FALLBACK_FRAME_STATE_FOR too. I think this change, because it
breaks the ABI, should only be made at a major revision. I suppose
Linux releases will be using gcc 3.2.
Isn't it better to fix the docs?
Andrew.