Make sure to not do pops at function end if from within custom dispatch for x86

This commit is contained in:
Ryan Houdek 2019-12-25 23:14:58 -08:00 committed by Stefanos Kornilios Mitsis Poiitidis
parent 18c5a3d6e5
commit 07faaaa0fd

View File

@ -279,12 +279,15 @@ void *JITCore::CompileCode([[maybe_unused]] FEXCore::IR::IRListView<true> const
if (SpillSlots) {
add(rsp, SpillSlots * 16);
}
pop(r15);
pop(r14);
pop(r13);
pop(r12);
pop(rbp);
pop(rbx);
if (!CustomDispatchGenerated) {
pop(r15);
pop(r14);
pop(r13);
pop(r12);
pop(rbp);
pop(rbx);
}
#ifdef BLOCKSTATS
ExitBlock();
#endif
@ -1436,6 +1439,7 @@ void *JITCore::CompileCode([[maybe_unused]] FEXCore::IR::IRListView<true> const
case IR::OP_CPUID: {
auto Op = IROp->C<IR::IROp_CPUID>();
using ClassPtrType = FEXCore::CPUIDEmu::FunctionResults (FEXCore::CPUIDEmu::*)(uint32_t Function);
union {
ClassPtrType ClassPtr;