X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=libpcsxcore%2Fnew_dynarec%2Fnew_dynarec.c;h=2a72711409907e0fe359b9179dccc8c2774d9fa3;hp=013af9b839d3bbc1adb7b2cbb55e5fd3a63eaa13;hb=5bf843dc7ca2eb95430607b49c0dde6798950317;hpb=252c20fc731d772878a62473c09f1688b3cac3dc diff --git a/libpcsxcore/new_dynarec/new_dynarec.c b/libpcsxcore/new_dynarec/new_dynarec.c index 013af9b8..2a727114 100644 --- a/libpcsxcore/new_dynarec/new_dynarec.c +++ b/libpcsxcore/new_dynarec/new_dynarec.c @@ -2717,7 +2717,7 @@ void load_assemble(int i,struct regstat *i_regs) int s,th,tl,addr,map=-1; int offset; int jaddr=0; - int memtarget,c=0; + int memtarget=0,c=0; u_int hr,reglist=0; th=get_reg(i_regs->regmap,rt1[i]|64); tl=get_reg(i_regs->regmap,rt1[i]); @@ -2732,11 +2732,21 @@ void load_assemble(int i,struct regstat *i_regs) memtarget=((signed int)(constmap[i][s]+offset))<(signed int)0x80800000; if(using_tlb&&((signed int)(constmap[i][s]+offset))>=(signed int)0xC0000000) memtarget=1; } - if(offset||s<0||c) addr=tl; - else addr=s; //printf("load_assemble: c=%d\n",c); //if(c) printf("load_assemble: const=%x\n",(int)constmap[i][s]+offset); // FIXME: Even if the load is a NOP, we should check for pagefaults... +#ifdef PCSX + if(tl<0) { + if(!c||(((u_int)constmap[i][s]+offset)>>16)==0x1f80) { + // could be FIFO, must perform the read + assem_debug("(forced read)\n"); + tl=get_reg(i_regs->regmap,-1); + assert(tl>=0); + } + } + if(offset||s<0||c) addr=tl; + else addr=s; +#endif if(tl>=0) { //assert(tl>=0); //assert(rt1[i]); @@ -7711,12 +7721,16 @@ int new_recompile_block(int addr) #ifdef PCSX if (Config.HLE && start == 0x80001000) { // XXX: is this enough? Maybe check hleSoftCall? + u_int beginning=(u_int)out; u_int page=get_page(start); ll_add(jump_in+page,start,out); invalid_code[start>>12]=0; emit_movimm(start,0); emit_writeword(0,(int)&pcaddr); - emit_jmp((int)new_dyna_leave); // enough?? + emit_jmp((int)new_dyna_leave); +#ifdef __arm__ + __clear_cache((void *)beginning,out); +#endif return 0; } else if ((u_int)addr < 0x00200000) {