mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-14 21:00:42 +02:00
OpcodeDispatcher: optimize Thunk
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
This commit is contained in:
1 parent
a7dada457a
commit
ede13e37d9
1 file changed
+1
-7
@@ -123,13 +123,7 @@ void OpDispatchBuilder::ThunkOp(OpcodeArgs) {
|
||||
Thunk(LoadGPRRegister(X86State::REG_RCX), *reinterpret_cast<SHA256Sum*>(sha256));
|
||||
}
|
||||
|
||||
auto Constant = _Constant(GPRSize);
|
||||
auto OldSP = LoadGPRRegister(X86State::REG_RSP);
|
||||
auto NewRIP = _LoadMem(GPRClass, GPRSize, OldSP, GPRSize);
|
||||
Ref NewSP = _Add(IR::SizeToOpSize(GPRSize), OldSP, Constant);
|
||||
|
||||
// Store the new stack pointer
|
||||
StoreGPRRegister(X86State::REG_RSP, NewSP);
|
||||
auto NewRIP = Pop(GPRSize);
|
||||
|
||||
// Store the new RIP
|
||||
ExitFunction(NewRIP);
|
||||
|
||||
Reference in new issue
Block a user