JEP draft: Arm64e support for MacOS/AArch64

OwnerAlan Hayward
Componenthotspot / compiler
Created2021/03/24 15:43
Updated2021/03/29 09:30


Implement Arm64e on MacOS/AArch64


PAC (Pointer Authentication Code) is an AArch64 hardware feature which provides a set of tools to guard against various types of attacks at the cost of a small performance overhead. For more details see the Arm® Architecture Reference Manual : D5.1.5 Pointer authentication in AArch64 state For a general background see Providing protection for complex software

MacOS on Apple silicon provides an additional ABI named arm64e. It is enabled/disabled on OS boot. More detail of the ABI can be found here. In addition to PAC-RET protection (as provided by GCC/LLVM) it signs function pointers and gives application writers the ability to sign data pointers. Using fat binaries, applications can be compiled for both arm64 and arm64e, allowing binaries to conform to both ABIs. OpenJDK should also conform to this ABI.

Description Provide arm64e support for both the VM and generated JIT code.

Due to the Arm64 and Arm64e variants being compiled separately, unlike in the Linux implementation, the decision whether to plant PAC instructions can be made using an #ifdef. The Arm64 version will be required to plant any PAC instructions. This means the Arm64e version is not restricted to only using the PAC NOP instructions.


Testing will include, but not be limited to, regression testing with jtreg and various other benchmark suites. The execution environment will include Apple Silicon as well as any additional hardware that becomes available, in both arm64 and arm64e modes.

Risks and Assumptions

Assumption: Implementing this change will result in an acceptable performance overhead on all MacOS/AArch64 systems.

Assumption: Official OpenJDK releases for for MacOS/AArch64 will be built without disabling fat binary support.


This JEP will reuse code from JEP PAC-RET protection for Linux/AArch64. Future PAC work will be dependant on this JEP.