JEP 391: macOS/AArch64 Port

AuthorsAnton Kozlov, Vladimir Kempik
OwnerVladimir Kempik
StatusClosed / Delivered
Componenthotspot / runtime
Discussionaarch64 dash port dash dev at openjdk dot java dot net
DependsJEP 388: Windows/AArch64 Port
Reviewed byAndrew Haley, Vladimir Kozlov
Endorsed byVladimir Kozlov
Created2020/08/07 07:08
Updated2024/07/04 16:43


Port the JDK to macOS/AArch64.



Apple has announced a long-term plan to transition their line of Macintosh computers from x64 to AArch64. We therefore expect to see broad demand for a macOS/AArch64 port of the JDK.

Although it will be possible to run a macOS/x64 build of the JDK on AArch64-based systems via macOS's built-in Rosetta 2 translator, the translation will almost certainly introduce a significant performance penalty.


An AArch64 port already exists for Linux (JEP 237), and work is underway on an AArch64 port for Windows (JEP 388). We expect to reuse existing AArch64 code from these ports by employing conditional compilation — as is usual in ports of the JDK — to accommodate differences in low-level conventions such as the application binary interface (ABI) and the set of reserved processor registers.

macOS/AArch64 forbids memory segments from being executable and writeable at the same time, a policy known as write-xor-execute (W^X). The HotSpot VM routinely creates and modifies executable code, so this JEP will implement W^X support in HotSpot for macOS/AArch64.


Testing will include, but not be limited to, compatibility testing with the TCK, regression testing with jtreg, and validation with applications. The execution environment will include development platforms available from Apple as well as consumer hardware, once it becomes available.

Risks and Assumptions


The macOS/AArch64 port and the Windows/AArch64 port (JEP 388) will likely share some code. Some parts of this JEP will depend upon the integration of JEP 388, while other parts can be developed in parallel.