about summary refs log tree commit diff
path: root/src/setjmp/mips/setjmp.s
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2012-07-22 18:55:01 -0400
committerRich Felker <dalias@aerifal.cx>2012-07-22 18:55:01 -0400
commitdc046f55bbff5f79d022882723c73a6b9af0bf86 (patch)
tree5dad3839830e12534d77443868a1fc410f898c21 /src/setjmp/mips/setjmp.s
parent75fff40b9b536e0e6847d17ecc076894ca7b7068 (diff)
downloadmusl-dc046f55bbff5f79d022882723c73a6b9af0bf86.tar.gz
musl-dc046f55bbff5f79d022882723c73a6b9af0bf86.tar.xz
musl-dc046f55bbff5f79d022882723c73a6b9af0bf86.zip
add floating point register saving/restoring to mips setjmp/longjmp
also fix the alignment of jmp_buf to meet the abi. linux always
emulates fpu on mips if it's not present, so enabling this code
unconditionally is "safe" but may be slow. in the long term it may be
preferable to find a way to disable it on soft float builds.
Diffstat (limited to 'src/setjmp/mips/setjmp.s')
-rw-r--r--src/setjmp/mips/setjmp.s14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/setjmp/mips/setjmp.s b/src/setjmp/mips/setjmp.s
index 38ed5e00..1b79525f 100644
--- a/src/setjmp/mips/setjmp.s
+++ b/src/setjmp/mips/setjmp.s
@@ -21,5 +21,19 @@ setjmp:
 	sw      $23, 36($4)
 	sw      $30, 40($4)
 	sw      $28, 44($4)
+	cfc1    $8, $31
+	sw      $8,  48($4)
+	swc1    $20, 56($4)
+	swc1    $21, 60($4)
+	swc1    $22, 64($4)
+	swc1    $23, 68($4)
+	swc1    $24, 72($4)
+	swc1    $25, 76($4)
+	swc1    $26, 80($4)
+	swc1    $27, 84($4)
+	swc1    $28, 88($4)
+	swc1    $29, 92($4)
+	swc1    $30, 96($4)
+	swc1    $31, 100($4)
 	jr      $ra
 	li      $2, 0