mirror of
https://github.com/FEX-Emu/FEX.git
synced 2024-12-15 09:59:28 +00:00
OpcodeDispatcher: allow upper garbage with rcl/rcr smaller
we're masking immediately to something smaller Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
This commit is contained in:
parent
f22094a493
commit
974baca09c
@ -2520,10 +2520,10 @@ void OpDispatchBuilder::RCRSmallerOp(OpcodeArgs) {
|
||||
CalculateDeferredFlags();
|
||||
auto CF = GetRFLAG(FEXCore::X86State::RFLAG_CF_RAW_LOC);
|
||||
|
||||
OrderedNode *Src = LoadSource(GPRClass, Op, Op->Src[1], Op->Flags);
|
||||
const auto Size = GetSrcBitSize(Op);
|
||||
|
||||
// x86 masks the shift by 0x3F or 0x1F depending on size of op
|
||||
OrderedNode *Src = LoadSource(GPRClass, Op, Op->Src[1], Op->Flags, {.AllowUpperGarbage = true});
|
||||
Src = _And(OpSize::i32Bit, Src, _Constant(Size, 0x1F));
|
||||
|
||||
// CF only changes if we actually shifted. OF undefined if we didn't shift.
|
||||
@ -2719,11 +2719,10 @@ void OpDispatchBuilder::RCLSmallerOp(OpcodeArgs) {
|
||||
CalculateDeferredFlags();
|
||||
auto CF = GetRFLAG(FEXCore::X86State::RFLAG_CF_RAW_LOC);
|
||||
|
||||
OrderedNode *Src = LoadSource(GPRClass, Op, Op->Src[1], Op->Flags);
|
||||
|
||||
const auto Size = GetSrcBitSize(Op);
|
||||
|
||||
// x86 masks the shift by 0x3F or 0x1F depending on size of op
|
||||
OrderedNode *Src = LoadSource(GPRClass, Op, Op->Src[1], Op->Flags, {.AllowUpperGarbage = true});
|
||||
Src = _And(OpSize::i32Bit, Src, _Constant(Size, 0x1F));
|
||||
|
||||
// CF only changes if we actually shifted. OF undefined if we didn't shift.
|
||||
|
Loading…
Reference in New Issue
Block a user