mirror of
https://github.com/FEX-Emu/FEX.git
synced 2025-01-22 06:20:58 +00:00
IR: drop LoadFlag/StoreFlag ops
pointless, we can just load/store the context now. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
This commit is contained in:
parent
4094aa1b9a
commit
d20b46e46f
@ -529,25 +529,6 @@ DEF_OP(LoadDF) {
|
||||
ldrsb(Dst.X(), STATE, offsetof(FEXCore::Core::CPUState, flags[Flag]));
|
||||
}
|
||||
|
||||
DEF_OP(LoadFlag) {
|
||||
auto Op = IROp->C<IR::IROp_LoadFlag>();
|
||||
auto Dst = GetReg(Node);
|
||||
|
||||
LOGMAN_THROW_A_FMT(Op->Flag != X86State::RFLAG_PF_RAW_LOC && Op->Flag != X86State::RFLAG_AF_RAW_LOC, "PF/AF must be accessed as "
|
||||
"registers");
|
||||
|
||||
ldrb(Dst, STATE, offsetof(FEXCore::Core::CPUState, flags[0]) + Op->Flag);
|
||||
}
|
||||
|
||||
DEF_OP(StoreFlag) {
|
||||
auto Op = IROp->C<IR::IROp_StoreFlag>();
|
||||
|
||||
LOGMAN_THROW_A_FMT(Op->Flag != X86State::RFLAG_PF_RAW_LOC && Op->Flag != X86State::RFLAG_AF_RAW_LOC, "PF/AF must be accessed as "
|
||||
"registers");
|
||||
|
||||
strb(GetReg(Op->Value.ID()), STATE, offsetof(FEXCore::Core::CPUState, flags[0]) + Op->Flag);
|
||||
}
|
||||
|
||||
ARMEmitter::ExtendedMemOperand Arm64JITCore::GenerateMemOperand(
|
||||
uint8_t AccessSize, ARMEmitter::Register Base, IR::OrderedNodeWrapper Offset, IR::MemOffsetType OffsetType, uint8_t OffsetScale) {
|
||||
if (Offset.IsInvalid()) {
|
||||
|
@ -1260,7 +1260,7 @@ public:
|
||||
} else if (Index >= FPR0Index && Index <= FPR15Index) {
|
||||
_StoreRegister(Value, Index - FPR0Index, FPRClass, VectorSize);
|
||||
} else if (Index == DFIndex) {
|
||||
_StoreFlag(Value, X86State::RFLAG_DF_RAW_LOC);
|
||||
_StoreContext(1, GPRClass, Value, offsetof(Core::CPUState, flags[X86State::RFLAG_DF_RAW_LOC]));
|
||||
} else {
|
||||
bool Partial = RegCache.Partial & (1ull << Index);
|
||||
unsigned Size = Partial ? 8 : CacheIndexToSize(Index);
|
||||
@ -1729,7 +1729,7 @@ private:
|
||||
if (BitOffset == FEXCore::X86State::RFLAG_DF_RAW_LOC) {
|
||||
StoreDF(_SubShift(OpSize::i64Bit, _Constant(1), Value, ShiftType::LSL, 1));
|
||||
} else {
|
||||
_StoreFlag(Value, BitOffset);
|
||||
_StoreContext(1, GPRClass, Value, offsetof(FEXCore::Core::CPUState, flags[BitOffset]));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1934,7 +1934,7 @@ private:
|
||||
// Recover the sign bit, it is the logical DF value
|
||||
return _Lshr(OpSize::i64Bit, LoadDF(), _Constant(63));
|
||||
} else {
|
||||
return _LoadFlag(BitOffset);
|
||||
return _LoadContext(1, GPRClass, offsetof(Core::CPUState, flags[BitOffset]));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -489,21 +489,6 @@
|
||||
"DestSize": "8"
|
||||
},
|
||||
|
||||
"GPR = LoadFlag u32:$Flag": {
|
||||
"Desc": ["Loads an x86-64 flag from the context object",
|
||||
"Specialized to allow flexible implementation of flag handling"
|
||||
],
|
||||
"DestSize": "1"
|
||||
},
|
||||
|
||||
"StoreFlag GPR:$Value, u32:$Flag": {
|
||||
"HasSideEffects": true,
|
||||
"Desc": ["Stores 1-bit of the flag in to the specified x86-64 flag",
|
||||
"Specialized to allow flexible implementation of flag handling"
|
||||
],
|
||||
"DestSize": "1"
|
||||
},
|
||||
|
||||
"SSA = LoadMem RegisterClass:$Class, u8:#Size, GPR:$Addr, GPR:$Offset, u8:$Align, MemOffsetType:$OffsetType, u8:$OffsetScale": {
|
||||
"DestSize": "Size"
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user