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]

[dwarf2cfi] Cleanup interpretation of cfa.reg


Sometimes we compare cfa.reg with REGNO, and sometimes with
something that has been passed through DWARF_FRAME_REGNUM.
This leads to all sorts of confusion.

I think that ideally we'd leave dw_cfa_location.reg in the
GCC regno space, because that's convenient for the majority
of the code that interprets rtl and turns it into CFIs.

However, we have no inverse of DWARF_FRAME_REGNUM, which
means that lookup_cfa_1 cannot read CFI data in dwarf2
regno space and produce an output in GCC regno space.

Therefore, I've audited all uses of dw_cfa_location.reg
to ensure that all references are in dwarf2 regno space.

It would have been nice to be able to use C++ classes to
be able to do this checking in perpetuity, but the equivalent
struct wrapping in C would have made the source to ugly.

Tested on x86_64-linux.  Committed.


r~

Attachment: z
Description: Text document


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