mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06: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:
@ -477,7 +477,7 @@ void JitArm64::mtspr(UGeckoInstruction inst)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// OK, this is easy.
|
// 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));
|
STR(IndexType::Unsigned, RD, PPC_REG, PPCSTATE_OFF_SPR(iIndex));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user