notaz.gp2x.de
/
pcsx_rearmed.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
drc: rearrange hacks
[pcsx_rearmed.git]
/
libpcsxcore
/
new_dynarec
/
linkage_arm.S
diff --git
a/libpcsxcore/new_dynarec/linkage_arm.S
b/libpcsxcore/new_dynarec/linkage_arm.S
index
970d91c
..
6371731
100644
(file)
--- a/
libpcsxcore/new_dynarec/linkage_arm.S
+++ b/
libpcsxcore/new_dynarec/linkage_arm.S
@@
-85,7
+85,7
@@
DRC_VAR(psxH_ptr, 4)
DRC_VAR(zeromem_ptr, 4)
DRC_VAR(invc_ptr, 4)
DRC_VAR(scratch_buf_ptr, 4)
DRC_VAR(zeromem_ptr, 4)
DRC_VAR(invc_ptr, 4)
DRC_VAR(scratch_buf_ptr, 4)
-@DRC_VAR(align1, 8) /* unused/alignment */
+DRC_VAR(ram_offset, 4)
DRC_VAR(mini_ht, 256)
DRC_VAR(restore_candidate, 512)
DRC_VAR(mini_ht, 256)
DRC_VAR(restore_candidate, 512)
@@
-661,6
+661,13
@@
FUNCTION(jump_handler_read32):
pcsx_read_mem ldrcc, 2
pcsx_read_mem ldrcc, 2
+.macro memhandler_post
+ ldr r0, [fp, #LO_next_interupt]
+ ldr r2, [fp, #LO_cycle] @ memhandlers can modify cc, like dma
+ str r0, [fp, #LO_last_count]
+ sub r0, r2, r0
+.endm
+
.macro pcsx_write_mem wrtop tab_shift
/* r0 = address, r1 = data, r2 = cycles, r3 = handler_tab */
lsl r12,r0, #20
.macro pcsx_write_mem wrtop tab_shift
/* r0 = address, r1 = data, r2 = cycles, r3 = handler_tab */
lsl r12,r0, #20
@@
-668,7
+675,7
@@
FUNCTION(jump_handler_read32):
ldr r3, [r3, r12, lsl #2]
str r0, [fp, #LO_address] @ some handlers still need it..
lsls r3, #1
ldr r3, [r3, r12, lsl #2]
str r0, [fp, #LO_address] @ some handlers still need it..
lsls r3, #1
- mov r0, r2
@ cycle return in case of direct store
+ mov r0, r2 @ cycle return in case of direct store
.if \tab_shift == 1
lsl r12, #1
\wrtop r1, [r3, r12]
.if \tab_shift == 1
lsl r12, #1
\wrtop r1, [r3, r12]
@@
-679,14
+686,13
@@
FUNCTION(jump_handler_read32):
ldr r12, [fp, #LO_last_count]
mov r0, r1
add r2, r2, r12
ldr r12, [fp, #LO_last_count]
mov r0, r1
add r2, r2, r12
- push {r2, lr}
str r2, [fp, #LO_cycle]
str r2, [fp, #LO_cycle]
+
+ str lr, [fp, #LO_saved_lr]
blx r3
blx r3
+ ldr lr, [fp, #LO_saved_lr]
- ldr r0, [fp, #LO_next_interupt]
- pop {r2, lr}
- str r0, [fp, #LO_last_count]
- sub r0, r2, r0
+ memhandler_post
bx lr
.endm
bx lr
.endm
@@
-707,14
+713,13
@@
FUNCTION(jump_handler_write_h):
str r0, [fp, #LO_address] @ some handlers still need it..
add r2, r2, r12
mov r0, r1
str r0, [fp, #LO_address] @ some handlers still need it..
add r2, r2, r12
mov r0, r1
- push {r2, lr}
str r2, [fp, #LO_cycle]
str r2, [fp, #LO_cycle]
+
+ str lr, [fp, #LO_saved_lr]
blx r3
blx r3
+ ldr lr, [fp, #LO_saved_lr]
- ldr r0, [fp, #LO_next_interupt]
- pop {r2, lr}
- str r0, [fp, #LO_last_count]
- sub r0, r2, r0
+ memhandler_post
bx lr
FUNCTION(jump_handle_swl):
bx lr
FUNCTION(jump_handle_swl):