X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=libpcsxcore%2Fnew_dynarec%2Fassem_arm.c;h=c95058532947a798e3a1e3139944a8cdd9e7ac2b;hb=a916ad67762d10d8937e32e792be9143e589beb7;hp=9c5d108905e6c03b15247d406bbbaa428f90c6b1;hpb=f70d384d2642a085d539e37022fb7f07168926d0;p=pcsx_rearmed.git diff --git a/libpcsxcore/new_dynarec/assem_arm.c b/libpcsxcore/new_dynarec/assem_arm.c index 9c5d1089..c9505853 100644 --- a/libpcsxcore/new_dynarec/assem_arm.c +++ b/libpcsxcore/new_dynarec/assem_arm.c @@ -2659,8 +2659,11 @@ inline_readstub(int type, int i, u_int addr, signed char regmap[], int target, i int rs=get_reg(regmap,target); int rth=get_reg(regmap,target|64); int rt=get_reg(regmap,target); + // allow for PCSX dummy reads + //assert(rt>=0); + if(rs<0) + rs=get_reg(regmap,-1); assert(rs>=0); - assert(rt>=0); int ftable=0; if(type==LOADB_STUB||type==LOADBU_STUB) ftable=(int)readmemb; @@ -2673,6 +2676,8 @@ inline_readstub(int type, int i, u_int addr, signed char regmap[], int target, i ftable=(int)readmemd; #endif assert(ftable!=0); + if(target==0) + emit_movimm(addr,rs); emit_writeword(rs,(int)&address); //emit_pusha(); save_regs(reglist); @@ -2706,19 +2711,21 @@ inline_readstub(int type, int i, u_int addr, signed char regmap[], int target, i } //emit_popa(); restore_regs(reglist); - if(type==LOADB_STUB) - emit_movsbl((int)&readmem_dword,rt); - if(type==LOADBU_STUB) - emit_movzbl((int)&readmem_dword,rt); - if(type==LOADH_STUB) - emit_movswl((int)&readmem_dword,rt); - if(type==LOADHU_STUB) - emit_movzwl((int)&readmem_dword,rt); - if(type==LOADW_STUB) - emit_readword((int)&readmem_dword,rt); - if(type==LOADD_STUB) { - emit_readword((int)&readmem_dword,rt); - if(rth>=0) emit_readword(((int)&readmem_dword)+4,rth); + if(rt>=0) { + if(type==LOADB_STUB) + emit_movsbl((int)&readmem_dword,rt); + if(type==LOADBU_STUB) + emit_movzbl((int)&readmem_dword,rt); + if(type==LOADH_STUB) + emit_movswl((int)&readmem_dword,rt); + if(type==LOADHU_STUB) + emit_movzwl((int)&readmem_dword,rt); + if(type==LOADW_STUB) + emit_readword((int)&readmem_dword,rt); + if(type==LOADD_STUB) { + emit_readword((int)&readmem_dword,rt); + if(rth>=0) emit_readword(((int)&readmem_dword)+4,rth); + } } } @@ -3549,9 +3556,6 @@ static void cop2_get_dreg(u_int copr,signed char tl,signed char temp) emit_writeword(tl,(int)®_cop2d[copr]); break; case 28: - case 30: - emit_movimm(0,tl); - break; case 29: emit_readword((int)®_cop2d[9],temp); emit_testimm(temp,0x8000); // do we need this? @@ -3606,8 +3610,6 @@ static void cop2_put_dreg(u_int copr,signed char sl,signed char temp) emit_writeword(sl,(int)®_cop2d[30]); emit_writeword(temp,(int)®_cop2d[31]); break; - case 7: - case 29: case 31: break; default: