summaryrefslogtreecommitdiff
path: root/x86/x86_emit.h
diff options
context:
space:
mode:
authorDavid Guillen Fandos2021-03-23 19:05:35 +0100
committerDavid Guillen Fandos2021-03-23 19:09:56 +0100
commit11ec213c99d5d22905ff82cf3fb26ba6a8adf290 (patch)
tree0af3ed99246d3bdb2d2b22f1420bddf2fafba507 /x86/x86_emit.h
parent7e27010a3c08811e4ed04097e1961009c3fef8d7 (diff)
downloadpicogpsp-11ec213c99d5d22905ff82cf3fb26ba6a8adf290.tar.gz
picogpsp-11ec213c99d5d22905ff82cf3fb26ba6a8adf290.tar.bz2
picogpsp-11ec213c99d5d22905ff82cf3fb26ba6a8adf290.zip
Make ewram memory lineal
This saves a few cycles in MIPS and simplifies a bit the core. Removed the write map, only affects interpreter performance very minimally. Rewired ARM and x86 handlers to support direct access to I/EWRAM (and VRAM on ARM) to compensate. Overall performance is slightly better but code is cleaner and allows for further improvements in the dynarecs.
Diffstat (limited to 'x86/x86_emit.h')
-rw-r--r--x86/x86_emit.h16
1 files changed, 3 insertions, 13 deletions
diff --git a/x86/x86_emit.h b/x86/x86_emit.h
index 67a3dc2..68930e1 100644
--- a/x86/x86_emit.h
+++ b/x86/x86_emit.h
@@ -1485,23 +1485,13 @@ u32 function_cc execute_aligned_load32(u32 address)
return read_memory32(address);
}
-void function_cc execute_aligned_store32(u32 address, u32 source)
-{
- u8 *map;
-
- if(!(address & 0xF0000000) && (map = memory_map_write[address >> 15]))
- address32(map, address & 0x7FFF) = source;
- else
- write_memory32(address, source);
-}
-
#define arm_block_memory_load() \
generate_function_call(execute_aligned_load32); \
generate_store_reg(rv, i) \
#define arm_block_memory_store() \
generate_load_reg_pc(a1, i, 8); \
- generate_function_call(execute_aligned_store32) \
+ generate_function_call(write_memory32) \
#define arm_block_memory_final_load() \
arm_block_memory_load() \
@@ -1956,7 +1946,7 @@ u32 function_cc execute_ror_imm_op(u32 value, u32 shift)
#define thumb_block_memory_extra_push_lr(base_reg) \
generate_add_reg_reg_imm(a0, s0, (bit_count[reg_list] * 4)); \
generate_load_reg(a1, REG_LR); \
- generate_function_call(execute_aligned_store32) \
+ generate_function_call(write_memory32) \
#define thumb_block_memory_load() \
generate_function_call(execute_aligned_load32); \
@@ -1964,7 +1954,7 @@ u32 function_cc execute_ror_imm_op(u32 value, u32 shift)
#define thumb_block_memory_store() \
generate_load_reg(a1, i); \
- generate_function_call(execute_aligned_store32) \
+ generate_function_call(write_memory32) \
#define thumb_block_memory_final_load() \
thumb_block_memory_load() \