mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-07 06:40:12 +00:00
JitArm64: srawx - Fix undefined behavior
Signed bitwise left shift invokes UB when shifting a negative value.
This commit is contained in:
parent
4c8ccc63b5
commit
97eb616719
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user