naomi: 32MB-aware block lookups from arm-jit
This commit is contained in:
parent
0c0008d17b
commit
bfbb01d470
|
@ -173,8 +173,13 @@ do_iter:
|
||||||
HIDDEN(no_update)
|
HIDDEN(no_update)
|
||||||
CSYM(no_update): @ next_pc _MUST_ be on r4 *R4 NOT R0 anymore*
|
CSYM(no_update): @ next_pc _MUST_ be on r4 *R4 NOT R0 anymore*
|
||||||
|
|
||||||
|
#if RAM_SIZE == 33554432
|
||||||
|
sub r2,r8,#67371008
|
||||||
|
ubfx r1,r4,#1,#24
|
||||||
|
#else
|
||||||
sub r2,r8,#33816576
|
sub r2,r8,#33816576
|
||||||
ubfx r1,r4,#1,#23
|
ubfx r1,r4,#1,#23
|
||||||
|
#endif
|
||||||
ldr pc,[r2,r1,lsl #2]
|
ldr pc,[r2,r1,lsl #2]
|
||||||
|
|
||||||
@bic r1,r4,#0xFF000000
|
@bic r1,r4,#0xFF000000
|
||||||
|
|
|
@ -408,8 +408,14 @@ u32 DynaRBI::Relink()
|
||||||
case BET_DynamicJump:
|
case BET_DynamicJump:
|
||||||
{
|
{
|
||||||
#ifdef CALLSTACK
|
#ifdef CALLSTACK
|
||||||
SUB(r2,r8,33816576);
|
#error offset broken
|
||||||
UBFX(r1,r4,1,23);
|
#if RAM_SIZE == 33554432
|
||||||
|
SUB(r2, r8, 67371008);
|
||||||
|
UBFX(r1, r4, 1, 24);
|
||||||
|
#else
|
||||||
|
SUB(r2, r8, 33816576);
|
||||||
|
UBFX(r1, r4, 1, 23);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (BlockType==BET_DynamicRet)
|
if (BlockType==BET_DynamicRet)
|
||||||
{
|
{
|
||||||
|
@ -431,8 +437,13 @@ u32 DynaRBI::Relink()
|
||||||
#if 1
|
#if 1
|
||||||
//this is faster
|
//this is faster
|
||||||
//why ? (Icache ?)
|
//why ? (Icache ?)
|
||||||
SUB(r2,r8,33816576);
|
#if RAM_SIZE == 33554432
|
||||||
UBFX(r1,r4,1,23);
|
SUB(r2, r8, 67371008);
|
||||||
|
UBFX(r1, r4, 1, 24);
|
||||||
|
#else
|
||||||
|
SUB(r2, r8, 33816576);
|
||||||
|
UBFX(r1, r4, 1, 23);
|
||||||
|
#endif
|
||||||
LDR(r15,r2,r1,Offset,true,S_LSL,2);
|
LDR(r15,r2,r1,Offset,true,S_LSL,2);
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
@ -445,8 +456,13 @@ u32 DynaRBI::Relink()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SUB(r2,r8,33816576); //1
|
#if RAM_SIZE == 33554432
|
||||||
UBFX(r1,r4,1,23); //1
|
SUB(r2, r8, 67371008);
|
||||||
|
UBFX(r1, r4, 1, 24);
|
||||||
|
#else
|
||||||
|
SUB(r2, r8, 33816576);
|
||||||
|
UBFX(r1, r4, 1, 23);
|
||||||
|
#endif
|
||||||
NOP();NOP(); //2
|
NOP();NOP(); //2
|
||||||
LDR(r15,r2,r1,Offset,true,S_LSL,2); //1
|
LDR(r15,r2,r1,Offset,true,S_LSL,2); //1
|
||||||
}
|
}
|
||||||
|
@ -456,8 +472,13 @@ u32 DynaRBI::Relink()
|
||||||
{
|
{
|
||||||
verify(pBranchBlock==0);
|
verify(pBranchBlock==0);
|
||||||
|
|
||||||
SUB(r2,r8,33816576);
|
#if RAM_SIZE == 33554432
|
||||||
UBFX(r1,r4,1,23);
|
SUB(r2, r8, 67371008);
|
||||||
|
UBFX(r1, r4, 1, 24);
|
||||||
|
#else
|
||||||
|
SUB(r2, r8, 33816576);
|
||||||
|
UBFX(r1, r4, 1, 23);
|
||||||
|
#endif
|
||||||
LDR(r15,r2,r1,Offset,true,S_LSL,2);
|
LDR(r15,r2,r1,Offset,true,S_LSL,2);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue