mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 13:27:45 -07:00
JitArm64_SystemRegisters: Optimize mtspr
No need to materialize the immediate if it is zero, we can just use WZR. Before: mov w27, #0x0 ; =0 str w27, [x29, #0x1178] After: str wzr, [x29, #0x1178]
This commit is contained in:
parent
8304ae3361
commit
0d9984b299
@ -477,7 +477,7 @@ void JitArm64::mtspr(UGeckoInstruction inst)
|
||||
}
|
||||
|
||||
// OK, this is easy.
|
||||
ARM64Reg RD = gpr.R(inst.RD);
|
||||
ARM64Reg RD = gpr.IsImm(inst.RD, 0) ? ARM64Reg::WZR : gpr.R(inst.RD);
|
||||
STR(IndexType::Unsigned, RD, PPC_REG, PPCSTATE_OFF_SPR(iIndex));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user