summaryrefslogtreecommitdiffstats
path: root/jmp.S
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2020-06-19 02:17:32 +0200
committerKaz Kylheku <kaz@kylheku.com>2020-06-19 02:17:32 +0200
commit1d7fae3c4b23c7ddcb15a66fd6c4c72eff7c9168 (patch)
tree5afad6c45e1e10f3d382bff0fc989a21d91a9466 /jmp.S
parent03db12abdf39b9c26ae28b28faaea933eb36aa2e (diff)
downloadtxr-1d7fae3c4b23c7ddcb15a66fd6c4c72eff7c9168.tar.gz
txr-1d7fae3c4b23c7ddcb15a66fd6c4c72eff7c9168.tar.bz2
txr-1d7fae3c4b23c7ddcb15a66fd6c4c72eff7c9168.zip
First cut at MIPS port.
* jmp.S (jmp_save, jmp_restore): Implement for 32 bit MIPS. * unwind.h (struct jmp): 32 bit MIPS definition added.
Diffstat (limited to 'jmp.S')
-rw-r--r--jmp.S34
1 files changed, 34 insertions, 0 deletions
diff --git a/jmp.S b/jmp.S
index 994b09bd..80841e63 100644
--- a/jmp.S
+++ b/jmp.S
@@ -329,6 +329,40 @@ DEFUN(jmp_restore)
mov w0, w1
br x30
+#elif _MIPS_SZPTR == 32
+
+DEFUN(jmp_save)
+ sw $16, 0($4)
+ sw $17, 4($4)
+ sw $18, 8($4)
+ sw $19, 12($4)
+ sw $20, 16($4)
+ sw $21, 20($4)
+ sw $22, 24($4)
+ sw $23, 28($4)
+ sw $28, 32($4)
+ sw $29, 36($4)
+ sw $30, 40($4)
+ sw $ra, 44($4)
+ jr $ra
+ li $2, 0
+
+DEFUN(jmp_restore)
+ lw $16, 0($4)
+ lw $17, 4($4)
+ lw $18, 8($4)
+ lw $19, 12($4)
+ lw $20, 16($4)
+ lw $21, 20($4)
+ lw $22, 24($4)
+ lw $23, 28($4)
+ lw $28, 32($4)
+ lw $29, 36($4)
+ lw $ra, 44($4)
+ lw $30, 40($4)
+ jr $ra
+ move $2, $5
+
#else
#error port me!
#endif