summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/mips/bsd-_setjmp.S
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2006-11-04 19:50:20 +0000
committerEric Andersen <andersen@codepoet.org>2006-11-04 19:50:20 +0000
commitcb12600bc59ec9211ecb5be3083e66f7c6c6d9ef (patch)
treead8ca820494baaeaada85b9d30a702d68b461936 /libc/sysdeps/linux/mips/bsd-_setjmp.S
parent141da0f0b098b17499c6c6e02a7d2cacc1d6d3ba (diff)
mips64 patch from Atsushi Nemoto:
The mips64 N32/N64 ABI have a bit different register usage convention. Also the register size for these ABI is 8 byte. Use ld/sd for them.
Diffstat (limited to 'libc/sysdeps/linux/mips/bsd-_setjmp.S')
-rw-r--r--libc/sysdeps/linux/mips/bsd-_setjmp.S7
1 files changed, 7 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/mips/bsd-_setjmp.S b/libc/sysdeps/linux/mips/bsd-_setjmp.S
index e03c05ced..6853dea98 100644
--- a/libc/sysdeps/linux/mips/bsd-_setjmp.S
+++ b/libc/sysdeps/linux/mips/bsd-_setjmp.S
@@ -22,6 +22,7 @@
in setjmp doesn't clobber the state restored by longjmp. */
#include <sys/regdef.h>
+#include <sys/asm.h>
#ifdef __PIC__
.option pic2
@@ -35,10 +36,16 @@
_setjmp:
#ifdef __PIC__
+#if (_MIPS_SIM == _MIPS_SIM_ABI32)
.set noreorder
.cpload t9
.set reorder
la t9, __sigsetjmp
+#else
+ .cpsetup t9, v0, _setjmp
+ PTR_LA t9, __sigsetjmp
+ .cpreturn
+#endif
#endif
move a1,zero /* Pass a second argument of zero. */
#ifdef __PIC__