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


> >Given that the pic register is call-saved, why isn't it automatically 
> >restored from the frame (DWARF) or the jump buf (SJLJ)?
> 
> The original report I had involved SJLJ.  I can't see anything in 
> builtin_setjmp that would make it store all call-saved registers - where's 
> that supposed to happen?

If we are even using builtin_setjmp (and I don't think that we are, since 
I don't recall adding anything to support it, though it may be automatic) 
then unless it saves all the call-saved registers, it isn't implementing 
setjmp semantics.  After all, setjmp/longjmp are supposed to save/restore 
all call-saved registers before returning control to the setjmp caller.

If using the standard setjmp/longjmp functions, then they should do the 
work, and must restore the call-saved registers.

R.

I'll try and find time to look into what we do for setjmp/longjmp.




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