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]

Re: patch for exception handlers in PIC code on ARM


On Mon, Jan 15, 2001 at 10:30:23AM +1100, Fergus Henderson wrote:
> But after looking at the code a bit, I see that __builtin_longjmp()/
> __builtin_setjmp() do, in combination, implement normal
> setjmp()/longjmp() semantics with regard to restoring the
> values of ordinary call-saved registers.

Yes, I should perhaps have been clearer about this.

> However, AFAICT all this only applies to ordinary call-saved
> registers, not to fixed registers, so I think the back-end's
> implementation of builtin_longjmp does need to restore those.

Correct.  Or rather, coordinate with builtin_setjmp_receiver
such that they are eventually restored.

> > I wouldn't think the exception_receiver part is, since dwarf2
> > does restore call-saved registers during unwinding.
> 
> Does that apply to fixed_regs?

No, as these are described to the compiler as call-clobbered.
Which is a very long-standing representational mistake, but
I've not had the guts to fix it.

Normally, however, most non-stack-related fixed registers are
call-clobbered, with the common exception being the pic register.


r~

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