mirror of
https://github.com/FEX-Emu/FEX.git
synced 2024-12-13 17:15:41 +00:00
OpcodeDispatcher: drop SUB defer
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
This commit is contained in:
parent
1bf31d20b6
commit
fabd6be5af
@ -89,7 +89,6 @@ class OpDispatchBuilder final : public IREmitter {
|
|||||||
public:
|
public:
|
||||||
enum class FlagsGenerationType : uint8_t {
|
enum class FlagsGenerationType : uint8_t {
|
||||||
TYPE_NONE,
|
TYPE_NONE,
|
||||||
TYPE_SUB,
|
|
||||||
TYPE_MUL,
|
TYPE_MUL,
|
||||||
TYPE_UMUL,
|
TYPE_UMUL,
|
||||||
TYPE_LOGICAL,
|
TYPE_LOGICAL,
|
||||||
@ -2207,26 +2206,6 @@ private:
|
|||||||
*
|
*
|
||||||
* Depending on the operation it may force a RFLAGs calculation before storing the new deferred state.
|
* Depending on the operation it may force a RFLAGs calculation before storing the new deferred state.
|
||||||
* @{ */
|
* @{ */
|
||||||
void GenerateFlags_SUB(FEXCore::X86Tables::DecodedOp Op, Ref Src1, Ref Src2, bool UpdateCF = true) {
|
|
||||||
if (!UpdateCF) {
|
|
||||||
// If we aren't updating CF then we need to calculate flags. Invalidation mask would make this not required.
|
|
||||||
CalculateDeferredFlags();
|
|
||||||
}
|
|
||||||
CurrentDeferredFlags = DeferredFlagData {
|
|
||||||
.Type = FlagsGenerationType::TYPE_SUB,
|
|
||||||
.SrcSize = GetSrcSize(Op),
|
|
||||||
.Sources =
|
|
||||||
{
|
|
||||||
.TwoSrcImmediate =
|
|
||||||
{
|
|
||||||
.Src1 = Src1,
|
|
||||||
.Src2 = Src2,
|
|
||||||
.UpdateCF = UpdateCF,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
void GenerateFlags_MUL(FEXCore::X86Tables::DecodedOp Op, Ref Res, Ref High) {
|
void GenerateFlags_MUL(FEXCore::X86Tables::DecodedOp Op, Ref Res, Ref High) {
|
||||||
CurrentDeferredFlags = DeferredFlagData {
|
CurrentDeferredFlags = DeferredFlagData {
|
||||||
.Type = FlagsGenerationType::TYPE_MUL,
|
.Type = FlagsGenerationType::TYPE_MUL,
|
||||||
|
@ -271,10 +271,6 @@ void OpDispatchBuilder::CalculateDeferredFlags(uint32_t FlagsToCalculateMask) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
switch (CurrentDeferredFlags.Type) {
|
switch (CurrentDeferredFlags.Type) {
|
||||||
case FlagsGenerationType::TYPE_SUB:
|
|
||||||
CalculateFlags_SUB(CurrentDeferredFlags.SrcSize, CurrentDeferredFlags.Sources.TwoSrcImmediate.Src1,
|
|
||||||
CurrentDeferredFlags.Sources.TwoSrcImmediate.Src2, CurrentDeferredFlags.Sources.TwoSrcImmediate.UpdateCF);
|
|
||||||
break;
|
|
||||||
case FlagsGenerationType::TYPE_MUL:
|
case FlagsGenerationType::TYPE_MUL:
|
||||||
CalculateFlags_MUL(CurrentDeferredFlags.SrcSize, CurrentDeferredFlags.Res, CurrentDeferredFlags.Sources.OneSource.Src1);
|
CalculateFlags_MUL(CurrentDeferredFlags.SrcSize, CurrentDeferredFlags.Res, CurrentDeferredFlags.Sources.OneSource.Src1);
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user