mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-06 13:00:15 +02:00
ARM64EC: Implement BeginSimulation
This is used by the kernel (or UNIX side of ntdll in wine) to jump into x86 code with the given context as is necessary when e.g. returning from an exception.
This commit is contained in:
1 parent
8e0fdfc325
commit
f964a5187e
2 files changed
+68
No files matched your search
@@ -37,6 +37,15 @@ enter_jit:
|
||||
ldr x16, [x17, #0x40] // ChpeV2CpuAreaInfo->EmulatorData[2] - DispatcherLoopTopEnterEC
|
||||
br x16 // DispatcherLoopTopEnterEC(RIP:x9, CPUArea:x17)
|
||||
|
||||
// Invoked by KiUserEmulationDispatcher after e.g. an NtContinue to x86 code
|
||||
// Expects a CONTEXT pointer in x0
|
||||
.global BeginSimulation
|
||||
BeginSimulation:
|
||||
bl "#SyncThreadContext"
|
||||
ldr x17, [x18, #0x1788] // TEB->ChpeV2CpuAreaInfo
|
||||
ldr x16, [x17, #0x48] // ChpeV2CpuAreaInfo->EmulatorData[3] - DispatcherLoopTopEnterECFillSRA
|
||||
br x16 // DispatcherLoopTopEnterECFillSRA(CPUArea:x17)
|
||||
|
||||
// Called into by FEXCore
|
||||
// Expects the target code address in x9
|
||||
.global ExitFunctionEC
|
||||
|
||||
Reference in new issue
Block a user