X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=libpcsxcore%2Fnew_dynarec%2Fpcsxmem_inline.c;fp=libpcsxcore%2Fnew_dynarec%2Fpcsxmem_inline.c;h=69227f2a760ef6dd7b31aa8fd9a96081e0c0b5a4;hp=02e7705e011dca64394a4b7013566f484cab8653;hb=d1e4ebd9988a9a5d9fb38b89f19e24b9ab6029d7;hpb=7c3a5182da4384e21a6ace037583fae399de5a02 diff --git a/libpcsxcore/new_dynarec/pcsxmem_inline.c b/libpcsxcore/new_dynarec/pcsxmem_inline.c index 02e7705e..69227f2a 100644 --- a/libpcsxcore/new_dynarec/pcsxmem_inline.c +++ b/libpcsxcore/new_dynarec/pcsxmem_inline.c @@ -15,6 +15,7 @@ static int pcsx_direct_read(int type, u_int addr, int cc_adj, int cc, int rs, in case 0x1120: // rcnt2 count if (rt < 0) goto dont_care; if (cc < 0) return 0; + host_tempreg_acquire(); emit_readword(&rcnts[2].mode, HOST_TEMPREG); emit_readword(&rcnts[2].cycleStart, rt); emit_testimm(HOST_TEMPREG, 0x200); @@ -23,6 +24,7 @@ static int pcsx_direct_read(int type, u_int addr, int cc_adj, int cc, int rs, in emit_add(HOST_TEMPREG, cc, HOST_TEMPREG); if (cc_adj) emit_addimm(HOST_TEMPREG, cc_adj, rt); + host_tempreg_release(); emit_shrne_imm(rt, 3, rt); mov_loadtype_adj(type!=LOADW_STUB?type:LOADH_STUB, rt, rt); goto hit; @@ -32,8 +34,10 @@ static int pcsx_direct_read(int type, u_int addr, int cc_adj, int cc, int rs, in if (rt < 0) return 0; t = (addr >> 4) & 3; emit_readword(&rcnts[t].mode, rt); + host_tempreg_acquire(); emit_andimm(rt, ~0x1800, HOST_TEMPREG); emit_writeword(HOST_TEMPREG, &rcnts[t].mode); + host_tempreg_release(); mov_loadtype_adj(type, rt, rt); goto hit; }