mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
arm64: Flush only caller-saved regs before calls.
This commit is contained in:
parent
7dbe2821dc
commit
66d85233b9
2 changed files with 7 additions and 3 deletions
|
@ -62,7 +62,8 @@ static const bool enableDebug = false;
|
|||
// saving them when we call out of the JIT. We will perform regular dynamic register allocation in the rest (x0-x15)
|
||||
|
||||
// STATIC ALLOCATION ARM64 (these are all callee-save registers):
|
||||
// x24 : Down counter
|
||||
// x23 : Down counter
|
||||
// x24 : PC save on JR with non-nice delay slot (to be eliminated later?)
|
||||
// x25 : MSR/MRS temporary (to be eliminated later)
|
||||
// x26 : JIT base reg
|
||||
// x27 : MIPS state (Could eliminate by placing the MIPS state right at the memory base)
|
||||
|
|
|
@ -61,8 +61,11 @@ const ARM64Reg *Arm64RegCache::GetMIPSAllocationOrder(int &count) {
|
|||
}
|
||||
|
||||
void Arm64RegCache::FlushBeforeCall() {
|
||||
// TODO: More optimal
|
||||
FlushAll();
|
||||
// These registers are not preserved by function calls.
|
||||
for (int i = 0; i < 19; ++i) {
|
||||
FlushArmReg(ARM64Reg(W0 + i));
|
||||
}
|
||||
FlushArmReg(W30);
|
||||
}
|
||||
|
||||
bool Arm64RegCache::IsMapped(MIPSGPReg mipsReg) {
|
||||
|
|
Loading…
Add table
Reference in a new issue