JitArm64: srawx - Fix undefined behavior

Signed bitwise left shift invokes UB when shifting a negative value.
This commit is contained in:
Sintendo 2020-12-21 11:01:42 +01:00
parent 4c8ccc63b5
commit 97eb616719

View File

@ -1353,7 +1353,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)