OpcodeDispatcher: fix 8/16-bit RCR

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
This commit is contained in:
Alyssa Rosenzweig committed 2024-07-05 10:49:02 -04:00
1 parent f2d1f2de56
commit 94bd79b2bf
1 file changed
+4 -3
@@ -2217,9 +2217,10 @@ void OpDispatchBuilder::RCRSmallerOp(OpcodeArgs) {
Tmp = _Bfi(OpSize::i64Bit, 17, 34, Tmp, Tmp);
}
// Entire bitfield has been setup
// Just extract the 8 or 16bits we need
Ref Res = _Lshr(OpSize::i32Bit, Tmp, Src);
// Entire bitfield has been setup. Just extract the 8 or 16bits we need.
// 64-bit shift used because we want to rotate in our cascaded upper bits
// rather than zeroes.
Ref Res = _Lshr(OpSize::i64Bit, Tmp, Src);
StoreResult(GPRClass, Op, Res, -1);