Apple Silicon prevents execution of wine for Windows ARM64 binaries due to JIT/W^X restrictions and x18 register reservation

I am porting Wine to macOS to run Windows on ARM (WOA) binaries. Windows PE files place .text and .data in the same page, which macOS’s JIT/W^X model cannot handle. pthread_jit_write_protect_np() cannot be used for foreign ARM64 code. Apple Silicon reserves x18, breaking the Windows ARM64 ABI. Wine also must reserve 0x7FFE0000 for the Windows TEB, but macOS cannot guarantee this address. These issues make it impossible for Wine to load or execute WOA binaries. I am requesting mechanisms to safely execute foreign ARM64 code, support mixed W/X pages, emulate x18, and reserve the Windows TEB region.

Branch is here: https://github.com/trcrsired/wine/tree/apple-silicon-mac-woa

Let’s start with the easy one:

Apple Silicon reserves x18, breaking the Windows ARM64 ABI.

macOS 26.4 improved this situation. Check out os_set_custom_x18_abi_enabled and its extensive doc comments in <os/arch/arm64.h>.

pthread_jit_write_protect_np() cannot be used for foreign ARM64 code.

Can you explain what you mean by this?

Wine also must reserve 0x7FFE0000 for the Windows TEB, but macOS cannot guarantee this address.

Again, I’m not sure what you mean by this. macOS is generally pretty flexible when it comes to address space layout. What did you actually try here?

Have you filed bugs with Apple about any of this? If so, what were the bug numbers?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Apple Silicon prevents execution of wine for Windows ARM64 binaries due to JIT/W^X restrictions and x18 register reservation
 
 
Q