diff options
author | notaz | 2010-12-05 17:00:51 +0200 |
---|---|---|
committer | notaz | 2010-12-05 17:00:51 +0200 |
commit | 67ba0fb4fa3f120c4156ca7d6155c51b7623e84f (patch) | |
tree | 3ccfcd83b6c04f61cac173a3cfc0057c5e5c33ff /libpcsxcore/new_dynarec | |
parent | b9b61529b6c9bf30a3146178e2dda31b15ff3614 (diff) | |
download | pcsx_rearmed-67ba0fb4fa3f120c4156ca7d6155c51b7623e84f.tar.gz pcsx_rearmed-67ba0fb4fa3f120c4156ca7d6155c51b7623e84f.tar.bz2 pcsx_rearmed-67ba0fb4fa3f120c4156ca7d6155c51b7623e84f.zip |
drc: use direct hle calls
Diffstat (limited to 'libpcsxcore/new_dynarec')
-rw-r--r-- | libpcsxcore/new_dynarec/emu_if.c | 2 | ||||
-rw-r--r-- | libpcsxcore/new_dynarec/emu_if.h | 2 | ||||
-rw-r--r-- | libpcsxcore/new_dynarec/linkage_arm.s | 14 | ||||
-rw-r--r-- | libpcsxcore/new_dynarec/new_dynarec.c | 4 |
4 files changed, 7 insertions, 15 deletions
diff --git a/libpcsxcore/new_dynarec/emu_if.c b/libpcsxcore/new_dynarec/emu_if.c index cd44726..d9d753d 100644 --- a/libpcsxcore/new_dynarec/emu_if.c +++ b/libpcsxcore/new_dynarec/emu_if.c @@ -123,7 +123,6 @@ static int ari64_init() if (psxCP2[i] != psxNULL) gte_handlers[i] = psxCP2[i]; - psxHLEt_addr = (void *)psxHLEt; // FIXME: rm return 0; } @@ -187,7 +186,6 @@ unsigned short hword; unsigned char byte; int pending_exception; unsigned int next_interupt; -void *psxHLEt_addr; void new_dynarec_init() {} int new_dyna_start() {} void new_dynarec_cleanup() {} diff --git a/libpcsxcore/new_dynarec/emu_if.h b/libpcsxcore/new_dynarec/emu_if.h index 700182a..e93fabd 100644 --- a/libpcsxcore/new_dynarec/emu_if.h +++ b/libpcsxcore/new_dynarec/emu_if.h @@ -54,4 +54,4 @@ void MTC0_(); #define MTC0 MTC0_ /* don't call interpreter with wrong args */ /* misc */ -extern void *psxHLEt_addr; +extern void (*psxHLEt[])(); diff --git a/libpcsxcore/new_dynarec/linkage_arm.s b/libpcsxcore/new_dynarec/linkage_arm.s index aeb8baa..5451110 100644 --- a/libpcsxcore/new_dynarec/linkage_arm.s +++ b/libpcsxcore/new_dynarec/linkage_arm.s @@ -60,7 +60,6 @@ rdram = 0x80000000 .global memory_map /* psx */ .global psxRegs - .global psxHLEt_addr .bss .align 4 @@ -151,13 +150,10 @@ intCycle = interrupt + 4 .size intCycle, 128 psxRegs_end = intCycle + 128 -psxHLEt_addr = psxRegs_end - .type psxHLEt_addr, %object - .size psxHLEt_addr, 4 -align0 = psxHLEt_addr + 4 /* just for alignment */ +align0 = psxRegs_end /* just for alignment */ .type align0, %object - .size align0, 4 -branch_target = align0 + 4 + .size align0, 8 +branch_target = align0 + 8 .type branch_target, %object .size branch_target, 4 mini_ht = branch_target + 4 @@ -676,12 +672,10 @@ pcsx_return: jump_hlecall: ldr r2, [fp, #last_count-dynarec_local] str r0, [fp, #pcaddr-dynarec_local] - and r1, r1, #7 add r2, r2, r10 - ldr r3, [fp, #psxHLEt_addr-dynarec_local] /* psxHLEt */ str r2, [fp, #cycle-dynarec_local] /* PCSX cycle counter */ adr lr, pcsx_return - ldr pc, [r3, r1, lsl #2] @ FIXME + bx r1 .size jump_hlecall, .-jump_hlecall new_dyna_leave: diff --git a/libpcsxcore/new_dynarec/new_dynarec.c b/libpcsxcore/new_dynarec/new_dynarec.c index 62250d9..55e5ec9 100644 --- a/libpcsxcore/new_dynarec/new_dynarec.c +++ b/libpcsxcore/new_dynarec/new_dynarec.c @@ -3708,9 +3708,9 @@ void hlecall_assemble(int i,struct regstat *i_regs) assert(ccreg==HOST_CCREG); assert(!is_delayslot); emit_movimm(start+i*4+4,0); // Get PC - emit_movimm(source[i],1); // opcode + emit_movimm((int)psxHLEt[source[i]&7],1); emit_addimm(HOST_CCREG,CLOCK_DIVIDER*ccadj[i],HOST_CCREG); // XXX - emit_jmp((int)jump_hlecall); // XXX + emit_jmp((int)jump_hlecall); } void ds_assemble(int i,struct regstat *i_regs) |