summaryrefslogtreecommitdiff
path: root/lib/libc/arch/mips64/gen/sigsetjmp.S
diff options
context:
space:
mode:
authorPer Fogelstrom <pefo@cvs.openbsd.org>2004-09-09 16:14:03 +0000
committerPer Fogelstrom <pefo@cvs.openbsd.org>2004-09-09 16:14:03 +0000
commit9d35151f4ec58d4d86848410b2a70b9f30be6fa7 (patch)
tree7a3a63f0d002c7dd406ba2a841acb714d6625ab5 /lib/libc/arch/mips64/gen/sigsetjmp.S
parent34d1935100f3f97e534b8e4c51693284fc8a3409 (diff)
mips64 is now going ABI64 and shared library support!
String functions need some optimization/rewrite to take full advantage.
Diffstat (limited to 'lib/libc/arch/mips64/gen/sigsetjmp.S')
-rw-r--r--lib/libc/arch/mips64/gen/sigsetjmp.S24
1 files changed, 20 insertions, 4 deletions
diff --git a/lib/libc/arch/mips64/gen/sigsetjmp.S b/lib/libc/arch/mips64/gen/sigsetjmp.S
index 06a842e89f8..c08612c57f6 100644
--- a/lib/libc/arch/mips64/gen/sigsetjmp.S
+++ b/lib/libc/arch/mips64/gen/sigsetjmp.S
@@ -36,30 +36,46 @@
#if defined(LIBC_SCCS)
.text
- .asciz "$OpenBSD: sigsetjmp.S,v 1.2 2004/09/07 13:48:26 pefo Exp $"
+ .asciz "$OpenBSD: sigsetjmp.S,v 1.3 2004/09/09 16:14:02 pefo Exp $"
#endif /* LIBC_SCCS */
/*
* trampolines for sigsetjmp and siglongjmp save and restore mask.
*
*/
-LEAF(sigsetjmp)
+FRAMESZ= MKFSIZ(1,1)
+GPOFF= FRAMESZ-2*REGSZ
+
+LEAF(sigsetjmp, FRAMESZ)
+ PTR_SUBU sp, FRAMESZ
+ SETUP_GP64(GPOFF, sigsetjmp)
.set reorder
REG_S a1, (_JBLEN*REGSZ)(a0) # save "savemask"
bne a1, 0x0, 1f # do saving of signal mask?
LA t9, _setjmp
+ RESTORE_GP64
+ PTR_ADDU sp, FRAMESZ
jr t9
1: LA t9, setjmp
+ RESTORE_GP64
+ PTR_ADDU sp, FRAMESZ
jr t9
END(sigsetjmp)
-LEAF(siglongjmp)
+LEAF(siglongjmp, FRAMESZ)
+ PTR_SUBU sp, FRAMESZ
+ SETUP_GP64(GPOFF, siglongjmp)
.set reorder
REG_L t0, (_JBLEN*REGSZ)(a0) # get "savemask"
bne t0, 0x0, 1f # restore signal mask?
LA t9, _longjmp
+ RESTORE_GP64
+ PTR_ADDU sp, FRAMESZ
jr t9
-1: LA t9, longjmp
+1:
+ RESTORE_GP64
+ PTR_ADDU sp, FRAMESZ
+ LA t9, longjmp
jr t9
END(siglongjmp)