diff --git a/FEXCore/Source/Interface/Core/OpcodeDispatcher.cpp b/FEXCore/Source/Interface/Core/OpcodeDispatcher.cpp index 4b5992474..96c67ce4a 100644 --- a/FEXCore/Source/Interface/Core/OpcodeDispatcher.cpp +++ b/FEXCore/Source/Interface/Core/OpcodeDispatcher.cpp @@ -512,7 +512,7 @@ void OpDispatchBuilder::PUSHOp(OpcodeArgs) { void OpDispatchBuilder::PUSHREGOp(OpcodeArgs) { const uint8_t Size = GetSrcSize(Op); - OrderedNode *Src = LoadSource(GPRClass, Op, Op->Dest, Op->Flags, -1); + OrderedNode *Src = LoadSource(GPRClass, Op, Op->Dest , Op->Flags, -1, true, false, MemoryAccessType::ACCESS_DEFAULT, true); auto OldSP = LoadGPRRegister(X86State::REG_RSP); const uint8_t GPRSize = CTX->GetGPRSize(); diff --git a/unittests/InstructionCountCI/Primary.json b/unittests/InstructionCountCI/Primary.json index 36fb2d80d..61d216f35 100644 --- a/unittests/InstructionCountCI/Primary.json +++ b/unittests/InstructionCountCI/Primary.json @@ -2553,12 +2553,11 @@ ] }, "push ax": { - "ExpectedInstructionCount": 2, - "Optimal": "No", + "ExpectedInstructionCount": 1, + "Optimal": "Yes", "Comment": "0x50", "ExpectedArm64ASM": [ - "uxth w20, w4", - "strh w20, [x8, #-2]!" + "strh w4, [x8, #-2]!" ] }, "push rax": { diff --git a/unittests/InstructionCountCI/PrimaryGroup.json b/unittests/InstructionCountCI/PrimaryGroup.json index 3753de59b..1f564b4d9 100644 --- a/unittests/InstructionCountCI/PrimaryGroup.json +++ b/unittests/InstructionCountCI/PrimaryGroup.json @@ -4050,12 +4050,11 @@ ] }, "push ax": { - "ExpectedInstructionCount": 2, - "Optimal": "No", + "ExpectedInstructionCount": 1, + "Optimal": "Yes", "Comment": "GROUP4 0xff /6", "ExpectedArm64ASM": [ - "uxth w20, w4", - "strh w20, [x8, #-2]!" + "strh w4, [x8, #-2]!" ] }, "push rax": { diff --git a/unittests/InstructionCountCI/Primary_32Bit.json b/unittests/InstructionCountCI/Primary_32Bit.json index f6d3b79f5..8d2920834 100644 --- a/unittests/InstructionCountCI/Primary_32Bit.json +++ b/unittests/InstructionCountCI/Primary_32Bit.json @@ -342,6 +342,22 @@ "str w20, [x28, #728]" ] }, + "push ax": { + "ExpectedInstructionCount": 1, + "Optimal": "Yes", + "Comment": "0x50", + "ExpectedArm64ASM": [ + "strh w4, [x8, #-2]!" + ] + }, + "push eax": { + "ExpectedInstructionCount": 1, + "Optimal": "Yes", + "Comment": "0x50", + "ExpectedArm64ASM": [ + "str w4, [x8, #-4]!" + ] + }, "dec eax": { "ExpectedInstructionCount": 10, "Optimal": "No", diff --git a/unittests/InstructionCountCI/Test.json b/unittests/InstructionCountCI/Test.json deleted file mode 100644 index 519aab97e..000000000 --- a/unittests/InstructionCountCI/Test.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "Features": { - "Bitness": 64, - "EnabledHostFeatures": [], - "DisabledHostFeatures": [ - "SVE128", - "SVE256" - ] - }, - "Instructions": { - "push ax, bx": { - "ExpectedInstructionCount": 4, - "Optimal": "No", - "Comment": "0x50", - "x86Insts": [ - "push ax", - "push bx" - ], - "ExpectedArm64ASM": [ - "uxth w20, w4", - "strh w20, [x8, #-2]!", - "uxth w20, w7", - "strh w20, [x8, #-2]!" - ] - } - } -}