mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-06 21:00:17 +02:00
OpcodeDispatcher: do not use Constant as an identifier
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
This commit is contained in:
1 parent
e910a81c12
commit
bf51fc7c36
2 files changed
+11
-11
No files matched your search
@@ -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<FEXCore::X86State::RFLAG_AF_RAW_LOC>(_Constant(Constant << 4));
|
||||
SetRFLAG<FEXCore::X86State::RFLAG_AF_RAW_LOC>(_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) {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user