JitArm64: srawix - Fix undefined behavior
Signed bitwise left shift invokes UB when shifting a negative value.
This commit is contained in:
parent
97eb616719
commit
567357e12d
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue