diff --git a/FEXCore/Source/Interface/Core/OpcodeDispatcher.h b/FEXCore/Source/Interface/Core/OpcodeDispatcher.h index f23ba79bb..0f5556f64 100644 --- a/FEXCore/Source/Interface/Core/OpcodeDispatcher.h +++ b/FEXCore/Source/Interface/Core/OpcodeDispatcher.h @@ -2300,6 +2300,8 @@ private: void CalculatePF(Ref Res); void CalculateAF(Ref Src1, Ref Src2); + Ref IncrementByCarry(OpSize OpSize, Ref Src); + void CalculateOF(uint8_t SrcSize, Ref Res, Ref Src1, Ref Src2, bool Sub); Ref CalculateFlags_ADC(uint8_t SrcSize, Ref Src1, Ref Src2); Ref CalculateFlags_SBB(uint8_t SrcSize, Ref Src1, Ref Src2); diff --git a/FEXCore/Source/Interface/Core/OpcodeDispatcher/Flags.cpp b/FEXCore/Source/Interface/Core/OpcodeDispatcher/Flags.cpp index 3ed5198ed..654743667 100644 --- a/FEXCore/Source/Interface/Core/OpcodeDispatcher/Flags.cpp +++ b/FEXCore/Source/Interface/Core/OpcodeDispatcher/Flags.cpp @@ -270,6 +270,11 @@ void OpDispatchBuilder::CalculateDeferredFlags() { NZCVDirty = false; } +Ref OpDispatchBuilder::IncrementByCarry(OpSize OpSize, Ref Src) { + RectifyCarryInvert(false); + return _Adc(OpSize, _Constant(0), Src); +} + Ref OpDispatchBuilder::CalculateFlags_ADC(uint8_t SrcSize, Ref Src1, Ref Src2) { auto Zero = _Constant(0); auto One = _Constant(1);