JDK-8347917 : AArch64: Enable upper GPR registers in C1
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 25
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • CPU: aarch64
  • Submitted: 2025-01-16
  • Updated: 2025-02-18
  • Resolved: 2025-02-14
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 25
25 masterFixed
Related Reports
Causes :  
Relates :  
Relates :  
Description
The ะก2 compiler uses almost all general purpose registers. Even r27 (rheapbase) and r29 (fp) are enabled conditionally (JDK-8233743 [0]).

R19-r29 are callee-saved in the native ABI, but in C2 all non-special registers are caller-saved (see comment in aarch64.ad [1]) and stubs handle the appropriate transitions.

The C1 compiler only uses r0-r18 on AArch64. r19-r26 are currently declared as callee-saved and not used. So r19-r26 can be declared as caller-saved and enabled. r29 (fp) is already handled in MacroAssembler::build_frame()/remove_frame() [2]. r27 (rheapbase) can be declared caller-saved. r27 and r29 (fp) can be enabled conditionally similar to C2.

[0] https://bugs.openjdk.org/browse/JDK-8233743
[1] https://github.com/openjdk/jdk/blob/d23ad01319ba298cc0ddcc2424abac8071840338/src/hotspot/cpu/aarch64/aarch64.ad#L74
[2] https://github.com/openjdk/jdk/blob/d23ad01319ba298cc0ddcc2424abac8071840338/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp#L5710
Comments
Changeset: 57f4c30f Branch: master Author: Dmitry Chuyko <dchuyko@openjdk.org> Date: 2025-02-14 07:54:44 +0000 URL: https://git.openjdk.org/jdk/commit/57f4c30fb6be1da57c8fcc742b5c36d842eef397
14-02-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/23152 Date: 2025-01-16 12:26:43 +0000
16-01-2025