This is the mail archive of the gcc-patches@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: [RFA] dwarf2out.c: Don't emit DW_OP_regx for register -1


On Mar 7,  9:27am, cgd at broadcom dot com wrote:

> this shows up with a set of mips64-linux tools, using the "-O3
> -mips64" flag.  (-mips64 enables use of the "madd" instruction.)
> 
> in te2.cpp, when optimizing (and using madd), i'd expect that 'a9'
> will live entirely in "LO", from the time that is initialized until
> its last use.

It seems clear that the "right thing to do" is to make sure that 'hi'
and 'lo' have DWARF register numbers associated with them.  (gcc will
currently output -1 for them.)  But, what should these numbers be?
I've been searching for much of the day, but have not come up with an
answer yet.

The DWARF 3 (draft) specification says:

    Note that the register number represents a DWARF specific mapping
    of numbers onto the actual registers of a given architecture.  The
    mapping should be chosen to gain optimal density and should be
    shared by all users of a given architecture.  It is recommended
    that this mapping be defined by the ABI authoring committee for
    each architecture.

I have consulted the MIPS supplement for the System V ABI, but have
not found _any_ information about the mappings between registers and
the numbers used to represent them in debugging info.  In the past,
when I've looked at the ABI info for Irix, I don't remember seeing any
such thing either.

Does anyone know if this kind of thing is documented anywhere?  (And, if
so, where?)

If we're free to choose some numbers for 'hi' and 'lo', what should they
be?

Kevin


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