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:
JosJuice
2021-08-21 16:28:51 +02:00
parent 559de262a1
commit 09cdb076a3
3 changed files with 39 additions and 4 deletions

View File

@ -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)