mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-10-05 18:36:13 +02:00
JitArm64: srawix - Fix undefined behavior
Signed bitwise left shift invokes UB when shifting a negative value.
This commit is contained in:
1 parent
97eb616719
commit
567357e12d
1 file changed
+1
-4
@@ -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));
|
||||
|
||||
Reference in new issue
Block a user