Don't use lib2funcs.asm on PA
John David Anglin
dave@hiauly1.hia.nrc.ca
Mon Feb 18 10:27:00 GMT 2002
> > + if (DO_FRAME_NOTES && current_function_calls_eh_return)
> > + {
> > + rtx sa = EH_RETURN_STACKADJ_RTX;
> > + emit_insn (Pmode == SImode
> > + ? gen_addsi3 (stack_pointer_rtx, stack_pointer_rtx, sa)
> > + : gen_adddi3 (stack_pointer_rtx, stack_pointer_rtx, sa));
> > + }
> >
> > /* If we haven't restored %r2 yet (no frame pointer, and a stack
> > frame greater than 8k), do so now. */
>
> Isn't this doing the wrong thing in case a function calling
> __builtin_eh_return returns through a regular return path (as
> _Unwind_RaiseException might do) ?
I will investigate. This code appears in the rs6000 code. I think the answer
must be that sa is 0 in a normal return. In the light of day, this code
appears in the wrong place. In your code, you appear to subtract the stack
adjustment rather than add it.
> Avoiding that was the first purpose of introducing an eh_return pattern, but
> I may well be missing something.
You didn't send you epilogue and eh_return patterns. Could you?
I have integrated your frame size code into the epilogue for testing, although
it is adjusted to match what appears in hppa_expand_prologue and
compute_frame_size.
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)
More information about the Gcc-patches
mailing list