GCC and LLVM have the errata for Arm processors explicitly stated in the code base, most common ones are controlled by a command line flag, such as
-mfix-cortex-a57-aes-1742098,
-mfix-cortex-a72-aes-1655431,
-mfix-cortex-a53-835769,
-mfix-cortex-a53-843419
The OpenJDK code base does not explicitly state which errata is being treated by the code (such as added byJDK-8079203, but there may be more occurrences). This makes it harder to maintain the codebase as it is unclear what the code is doing.
JDK-8079203 checks for generic Cortex-A53 and penalizes all Cortex-A53 processors. MIDR_EL1/REVIDR_EL1 registers may be used to check if an erratum applies. It would be beneficial to introduce the supporting code to query for these registers and only apply an erratum at runtime if required by a specific processor without penalizing the implementations which are not affected by an erratum.
Last, it would be great to review OpenJDK codegen and confirm if all the applicable errata for most commonly available Arm processors are present:
A53: https://developer.arm.com/documentation/epm048406/2100/?lang=en
A55: https://developer.arm.com/documentation/SDEN859338/1500/?lang=en
A57: https://developer.arm.com/documentation/epm049219/2300/?lang=en
A72: https://developer.arm.com/documentation/epm012079/11/?lang=en
A75: https://developer.arm.com/documentation/SDEN859515/i/?lang=en
A76: https://developer.arm.com/documentation/SDEN-885749/3200/?lang=en
N1: https://developer.arm.com/documentation/SDEN885747/latest/
V1: https://developer.arm.com/documentation/SDEN1401781/latest/
V2: https://developer.arm.com/documentation/SDEN2332927/latest/
N2: https://developer.arm.com/documentation/SDEN1982442/latest/
-mfix-cortex-a57-aes-1742098,
-mfix-cortex-a72-aes-1655431,
-mfix-cortex-a53-835769,
-mfix-cortex-a53-843419
The OpenJDK code base does not explicitly state which errata is being treated by the code (such as added by
Last, it would be great to review OpenJDK codegen and confirm if all the applicable errata for most commonly available Arm processors are present:
A53: https://developer.arm.com/documentation/epm048406/2100/?lang=en
A55: https://developer.arm.com/documentation/SDEN859338/1500/?lang=en
A57: https://developer.arm.com/documentation/epm049219/2300/?lang=en
A72: https://developer.arm.com/documentation/epm012079/11/?lang=en
A75: https://developer.arm.com/documentation/SDEN859515/i/?lang=en
A76: https://developer.arm.com/documentation/SDEN-885749/3200/?lang=en
N1: https://developer.arm.com/documentation/SDEN885747/latest/
V1: https://developer.arm.com/documentation/SDEN1401781/latest/
V2: https://developer.arm.com/documentation/SDEN2332927/latest/
N2: https://developer.arm.com/documentation/SDEN1982442/latest/
- relates to
-
JDK-8353237 [AArch64] Incorrect result of VectorizedHashCode intrinsic on Cortex-A53
-
- In Progress
-
-
JDK-8079203 aarch64 needs to cater for different partner implementations
-
- Resolved
-