JDK-8270830 : Aarch64: Use stp to initialize object on C1
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 18
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: aarch64
  • Submitted: 2021-07-16
  • Updated: 2022-05-27
  • Resolved: 2022-05-27
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.
Other
tbdFixed
Related Reports
Relates :  
Description
It is found that in C1_MacroAssembler::initialize_object which we can use stp to replace str.
@@ -250,13 +249,16 @@ void C1_MacroAssembler::initialize_object(Register obj, Register klass, Register
        for (int i = -unroll; i < 0; i++) {
          if (-i == remainder)
            bind(entry_point);
-         str(zr, Address(rscratch1, i * wordSize));
+         stp(zr, zr, Address(rscratch1, i * 2 * BytesPerWord));
Comments
8270947 obsoletes this bug.
27-05-2022

I think this is no longer true since https://bugs.openjdk.java.net/browse/JDK-8270947 .
26-05-2022

As the pull request was closed for the time being, I'm updating the fix version to tbd.
16-11-2021