From: notaz <notasas@gmail.com> Date: Sat, 24 Sep 2011 15:44:23 +0000 (+0300) Subject: drc: fix PCSX HLE hack for armv5 X-Git-Tag: r10~28 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=15776b68de021ae41ebd5d8d646beca694c3784d;p=pcsx_rearmed.git drc: fix PCSX HLE hack for armv5 also adds some asserts I did during debugging this --- diff --git a/libpcsxcore/new_dynarec/assem_arm.c b/libpcsxcore/new_dynarec/assem_arm.c index 33ecf8e1..2a0a2146 100644 --- a/libpcsxcore/new_dynarec/assem_arm.c +++ b/libpcsxcore/new_dynarec/assem_arm.c @@ -170,6 +170,7 @@ void set_jump_target_fillslot(int addr,u_int target,int copy) /* Literal pool */ add_literal(int addr,int val) { + assert(literalcount<sizeof(literals)/sizeof(literals[0])); literals[literalcount][0]=addr; literals[literalcount][1]=val; literalcount++; @@ -226,7 +227,7 @@ int verify_dirty(int addr) u_int *ptr=(u_int *)addr; #ifdef ARMv5_ONLY // get from literal pool - assert((*ptr&0xFFF00000)==0xe5900000); + assert((*ptr&0xFFFF0000)==0xe59f0000); u_int offset=*ptr&0xfff; u_int *l_ptr=(void *)ptr+offset+8; u_int source=l_ptr[0]; @@ -279,7 +280,7 @@ void get_bounds(int addr,u_int *start,u_int *end) u_int *ptr=(u_int *)addr; #ifdef ARMv5_ONLY // get from literal pool - assert((*ptr&0xFFF00000)==0xe5900000); + assert((*ptr&0xFFFF0000)==0xe59f0000); u_int offset=*ptr&0xfff; u_int *l_ptr=(void *)ptr+offset+8; u_int source=l_ptr[0]; diff --git a/libpcsxcore/new_dynarec/new_dynarec.c b/libpcsxcore/new_dynarec/new_dynarec.c index 8ab31282..666b4d44 100644 --- a/libpcsxcore/new_dynarec/new_dynarec.c +++ b/libpcsxcore/new_dynarec/new_dynarec.c @@ -7980,6 +7980,7 @@ int new_recompile_block(int addr) emit_movimm(start,0); emit_writeword(0,(int)&pcaddr); emit_jmp((int)new_dyna_leave); + literal_pool(0); #ifdef __arm__ __clear_cache((void *)beginning,out); #endif