MCPcopy Create free account
hub / github.com/FEX-Emu/FEX / HandleSyscall

Method HandleSyscall

Source/Windows/WOW64/Module.cpp:467–475  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

465 }
466
467 uint64_t HandleSyscall(FEXCore::Core::CpuStateFrame* Frame, FEXCore::HLE::SyscallArguments* Args) override {
468 // Stash the the context pointer on the stack, as Simulate can be called from this syscall handler which would overwrite it
469 CONTEXT* EntryContext = GetTLS().EntryContext();
470 // Call the syscall handler with unwind information pointing to Simulate as its caller
471 uint64_t Ret = SEHFrameTrampoline2Args(reinterpret_cast<void*>(Frame), reinterpret_cast<void*>(Args),
472 reinterpret_cast<void*>(&HandleSyscallImpl), EntryContext->Sp, EntryContext->Pc);
473 GetTLS().EntryContext() = EntryContext;
474 return Ret;
475 }
476
477 FEXCore::HLE::SyscallABI GetSyscallABI(uint64_t Syscall) override {
478 return {.NumArgs = 0, .HasReturn = false, .HostSyscallNumber = -1};

Callers

nothing calls this directly

Calls 2

GetTLSFunction · 0.85
SEHFrameTrampoline2ArgsFunction · 0.85

Tested by

no test coverage detected