mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-16 04:07:27 +02:00
OpcodeDispatcher: optimize POPF
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
This commit is contained in:
1 parent
6367554d30
commit
a7dada457a
1 file changed
+1
-8
@@ -3621,14 +3621,7 @@ void OpDispatchBuilder::PUSHFOp(OpcodeArgs) {
|
||||
|
||||
void OpDispatchBuilder::POPFOp(OpcodeArgs) {
|
||||
const uint8_t Size = GetSrcSize(Op);
|
||||
|
||||
auto Constant = _Constant(Size);
|
||||
auto OldSP = LoadGPRRegister(X86State::REG_RSP);
|
||||
Ref Src = _LoadMem(GPRClass, Size, OldSP, Size);
|
||||
auto NewSP = _Add(OpSize::i64Bit, OldSP, Constant);
|
||||
|
||||
// Store the new stack pointer
|
||||
StoreGPRRegister(X86State::REG_RSP, NewSP);
|
||||
Ref Src = Pop(Size);
|
||||
|
||||
// Add back our flag constants
|
||||
// Bit 1 is always 1
|
||||
|
||||
Reference in new issue
Block a user