This is the mail archive of the 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: RFC / RFA: dwarf2 unwinding for targets with call-part-clobbered registers

Joern Rennecke wrote:
This is not correct for machines with call-part-clobbered registers.
reg_raw_mode is a mode suitable to do caller-saves so that the register
can hold any mode over a call.

It isn't clear exactly what problem you are trying to fix here. I had to look at the call-part-clobbered stuff to even understand what you are talking about.

So the only clean way to do this is to add another parameter to
choose_hard_reg_mode that makes it return the largest mode that is not
partially clobbered.
Or should we add a new target hook instead?

I don't have complete info, but adding an option to choose_hard_reg_mode makes a little sense.

And I have some questions on the use of RETURN_ADDR_OFFSET:
This macro is not documented.  Is it save to use?  Should we add
documentation for it?

It should be safe to use. It should be documented.

gets confused by SHmedia addresses, which have the least significant bit

This is what MASK_RETURN_ADDR is for.

So instead of hard-coding _Unwind_Word, I use __UNWIND_CFA_TYPE__ and
__UNWIND_RA_TYPE__ and define them to _Unwind_Word if they are not
already defined.

Does changing Unwind_Word to Unwind_Ptr work?

In the two places where you added UNWIND_CFA_TYPE * casts, it looks like you added an extra dereference which looks wrong.

Also, in both of these places, it isn't clear why the existing Unwind_Ptr cast doesn't work.

I'm not sure where this stuff should be documented.  Or does it require no
special documentation?

Any macro that communicates info between a target port and the rest of the compiler needs to be documented.


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