From dd7f3ddef3b64eff598e5ad33688ffc46fc94d23 Mon Sep 17 00:00:00 2001 From: Stefanos Kornilios Mitsis Poiitidis Date: Thu, 10 Sep 2020 02:18:02 +0300 Subject: [PATCH] SHR/ASR,imm: Fix CF calculation --- External/FEXCore/Source/Interface/Core/OpcodeDispatcher.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/External/FEXCore/Source/Interface/Core/OpcodeDispatcher.cpp b/External/FEXCore/Source/Interface/Core/OpcodeDispatcher.cpp index 41e2f8520..9e1c2698e 100644 --- a/External/FEXCore/Source/Interface/Core/OpcodeDispatcher.cpp +++ b/External/FEXCore/Source/Interface/Core/OpcodeDispatcher.cpp @@ -4701,7 +4701,7 @@ void OpDispatchBuilder::GenerateFlags_SignShiftRightImmediate(FEXCore::X86Tables // CF { // Extract the last bit shifted in to CF - SetRFLAG(_Bfe(1, Shift, Src1)); + SetRFLAG(_Bfe(1, Shift-1, Src1)); } // PF @@ -4750,7 +4750,7 @@ void OpDispatchBuilder::GenerateFlags_ShiftRightImmediate(FEXCore::X86Tables::De // CF { // Extract the last bit shifted in to CF - SetRFLAG(_Bfe(1, Shift, Src1)); + SetRFLAG(_Bfe(1, Shift-1, Src1)); } // PF