From cebcf50c65f4d4e63cfd495d4c2862f0a77c6820 Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Tue, 1 Apr 2025 15:18:37 -0700 Subject: [PATCH] x87OptimizationPass: Fixes {Inc,Dec}StackPop On the slow path these were pushing and popping in the wrong direction. Switch them around to ensure the unittests work. --- .../Source/Interface/IR/Passes/x87StackOptimizationPass.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/FEXCore/Source/Interface/IR/Passes/x87StackOptimizationPass.cpp b/FEXCore/Source/Interface/IR/Passes/x87StackOptimizationPass.cpp index 7b3ef5a37..1e8124463 100644 --- a/FEXCore/Source/Interface/IR/Passes/x87StackOptimizationPass.cpp +++ b/FEXCore/Source/Interface/IR/Passes/x87StackOptimizationPass.cpp @@ -1044,7 +1044,7 @@ void X87StackOptimization::Run(IREmitter* Emit) { case OP_INCSTACKTOP: { if (SlowPath) { - UpdateTopForPush_Slow(); + UpdateTopForPop_Slow(); } else { StackData.rotate(false); } @@ -1053,7 +1053,7 @@ void X87StackOptimization::Run(IREmitter* Emit) { case OP_DECSTACKTOP: { if (SlowPath) { - UpdateTopForPop_Slow(); + UpdateTopForPush_Slow(); } else { StackData.rotate(true); }