commit 2f58dad429aa64c72bd3fa31e2c7fb1eb5bd6403
parent 92e25da73a35af0a2bb71ee3a26b10ee57e32cd1
Author: Christian Ermann <christianermann@gmail.com>
Date: Thu, 5 Dec 2024 23:04:31 -0800
Remove 'ip' definition, change 'rsp' to 's1'
Diffstat:
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/src/forth.s b/src/forth.s
@@ -5,9 +5,8 @@
#define w a0
#define x a1
#define y a2
-#define ip s1
#define psp sp
-#define rsp s2
+#define rsp s1
#define cell 4
#define dcell 8
@@ -1483,19 +1482,19 @@ defword "docon,", docon_comma, 0x76DCA1A4
defword "docol,", docol_comma, 0xFAE1EE9E
push w
- li w, 0xFE192E23 # sw ra, -4(s2)
+ li w, 0xFE14AE23 # sw ra, -4(s1)
jal compile_comma
push w
- li w, 0xFFC90913 # addi s2, s2, -4
+ li w, 0xFFC48493 # addi s1, s1, -4
jal compile_comma
exit
defword "exit,", exit_comma, 0xD540F80B
push w
- li w, 0x00092083 # lw ra, 0(s2)
+ li w, 0x0004A083 # lw ra, 0(s1)
jal compile_comma
push w
- li w, 0x00490913 # addi s2, s2, 4
+ li w, 0x00448493 # addi s1, s1, 4
jal compile_comma
push w
li w, 0x00008067 # ret
@@ -1783,14 +1782,13 @@ start:
csrw mtvec, w
la w, __exec_start
- li x, 0xFE192E23 # sw ra, -4(s2)
- li y, 0xFFC90913 # addi s2, s2, -4
+ li x, 0xFE14AE23 # sw ra, -4(s1)
+ li y, 0xFFC48493 # addi s1, s1, -4
sw x, 0(w)
sw y, cell(w)
la psp, __stacktop
la rsp, __stacktop_ret
- la ip, program
li w, 0xDEADC0DE
push_addr version_string