This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: pb with frame notes from hppa_expand_prologue ?
law@redhat.com writes:
> I believe you need to set FRAME_RELATED_P on the sub expressions within
> the PARALLEL. Something like this:
>
> /* Set RTX_FRAME_RELATED_P on the insn and each member of the
> PARALLEL for the dwarf2 unwinder. */
> RTX_FRAME_RELATED_P (insn) = 1;
> for (i = 0; i < XVECLEN (PATTERN (insn), 0); i++)
> RTX_FRAME_RELATED_P (XVECEXP (PATTERN (insn), 0, i)) = 1;
>
> Where INSN is the value returned by emit_insn (gen_post_store ...))
This is actually what I went on with, thanks :)
I hit a couple of other problems later, and an interesting one had to do with
the way floating point registers are saved, using scratch r1 as a temporary
base register :
/* First get the frame or stack pointer to the start of the FP register
save area. */
if (frame_pointer_needed)
FRP (set_reg_plus_d (1, FRAME_POINTER_REGNUM, offset));
else
FRP (set_reg_plus_d (1, STACK_POINTER_REGNUM, offset));
A side effect of this is to make r1 the new base register for CFA
computation, which does not seem to work because r1 is caller-saved and its
value is not available when unwinding the stack at run-time.
I temporarily kludged this by modifying rule 4 in dwarf2out_frame_debug_expr
for the cases in which reg1 is caller-saved, but I think that's not the right
way to go.
Any insight as to what should be done for this case ?
Thanks for your help,
Olivier