From: Eric Botcazou <ebotca...@adacore.com> Date: Sun, 22 May 2011 00:45:55 +0200
> SPARC maintainers, any objection to me eliminating this SETJMP_VIA_SAVE_AREA > kludge? This would make it possible to have a shared implementation with the > flat mode and remove specific support in a few locations. Even IA-64 does > things the canonical way here. Absolutely no objection to getting rid of the setjmp kludge. :-) The thing about the setjmp+alloca handling on sparc is that the code is simply trying to leave the originally stack frame and thus original setjmp area alone. Basically so that the JB_SP/JB_PC don't get overwritten. It would seem to me that, for example with C code, we don't need to update anything. Because any local stack allocation happening later than the setjmp() can be safely ignored since that allocated memory does not exist at the setjmp() point, thus it is safe to always longjmp to the pre-alloca()'d state. I guess when using setjmp/longjmp for exceptions the requirements increase above and beyond what is normally sufficient, and that's why you have to update the buffer?