mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 17:19:44 -06:00
JitArm64: divwx - Optimize constant dividend
When the dividend is known at compile time, we can eliminate some of the branching and precompute the result for the overflow case.
This commit is contained in:
@ -1373,6 +1373,10 @@ void ARM64XEmitter::CMP(ARM64Reg Rn, u32 imm, bool shift)
|
||||
{
|
||||
EncodeAddSubImmInst(1, true, shift, imm, Rn, Is64Bit(Rn) ? ARM64Reg::SP : ARM64Reg::WSP);
|
||||
}
|
||||
void ARM64XEmitter::CMN(ARM64Reg Rn, u32 imm, bool shift)
|
||||
{
|
||||
EncodeAddSubImmInst(0, true, shift, imm, Rn, Is64Bit(Rn) ? ARM64Reg::SP : ARM64Reg::WSP);
|
||||
}
|
||||
|
||||
// Data Processing (Immediate)
|
||||
void ARM64XEmitter::MOVZ(ARM64Reg Rd, u32 imm, ShiftAmount pos)
|
||||
|
@ -1006,6 +1006,7 @@ public:
|
||||
void SUB(ARM64Reg Rd, ARM64Reg Rn, u32 imm, bool shift = false);
|
||||
void SUBS(ARM64Reg Rd, ARM64Reg Rn, u32 imm, bool shift = false);
|
||||
void CMP(ARM64Reg Rn, u32 imm, bool shift = false);
|
||||
void CMN(ARM64Reg Rn, u32 imm, bool shift = false);
|
||||
|
||||
// Data Processing (Immediate)
|
||||
void MOVZ(ARM64Reg Rd, u32 imm, ShiftAmount pos = ShiftAmount::Shift0);
|
||||
|
Reference in New Issue
Block a user