[PATCH/RFA] Allow register other than SP for DWARF2 CFA

Richard Henderson rth@redhat.com
Tue Jun 18 00:49:00 GMT 2002


On Mon, Jun 17, 2002 at 10:25:39PM -0700, Jason R Thorpe wrote:
> 	- for each reg in the saveregmask, push reg (counting
> 	  downward, e.g. r11, then r10, then r5, etc. so the
> 	  lowest register saved appears at the lowest address
> 	  on the stack)
> 	- push PC
> 	- push FP
> 	- push AP
> 	- push saveregmask + psl + other stuff as a longword

Ug.  Ok, lemme say first that dwarf2 is a bad fit for this
model.  It expects that the set of saved registers is under
the control of the callee, not the caller.

The only way you're going to be able to make this work is
to define a magic opcode that does everything.  It would be
possible to make the opcode just describe the bits that are
currently impossible (the saveregmask), but what's the point?
The rest of the frame description, while possible, would be
fairly verbose.  Might as well save space and have the
opcode "describe" the entire frame layout.

We did something similar for Sparc register frames.  :-/


r~



More information about the Gcc-patches mailing list