mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-14 11:01:01 +02:00
OpcodeDispatcher: avoid zero shift in SHLD
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
This commit is contained in:
1 parent
ba13ccadb8
commit
83ef2da95f
1 file changed
+2
-2
@@ -1443,10 +1443,10 @@ void OpDispatchBuilder::SHLDImmediateOp(OpcodeArgs) {
|
||||
Ref Res {};
|
||||
if (Size < 32) {
|
||||
Ref ShiftLeft = _Constant(Shift);
|
||||
auto ShiftRight = _Constant(Size - Shift);
|
||||
auto ShiftRight = Size - Shift;
|
||||
|
||||
auto Tmp1 = _Lshl(OpSize::i64Bit, Dest, ShiftLeft);
|
||||
auto Tmp2 = _Lshr(OpSize::i32Bit, Src, ShiftRight);
|
||||
Ref Tmp2 = ShiftRight ? _Lshr(OpSize::i32Bit, Src, _Constant(ShiftRight)) : Src;
|
||||
|
||||
Res = _Or(OpSize::i64Bit, Tmp1, Tmp2);
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user