Fixes bug in SHR op

Smaller ops could have been shifting data from the larger source in to
the smaller op space when it should have been zero'd
This commit is contained in:
Ryan Houdek authored and Stefanos Kornilios Mitsis Poiitidis committed 2020-03-06 07:55:59 +02:00
1 parent 7a4d0fbfd3
commit 2df55d303a
1 file changed
+4
@@ -1124,6 +1124,10 @@ void OpDispatchBuilder::SHROp(OpcodeArgs) {
else
Src = _And(Src, _Constant(0x1F));
if (Size != 64) {
Dest = _Bfe(Size, 0, Dest);
}
auto ALUOp = _Lshr(Dest, Src);
StoreResult(Op, ALUOp, -1);