mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-16 11:03:45 +01:00
Optimize multiple sv.s and lv.s calls on ARM. Also some cleanup.
This commit is contained in:
1 parent
5bb3824dcf
commit
dca457e6df
3 files changed
+26
-14
No files matched your search
@@ -372,12 +372,12 @@ void Jit::MovToPC(ARMReg r) {
|
||||
|
||||
void Jit::SaveDowncount() {
|
||||
if (jo.downcountInRegister)
|
||||
STR(R7, CTXREG, offsetof(MIPSState, downcount));
|
||||
STR(DOWNCOUNTREG, CTXREG, offsetof(MIPSState, downcount));
|
||||
}
|
||||
|
||||
void Jit::RestoreDowncount() {
|
||||
if (jo.downcountInRegister)
|
||||
LDR(R7, CTXREG, offsetof(MIPSState, downcount));
|
||||
LDR(DOWNCOUNTREG, CTXREG, offsetof(MIPSState, downcount));
|
||||
}
|
||||
|
||||
void Jit::WriteDownCount(int offset)
|
||||
@@ -386,12 +386,12 @@ void Jit::WriteDownCount(int offset)
|
||||
int theDowncount = js.downcountAmount + offset;
|
||||
Operand2 op2;
|
||||
if (TryMakeOperand2(theDowncount, op2)) {
|
||||
SUBS(R7, R7, op2);
|
||||
SUBS(DOWNCOUNTREG, DOWNCOUNTREG, op2);
|
||||
} else {
|
||||
// Should be fine to use R2 here, flushed the regcache anyway.
|
||||
// If js.downcountAmount can be expressed as an Imm8, we don't need this anyway.
|
||||
gpr.SetRegImm(R2, theDowncount);
|
||||
SUBS(R7, R7, R2);
|
||||
SUBS(DOWNCOUNTREG, DOWNCOUNTREG, R2);
|
||||
}
|
||||
} else {
|
||||
int theDowncount = js.downcountAmount + offset;
|
||||
@@ -399,14 +399,13 @@ void Jit::WriteDownCount(int offset)
|
||||
Operand2 op2;
|
||||
if (TryMakeOperand2(theDowncount, op2)) {
|
||||
SUBS(R1, R1, op2);
|
||||
STR(R1, CTXREG, offsetof(MIPSState, downcount));
|
||||
} else {
|
||||
// Should be fine to use R2 here, flushed the regcache anyway.
|
||||
// If js.downcountAmount can be expressed as an Imm8, we don't need this anyway.
|
||||
gpr.SetRegImm(R2, theDowncount);
|
||||
SUBS(R1, R1, R2);
|
||||
STR(R1, CTXREG, offsetof(MIPSState, downcount));
|
||||
}
|
||||
STR(R1, CTXREG, offsetof(MIPSState, downcount));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user