arm64jit: Avoid temporary on variable shift.

I think we should trust that it works per the spec.
This commit is contained in:
Unknown W. Brackets 2017-12-29 11:50:29 -08:00
parent 1ecce2a2e1
commit 56d64f5c67

View File

@ -392,13 +392,11 @@ void Arm64Jit::CompShiftVar(MIPSOpcode op, Arm64Gen::ShiftType shiftType) {
return;
}
gpr.MapDirtyInIn(rd, rs, rt);
// Not sure if ARM64 wraps like this so let's do it for it. (TODO: According to the ARM ARM, it will indeed mask for us so this is not necessary)
ANDI2R(SCRATCH1, gpr.R(rs), 0x1F, INVALID_REG);
switch (shiftType) {
case ST_LSL: LSLV(gpr.R(rd), gpr.R(rt), SCRATCH1); break;
case ST_LSR: LSRV(gpr.R(rd), gpr.R(rt), SCRATCH1); break;
case ST_ASR: ASRV(gpr.R(rd), gpr.R(rt), SCRATCH1); break;
case ST_ROR: RORV(gpr.R(rd), gpr.R(rt), SCRATCH1); break;
case ST_LSL: LSLV(gpr.R(rd), gpr.R(rt), gpr.R(rs)); break;
case ST_LSR: LSRV(gpr.R(rd), gpr.R(rt), gpr.R(rs)); break;
case ST_ASR: ASRV(gpr.R(rd), gpr.R(rt), gpr.R(rs)); break;
case ST_ROR: RORV(gpr.R(rd), gpr.R(rt), gpr.R(rs)); break;
}
}