mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-27 15:30:35 +00:00
ARM Jit: Avoid materializing some unnecessary immediates in loads/stores
This commit is contained in:
parent
aea272a3ce
commit
b2260149ae
@ -328,12 +328,14 @@ namespace MIPSComp
|
||||
|
||||
// We can compute the full address at compile time. Kickass.
|
||||
u32 addr = iaddr & 0x3FFFFFFF;
|
||||
// Still flush it, since often these will be in a row.
|
||||
load ? gpr.MapDirtyIn(rt, rs) : gpr.MapInIn(rt, rs);
|
||||
|
||||
if (addr == iaddr && offset == 0) {
|
||||
// It was already safe. Let's shove it into a reg and use it directly.
|
||||
load ? gpr.MapDirtyIn(rt, rs) : gpr.MapInIn(rt, rs);
|
||||
addrReg = gpr.R(rs);
|
||||
} else {
|
||||
// In this case, only map rt. rs+offset will be in R0.
|
||||
gpr.MapReg(rt, load ? (MAP_NOINIT | MAP_DIRTY) : 0);
|
||||
gpr.SetRegImm(R0, addr);
|
||||
addrReg = R0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user