From f143462ebe2f0eaa538076df09ed54a11565bbbe Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Fri, 25 Oct 2024 15:41:22 -0700 Subject: [PATCH] OpcodeDispatcher: Minor optimization to small pushf The push operation already truncates the result, there's no need to bfe it. Noticed this while cleaning up in #4134. Removes one instruction for 16-bit and 32-bit pushf instructions. --- FEXCore/Source/Interface/Core/OpcodeDispatcher.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/FEXCore/Source/Interface/Core/OpcodeDispatcher.cpp b/FEXCore/Source/Interface/Core/OpcodeDispatcher.cpp index f5dd3ddca..496ffab94 100644 --- a/FEXCore/Source/Interface/Core/OpcodeDispatcher.cpp +++ b/FEXCore/Source/Interface/Core/OpcodeDispatcher.cpp @@ -3573,10 +3573,6 @@ void OpDispatchBuilder::PUSHFOp(OpcodeArgs) { const uint8_t Size = GetSrcSize(Op); Ref Src = GetPackedRFLAG(); - if (Size != 8) { - Src = _Bfe(OpSize::i32Bit, Size * 8, 0, Src); - } - Push(Size, Src); }