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
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
- causes
-
JDK-8350258 AArch64: Client build fails after JDK-8347917
-
- Resolved
-
- relates to
-
JDK-8350085 RISC-V: Enable upper GPR registers in C1
-
- Open
-
-
JDK-8233743 AArch64: Make r27 conditionally allocatable
-
- Resolved
-
- links to
-
Commit(master) openjdk/jdk/57f4c30f
-
Review(master) openjdk/jdk/23152