From bf51fc7c36ca77f79d7bd71f049ecb493fa07ff6 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Sat, 26 Jul 2025 09:30:37 -0400 Subject: [PATCH] OpcodeDispatcher: do not use Constant as an identifier Signed-off-by: Alyssa Rosenzweig --- .../Source/Interface/Core/OpcodeDispatcher.h | 18 +++++++++--------- .../Interface/Core/OpcodeDispatcher/X87.cpp | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/FEXCore/Source/Interface/Core/OpcodeDispatcher.h b/FEXCore/Source/Interface/Core/OpcodeDispatcher.h index 5dc4f089a..b48ea9eb5 100644 --- a/FEXCore/Source/Interface/Core/OpcodeDispatcher.h +++ b/FEXCore/Source/Interface/Core/OpcodeDispatcher.h @@ -712,7 +712,7 @@ public: Ref ReconstructX87StateFromFSW_Helper(Ref FSW); void FLD(OpcodeArgs, IR::OpSize Width); void FLDFromStack(OpcodeArgs); - void FLD_Const(OpcodeArgs, NamedVectorConstant Constant); + void FLD_Const(OpcodeArgs, NamedVectorConstant K); void FBLD(OpcodeArgs); void FBSTP(OpcodeArgs); @@ -1795,12 +1795,12 @@ private: } } - void SetAF(unsigned Constant) { + void SetAF(unsigned K) { // AF is stored in bit 4 of the AF flag byte, with garbage in the other // bits. This allows us to defer the extract in the usual case. When it is // read, bit 4 is extracted. In order to write a constant value of AF, that // means we need to left-shift here to compensate. - SetRFLAG(_Constant(Constant << 4)); + SetRFLAG(_Constant(K << 4)); } void ZeroPF_AF(); @@ -2196,9 +2196,9 @@ private: return CachedNamedVectorConstants[NamedConstant][log2_size_bytes]; } - auto Constant = _LoadNamedVectorConstant(Size, NamedConstant); - CachedNamedVectorConstants[NamedConstant][log2_size_bytes] = Constant; - return Constant; + auto K = _LoadNamedVectorConstant(Size, NamedConstant); + CachedNamedVectorConstants[NamedConstant][log2_size_bytes] = K; + return K; } Ref LoadAndCacheIndexedNamedVectorConstant(IR::OpSize Size, FEXCore::IR::IndexNamedVectorConstant NamedIndexedConstant, uint32_t Index) { IndexNamedVectorMapKey Key { @@ -2212,9 +2212,9 @@ private: return it->second; } - auto Constant = _LoadNamedVectorIndexedConstant(Size, NamedIndexedConstant, Index); - CachedIndexedNamedVectorConstants.insert_or_assign(Key, Constant); - return Constant; + auto K = _LoadNamedVectorIndexedConstant(Size, NamedIndexedConstant, Index); + CachedIndexedNamedVectorConstants.insert_or_assign(Key, K); + return K; } Ref LoadUncachedZeroVector(IR::OpSize Size) { diff --git a/FEXCore/Source/Interface/Core/OpcodeDispatcher/X87.cpp b/FEXCore/Source/Interface/Core/OpcodeDispatcher/X87.cpp index e0166b5a2..85808f5a6 100644 --- a/FEXCore/Source/Interface/Core/OpcodeDispatcher/X87.cpp +++ b/FEXCore/Source/Interface/Core/OpcodeDispatcher/X87.cpp @@ -84,9 +84,9 @@ void OpDispatchBuilder::FBSTP(OpcodeArgs) { _PopStackDestroy(); } -void OpDispatchBuilder::FLD_Const(OpcodeArgs, NamedVectorConstant Constant) { +void OpDispatchBuilder::FLD_Const(OpcodeArgs, NamedVectorConstant K) { // Update TOP - Ref Data = LoadAndCacheNamedVectorConstant(OpSize::i128Bit, Constant); + Ref Data = LoadAndCacheNamedVectorConstant(OpSize::i128Bit, K); _PushStack(Data, Data, OpSize::i128Bit, true); }