-
-
Notifications
You must be signed in to change notification settings - Fork 249
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Opening this issue to track the problems preventing JIT on Windows from happening yet.
From my own experience, the problem is due to the difference between Windows calling convention and Sys-V.
- x86_64 Windows and x86_64 Sys-V passes arguments in different registers. A solution might be just keep using the Sys-V ABI in the JITted code and make a trampoline before returning to compiled Windows code.
- FS - GS register differences. Although as JIT already works on macOS (which also uses different FS/GS than Linux), I guess the same can be applied to Windows?
- x86_64 Sys-V requires a 128-byte red zone below
rsp, while x86_64 Windows does not. When jumping to JIT code, the value ofrspmust be 128 bytes lower than it is supposed to be, and all read/write operations involvingrspmust be hooked to modify the value. Things will get tricky when dealing with opcodes such ascall,...
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request