diff options
author | Rich Felker <dalias@aerifal.cx> | 2012-07-11 04:22:13 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2012-07-11 04:22:13 -0400 |
commit | 6315004f6102dca44c4ba50654a36967b8b9c2a6 (patch) | |
tree | 7b48d4ac93ecb9993ffc2d01c8762a4e954d4000 /src/setjmp | |
parent | cd8d72451662f0157d06fcf666669db543dcea3b (diff) | |
download | musl-6315004f6102dca44c4ba50654a36967b8b9c2a6.tar.gz musl-6315004f6102dca44c4ba50654a36967b8b9c2a6.tar.xz musl-6315004f6102dca44c4ba50654a36967b8b9c2a6.zip |
initial version of mips (o32) port, based on work by Richard Pennington (rdp)
basically, this version of the code was obtained by starting with rdp's work from his ellcc source tree, adapting it to musl's build system and coding style, auditing the bits headers for discrepencies with kernel definitions or glibc/LSB ABI or large file issues, fixing up incompatibility with the old binutils from aboriginal linux, and adding some new special cases to deal with the oddities of sigaction and pipe syscall interfaces on mips. at present, minimal test programs work, but some interfaces are broken or missing. threaded programs probably will not link.
Diffstat (limited to 'src/setjmp')
-rw-r--r-- | src/setjmp/mips/longjmp.s | 25 | ||||
-rw-r--r-- | src/setjmp/mips/setjmp.s | 25 |
2 files changed, 50 insertions, 0 deletions
diff --git a/src/setjmp/mips/longjmp.s b/src/setjmp/mips/longjmp.s new file mode 100644 index 00000000..9cf6f8d0 --- /dev/null +++ b/src/setjmp/mips/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/setjmp.s b/src/setjmp/mips/setjmp.s new file mode 100644 index 00000000..38ed5e00 --- /dev/null +++ b/src/setjmp/mips/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 |