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

Method InitThreadPointers

FEXCore/Source/Interface/Core/Dispatcher/Dispatcher.cpp:1078–1103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1076}
1077
1078void Dispatcher::InitThreadPointers(FEXCore::Core::InternalThreadState* Thread) {
1079 // Setup dispatcher specific pointers that need to be accessed from JIT code
1080 {
1081 auto& Common = Thread->CurrentFrame->Pointers.Common;
1082
1083 Common.DispatcherLoopTop = AbsoluteLoopTopAddress;
1084 Common.DispatcherLoopTopFillSRA = AbsoluteLoopTopAddressFillSRA;
1085 Common.DispatcherLoopTopEnterEC = AbsoluteLoopTopAddressEnterEC;
1086 Common.DispatcherLoopTopEnterECFillSRA = AbsoluteLoopTopAddressEnterECFillSRA;
1087 Common.ExitFunctionLinker = ExitFunctionLinkerAddress;
1088 Common.ThreadStopHandlerSpillSRA = ThreadStopHandlerAddressSpillSRA;
1089 Common.ThreadPauseHandlerSpillSRA = ThreadPauseHandlerAddressSpillSRA;
1090 Common.GuestSignal_SIGILL = GuestSignal_SIGILL;
1091 Common.GuestSignal_SIGTRAP = GuestSignal_SIGTRAP;
1092 Common.GuestSignal_SIGSEGV = GuestSignal_SIGSEGV;
1093 Common.SignalReturnHandler = SignalHandlerReturnAddress;
1094 Common.SignalReturnHandlerRT = SignalHandlerReturnAddressRT;
1095
1096 auto& AArch64 = Thread->CurrentFrame->Pointers.AArch64;
1097 AArch64.LUDIVHandler = LUDIVHandlerAddress;
1098 AArch64.LDIVHandler = LDIVHandlerAddress;
1099
1100 // Fill in the fallback handlers
1101 InterpreterOps::FillFallbackIndexPointers(Common.FallbackHandlerPointers, &ABIPointers[0]);
1102 }
1103}
1104
1105SignalDelegatorConfig Dispatcher::MakeSignalDelegatorConfig() const {
1106 // PF/AF are the final two SRA registers. We only want GPRs

Callers 1

InitializeCompilerMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected