Module Name: src Committed By: riz Date: Thu Mar 14 22:37:24 UTC 2013
Modified Files: src/lib/libc/arch/alpha/gen [netbsd-6-0]: __longjmp14.c __setjmp14.S Log Message: Pull up following revision(s) (requested by martin in ticket #846): lib/libc/arch/alpha/gen/__setjmp14.S: revision 1.6 lib/libc/arch/alpha/gen/__longjmp14.c: revision 1.6 lib/libc/arch/alpha/gen/__longjmp14.c: revision 1.7 Save the GP register value and restore it on longjmp. While formally GP is not a callee-saved register, for static linking the link time optimization described in section 3.2.3 of the "Calling Standard for Alpha Systems" allows the caller to rely on GP being the value needed within setjmp() - and not restore it after return if setjmp and the call site share a GP value. This fixes longjmp/setjmp for statically linked programs, e.g. /rescue/csh or the static tcsh variant from pkgsrc. Remove clearing of ucontext_t, the only random register values now are argument and scratch registers (which will be reloaded after return anyway). To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.5.30.1 src/lib/libc/arch/alpha/gen/__longjmp14.c cvs rdiff -u -r1.5 -r1.5.10.1 src/lib/libc/arch/alpha/gen/__setjmp14.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.