summaryrefslogtreecommitdiff
path: root/psp/mips_stub.S
diff options
context:
space:
mode:
authorbmaupin2019-10-03 13:24:32 -0400
committerbmaupin2019-10-20 14:58:51 -0400
commita60de42f3a7fba8e22d5b2a602a035c68ea4223c (patch)
treecc0ddb321febbce3925d404b7340da7704dfe582 /psp/mips_stub.S
parent89e55e9902195a59d1404250b05b3eca7aba1142 (diff)
downloadpicogpsp-a60de42f3a7fba8e22d5b2a602a035c68ea4223c.tar.gz
picogpsp-a60de42f3a7fba8e22d5b2a602a035c68ea4223c.tar.bz2
picogpsp-a60de42f3a7fba8e22d5b2a602a035c68ea4223c.zip
Get dynarec working again for PSP
Diffstat (limited to 'psp/mips_stub.S')
-rw-r--r--psp/mips_stub.S14
1 files changed, 10 insertions, 4 deletions
diff --git a/psp/mips_stub.S b/psp/mips_stub.S
index aaef70b..dd91ea8 100644
--- a/psp/mips_stub.S
+++ b/psp/mips_stub.S
@@ -3343,8 +3343,13 @@ ror_zero_shift:
execute_arm_translate:
addu $17, $4, $0 # load cycle counter register
- lui $16, %hi(reg) # load base register
- addiu $16, %lo(reg)
+
+ lui $4, %hi(arm_reg) # load arm_reg address into $4
+ addiu $4, %lo(arm_reg)
+
+ jal move_reg # update reg to point to arm_reg
+ addu $16, $4, $0 # copy address of arm_reg into $16
+
extract_flags # load flag variables
and $1, $1, 0x20 # see if Thumb bit is set in flags
@@ -3405,9 +3410,10 @@ iac_loop:
memory_map_read:
.space 0x8000
-reg:
+# This must be between memory_map_read and memory_map_write because it's used
+# to calculate their addresses elsewhere in this file.
+arm_reg:
.space 0x100
memory_map_write:
.space 0x8000
-