From e4e45bcc59cd2e629dd3eca1d39263b3385a4ee6 Mon Sep 17 00:00:00 2001 From: Simon Scherer Date: Thu, 3 Sep 2026 11:20:41 +0200 Subject: [PATCH] x87StackOptimizationPass: Set both operands as valid in the tag word for FXCH --- .../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 dfaf74a96..8dcc220e3 100644 --- a/FEXCore/Source/Interface/IR/Passes/x87StackOptimizationPass.cpp +++ b/FEXCore/Source/Interface/IR/Passes/x87StackOptimizationPass.cpp @@ -1074,8 +1074,8 @@ void X87StackOptimization::Run(IREmitter* Emit) { // Slow path: do actual memory operations Ref ValueTop = LoadStackValue(); Ref ValueOffset = LoadStackValue(Offset); - StoreStackValue(ValueOffset); - StoreStackValue(ValueTop, Offset); + StoreStackValue(ValueOffset, 0, true); + StoreStackValue(ValueTop, Offset, true); } else { // Fast path: swap complete StackMemberInfo preserving Source metadata StackData.setTop(StackMemberOffset, 0);