Module Name: src Committed By: matt Date: Fri Apr 30 14:27:46 UTC 2010
Modified Files: src/lib/libc/arch/mips/gen [matt-nb5-mips64]: longjmp.c Log Message: For N32/N64, GP is callee-saved To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.2.14.1 src/lib/libc/arch/mips/gen/longjmp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/libc/arch/mips/gen/longjmp.c diff -u src/lib/libc/arch/mips/gen/longjmp.c:1.2 src/lib/libc/arch/mips/gen/longjmp.c:1.2.14.1 --- src/lib/libc/arch/mips/gen/longjmp.c:1.2 Mon Apr 28 20:22:56 2008 +++ src/lib/libc/arch/mips/gen/longjmp.c Fri Apr 30 14:27:46 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: longjmp.c,v 1.2 2008/04/28 20:22:56 martin Exp $ */ +/* $NetBSD: longjmp.c,v 1.2.14.1 2010/04/30 14:27:46 matt Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -82,6 +82,9 @@ uc.uc_mcontext.__gregs[_REG_S6] = sc->sc_regs[_R_S6]; uc.uc_mcontext.__gregs[_REG_S7] = sc->sc_regs[_R_S7]; uc.uc_mcontext.__gregs[_REG_S8] = sc->sc_regs[_R_S8]; +#if defined(__mips_n32) || defined(__mips_n64) + uc.uc_mcontext.__gregs[_REG_GP] = sc->sc_regs[_R_GP]; +#endif uc.uc_mcontext.__gregs[_REG_SP] = sc->sc_regs[_R_SP]; uc.uc_mcontext.__gregs[_REG_RA] = sc->sc_regs[_R_RA]; uc.uc_mcontext.__gregs[_REG_EPC] = sc->sc_pc;