Merge pull request #12662 from JosJuice/jitarm64-imm-rc0-sxtw

JitArm64: Skip SXTW in ComputeRC0(u64)
This commit is contained in:
JosJuice 2024-03-29 15:36:33 +01:00 committed by GitHub
commit f30d3c9092
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 5 deletions

View File

@ -351,7 +351,7 @@ protected:
void UpdateRoundingMode();
void ComputeRC0(Arm64Gen::ARM64Reg reg);
void ComputeRC0(u64 imm);
void ComputeRC0(u32 imm);
void ComputeCarry(Arm64Gen::ARM64Reg reg); // reg must contain 0 or 1
void ComputeCarry(bool carry);
void ComputeCarry();

View File

@ -37,12 +37,10 @@ void JitArm64::ComputeRC0(ARM64Reg reg)
SXTW(gpr.CR(0), reg);
}
void JitArm64::ComputeRC0(u64 imm)
void JitArm64::ComputeRC0(u32 imm)
{
gpr.BindCRToRegister(0, false);
MOVI2R(gpr.CR(0), imm);
if (imm & 0x80000000)
SXTW(gpr.CR(0), EncodeRegTo32(gpr.CR(0)));
MOVI2R(gpr.CR(0), s64(s32(imm)));
}
void JitArm64::ComputeCarry(ARM64Reg reg)