From 009faf24e665b66283558234920faab03b781d6c Mon Sep 17 00:00:00 2001 From: notaz Date: Sat, 26 Feb 2011 23:56:06 +0200 Subject: [PATCH] gte_neon: hook into recompiler --- libpcsxcore/new_dynarec/assem_arm.c | 7 ++++--- libpcsxcore/new_dynarec/emu_if.c | 10 ++++++++-- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/libpcsxcore/new_dynarec/assem_arm.c b/libpcsxcore/new_dynarec/assem_arm.c index eed584ee..95304103 100644 --- a/libpcsxcore/new_dynarec/assem_arm.c +++ b/libpcsxcore/new_dynarec/assem_arm.c @@ -3757,10 +3757,11 @@ void c2op_assemble(int i,struct regstat *i_regs) if (gte_handlers[c2op]!=NULL) { int cc=get_reg(i_regs->regmap,CCREG); - emit_movimm(source[i],temp); // opcode + emit_movimm(source[i],1); // opcode if (cc>=0&>e_cycletab[c2op]) - emit_addimm(cc,gte_cycletab[c2op]/2,cc); // XXX: cound just adjust ccadj? - emit_writeword(temp,(int)&psxRegs.code); + emit_addimm(cc,gte_cycletab[c2op]/2,cc); // XXX: could just adjust ccadj? + emit_addimm(FP,(int)&psxRegs.CP2D.r[0]-(int)&dynarec_local,0); // cop2 regs + emit_writeword(1,(int)&psxRegs.code); emit_call((int)gte_handlers[c2op]); } diff --git a/libpcsxcore/new_dynarec/emu_if.c b/libpcsxcore/new_dynarec/emu_if.c index b44feb39..f337b65e 100644 --- a/libpcsxcore/new_dynarec/emu_if.c +++ b/libpcsxcore/new_dynarec/emu_if.c @@ -1,5 +1,5 @@ /* - * (C) Gražvydas "notaz" Ignotas, 2010 + * (C) Gražvydas "notaz" Ignotas, 2010-2011 * * This work is licensed under the terms of GNU GPL version 2 or later. * See the COPYING file in the top-level directory. @@ -14,6 +14,7 @@ #include "../cdrom.h" #include "../psxdma.h" #include "../mdec.h" +#include "../gte_neon.h" #define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0])) @@ -163,7 +164,12 @@ static int ari64_init() for (i = 0; i < ARRAY_SIZE(gte_handlers); i++) if (psxCP2[i] != psxNULL) gte_handlers[i] = psxCP2[i]; - +#ifdef __arm__ + gte_handlers[0x01] = gteRTPS_neon; + gte_handlers[0x30] = gteRTPT_neon; + gte_handlers[0x12] = gteMVMVA_neon; + gte_handlers[0x06] = gteNCLIP_neon; +#endif psxH_ptr = psxH; return 0; -- 2.39.2