diff options
author | Szabolcs Nagy <nsz@port70.net> | 2014-02-24 23:16:29 +0100 |
---|---|---|
committer | Szabolcs Nagy <nsz@port70.net> | 2014-02-24 23:16:29 +0100 |
commit | e5bb165bed7be4176914672d25ff8e286b6fba49 (patch) | |
tree | d2f682e9425d1277a9e92cc694b2590a0c22eb0c /src/setjmp | |
parent | dbed392410e333fde86c14ea17a46d1ad9c760f1 (diff) | |
download | musl-e5bb165bed7be4176914672d25ff8e286b6fba49.tar.gz musl-e5bb165bed7be4176914672d25ff8e286b6fba49.tar.xz musl-e5bb165bed7be4176914672d25ff8e286b6fba49.zip |
mips: add mips-sf subarch support (soft-float)
Userspace emulated floating-point (gcc -msoft-float) is not compatible with the default mips abi (assumes an FPU or in kernel emulation of it). Soft vs hard float abi should not be mixed, __mips_soft_float is checked in musl's configure script and there is no runtime check. The -sf subarch does not save/restore floating-point registers in setjmp/longjmp and only provides dummy fenv implementation.
Diffstat (limited to 'src/setjmp')
-rw-r--r-- | src/setjmp/mips-sf/longjmp.s | 25 | ||||
-rw-r--r-- | src/setjmp/mips-sf/longjmp.sub | 1 | ||||
-rw-r--r-- | src/setjmp/mips-sf/setjmp.s | 25 | ||||
-rw-r--r-- | src/setjmp/mips-sf/setjmp.sub | 1 |
4 files changed, 52 insertions, 0 deletions
diff --git a/src/setjmp/mips-sf/longjmp.s b/src/setjmp/mips-sf/longjmp.s new file mode 100644 index 00000000..8e769675 --- /dev/null +++ b/src/setjmp/mips-sf/longjmp.s @@ -0,0 +1,25 @@ +.set noreorder + +.global _longjmp +.global longjmp +.type _longjmp,@function +.type longjmp,@function +_longjmp: +longjmp: + move $2, $5 + bne $2, $0, 1f + nop + addu $2, $2, 1 +1: lw $ra, 0($4) + lw $sp, 4($4) + lw $16, 8($4) + lw $17, 12($4) + lw $18, 16($4) + lw $19, 20($4) + lw $20, 24($4) + lw $21, 28($4) + lw $22, 32($4) + lw $23, 36($4) + lw $30, 40($4) + jr $ra + lw $28, 44($4) diff --git a/src/setjmp/mips-sf/longjmp.sub b/src/setjmp/mips-sf/longjmp.sub new file mode 100644 index 00000000..e80331b6 --- /dev/null +++ b/src/setjmp/mips-sf/longjmp.sub @@ -0,0 +1 @@ +longjmp.s diff --git a/src/setjmp/mips-sf/setjmp.s b/src/setjmp/mips-sf/setjmp.s new file mode 100644 index 00000000..38ed5e00 --- /dev/null +++ b/src/setjmp/mips-sf/setjmp.s @@ -0,0 +1,25 @@ +.set noreorder + +.global __setjmp +.global _setjmp +.global setjmp +.type __setjmp,@function +.type _setjmp,@function +.type setjmp,@function +__setjmp: +_setjmp: +setjmp: + sw $ra, 0($4) + sw $sp, 4($4) + sw $16, 8($4) + sw $17, 12($4) + sw $18, 16($4) + sw $19, 20($4) + sw $20, 24($4) + sw $21, 28($4) + sw $22, 32($4) + sw $23, 36($4) + sw $30, 40($4) + sw $28, 44($4) + jr $ra + li $2, 0 diff --git a/src/setjmp/mips-sf/setjmp.sub b/src/setjmp/mips-sf/setjmp.sub new file mode 100644 index 00000000..b7ad2210 --- /dev/null +++ b/src/setjmp/mips-sf/setjmp.sub @@ -0,0 +1 @@ +setjmp.s |