IT

Windows on Arm: how Arm64EC and x64 emulation run in one app

Windows on Arm can run native Arm and emulated x64 code in the same process thanks to Arm64EC, outperforming Apple's approach.

·1 min read
Windows on Arm: how Arm64EC and x64 emulation run in one app

Windows on Arm features a capability that Apple Silicon Macs never offered: the ability to run native Arm code alongside emulated x64 code within a single process. This feat is made possible by a specialized binary interface known as Arm64EC.

Qisqacha / Кратко: - Arm64EC allows native Arm code and x64 code to run inside the same application process. - The solution bypasses the traditional all-or-nothing porting barrier, particularly for third-party plugins. - Compiled Arm64EC apps identify themselves as x64 to architecture checks for seamless integration.

Announced by Microsoft in 2021 alongside Windows 11 on Arm, Arm64EC (Emulation Compatible) lets developers recompile parts of their applications natively while continuing to load x64 dependencies. For instance, Microsoft's own 64-bit Office for Arm uses this to ensure that existing x64 add-ins and audio plugins continue to function without requiring third-party developers to rebuild everything from scratch.

Implementing this hybrid approach required overcoming significant architectural differences, particularly regarding CPU registers and stack layouts. Because Windows core APIs rely on x64 assumptions, Microsoft mapped Arm registers to fit into traditional x64 CONTEXT structures. Specialized conversion glue code known as entry and exit thunks, along with a runtime call checker, route function calls between native Arm64EC blocks and emulated x64 routines dynamically.

For developers and businesses adopting modern hardware platforms, this mechanism significantly lowers the friction of transitioning to energy-efficient Arm chips. By solving the longstanding problem of broken plugin dependencies at the system level, Arm64EC ensures that complex legacy workflows remain viable on next-generation computing hardware.

Source: XDA

Related articles