mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-20 19:44:57 +00:00
Merge pull request #9346 from Sintendo/jitarm64ub
JitArm64: Fix signed bitwise left shift UB
This commit is contained in:
commit
dcc313fd96
1 changed files with 2 additions and 5 deletions
|
@ -631,10 +631,7 @@ void JitArm64::srawix(UGeckoInstruction inst)
|
|||
s32 imm = (s32)gpr.GetImm(s);
|
||||
gpr.SetImmediate(a, imm >> amount);
|
||||
|
||||
if (amount != 0 && (imm < 0) && (imm << (32 - amount)))
|
||||
ComputeCarry(true);
|
||||
else
|
||||
ComputeCarry(false);
|
||||
ComputeCarry(amount != 0 && (imm < 0) && (u32(imm) << (32 - amount)));
|
||||
|
||||
if (inst.Rc)
|
||||
ComputeRC0(gpr.GetImm(a));
|
||||
|
@ -1353,7 +1350,7 @@ void JitArm64::srawx(UGeckoInstruction inst)
|
|||
{
|
||||
amount &= 0x1F;
|
||||
gpr.SetImmediate(a, i >> amount);
|
||||
ComputeCarry(amount != 0 && i < 0 && (i << (32 - amount)));
|
||||
ComputeCarry(amount != 0 && i < 0 && (u32(i) << (32 - amount)));
|
||||
}
|
||||
|
||||
if (inst.Rc)
|
||||
|
|
Loading…
Add table
Reference in a new issue