mirror of
https://github.com/FEX-Emu/FEX.git
synced 2025-02-10 00:55:55 +00:00
OpcodeDispatcher: optimize POP
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
This commit is contained in:
parent
900c62fa7b
commit
881c940693
@ -506,18 +506,8 @@ void OpDispatchBuilder::PUSHSegmentOp(OpcodeArgs) {
|
||||
}
|
||||
|
||||
void OpDispatchBuilder::POPOp(OpcodeArgs) {
|
||||
const uint8_t Size = GetSrcSize(Op);
|
||||
|
||||
auto Constant = _Constant(Size);
|
||||
auto OldSP = LoadGPRRegister(X86State::REG_RSP);
|
||||
auto NewGPR = _LoadMem(GPRClass, Size, OldSP, Size);
|
||||
auto NewSP = _Add(OpSize::i64Bit, OldSP, Constant);
|
||||
|
||||
// Store the new stack pointer
|
||||
StoreGPRRegister(X86State::REG_RSP, NewSP);
|
||||
|
||||
// Store what we loaded from the stack
|
||||
StoreResult(GPRClass, Op, NewGPR, -1);
|
||||
Ref Value = Pop(GetSrcSize(Op));
|
||||
StoreResult(GPRClass, Op, Value, -1);
|
||||
}
|
||||
|
||||
void OpDispatchBuilder::POPAOp(OpcodeArgs) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user