Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8324874: AArch64: crypto pmull based CRC32/CRC32C intrinsics clobber V8-V15 registers #17701

Closed
wants to merge 2 commits into from

Conversation

eastig
Copy link
Member

@eastig eastig commented Feb 4, 2024

JDK-8302113 and JDK-8302783 enhanced CRC32/CRC32C intrinsics with crypto pmull which is enabled for Neoverse V1 and V2. The intrinsics use kernel_crc32_common_fold_using_crypto_pmull which uses v8-v15 registers and potentially clobbers them if they are not saved before CRC32/CRC32C intrinsics are called.

According to the latest “ABI for the Arm 64-bit Architecture with SVE support”: https://github.com/ARM-software/abi-aa/blob/main/aapcs64/aapcs64.rst

Registers v8-v15 must be preserved by a callee across subroutine calls;
the remaining registers (v0-v7, v16-v31) do not need to be preserved
(or should be preserved by the caller).

This PR reallocates registers to avoid v8-v15 registers:

  • v0-v7 are used for data.
  • v16-v31 are tmp registers.

Regression tests are added.
Tested a fastdebug build on Graviton 3:

  • gtest: Passed
  • tier1..tier3: Passed

Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8324874: AArch64: crypto pmull based CRC32/CRC32C intrinsics clobber V8-V15 registers (Bug - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/17701/head:pull/17701
$ git checkout pull/17701

Update a local copy of the PR:
$ git checkout pull/17701
$ git pull https://git.openjdk.org/jdk.git pull/17701/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 17701

View PR using the GUI difftool:
$ git pr show -t 17701

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/17701.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Feb 4, 2024

👋 Welcome back eastigeevich! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the rfr Pull request is ready for review label Feb 4, 2024
@openjdk
Copy link

openjdk bot commented Feb 4, 2024

@eastig The following label will be automatically applied to this pull request:

  • hotspot

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the hotspot hotspot-dev@openjdk.org label Feb 4, 2024
@mlbridge
Copy link

mlbridge bot commented Feb 4, 2024

Webrevs

@eastig
Copy link
Member Author

eastig commented Feb 4, 2024

@theRealAph @nick-arm Could you please review the PR?

Copy link
Contributor

@theRealAph theRealAph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. This bug really shouldn't have got through review.

@openjdk
Copy link

openjdk bot commented Feb 5, 2024

@eastig This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8324874: AArch64: crypto pmull based CRC32/CRC32C intrinsics clobber V8-V15 registers

Reviewed-by: aph, ngasson

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 15 new commits pushed to the master branch:

  • 51671c0: 8323809: Serial: Refactor card table verification
  • cdf918b: 8325134: Serial: Remove Generation::used_region
  • 4da28b4: 8291809: Convert compiler/c2/cr7200264/TestSSE2IntVect.java to IR verification test
  • 0377f1a: 8325133: Missing MEMFLAGS parameter in parts of os API
  • df35462: 8323502: javac crash with wrongly typed method block in Flow
  • af32262: 8325049: stubGenerator_ppc.cpp should use alignas
  • 85e3201: 8325159: C2 SuperWord: measure time for CITime
  • 8796f43: 8315762: Update subtype check profile collection on s390x following 8308869
  • 80642dd: 8324817: Parallel GC does not pre-touch all heap pages when AlwaysPreTouch enabled and large page disabled
  • 692c9f8: 8325201: (zipfs) Disable TestPosix.setPermissionsShouldConvertToUnix which fails on Windows
  • ... and 5 more: https://git.openjdk.org/jdk/compare/adc36040278049b118ea49fba41cb4bcfb9b85f2...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Feb 5, 2024
@eastig
Copy link
Member Author

eastig commented Feb 6, 2024

/integrate

@openjdk
Copy link

openjdk bot commented Feb 6, 2024

Going to push as commit 4cd3187.
Since your change was applied there have been 34 commits pushed to the master branch:

  • b02599d: 8298046: Fix hidden but significant trailing whitespace in properties files for serviceability code
  • 6d911f6: 8317299: safepoint scalarization doesn't keep track of the depth of the JVM state
  • 542b0b6: 8324126: Error message for mistyping -XX:+Unlock...Options is not helpful
  • 9ee9f28: 8325213: Flags introduced by configure script are not passed to ADLC build
  • 729ae1d: 8325266: Enable this-escape javac warning in jdk.javadoc
  • e0fd3f4: 8325081: Move '_soft_ref_policy' to 'CollectedHeap'
  • f1f9398: 8323699: MessageFormat.toPattern() generates non-equivalent MessageFormat pattern
  • ab3b941: 8325270: ProblemList two compiler/intrinsics/float16 tests that fail due to JDK-8324724
  • f31957e: 8317636: Improve heap walking API tests to verify correctness of field indexes
  • fd3042a: 8318566: Heap walking functions should not use FilteredFieldStream
  • ... and 24 more: https://git.openjdk.org/jdk/compare/adc36040278049b118ea49fba41cb4bcfb9b85f2...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Feb 6, 2024
@openjdk openjdk bot closed this Feb 6, 2024
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Feb 6, 2024
@openjdk
Copy link

openjdk bot commented Feb 6, 2024

@eastig Pushed as commit 4cd3187.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@eastig
Copy link
Member Author

eastig commented Feb 8, 2024

@theRealAph @nick-arm Thank you for reviewing.

@eastig
Copy link
Member Author

eastig commented Feb 8, 2024

/backport jdk21u

@openjdk
Copy link

openjdk bot commented Feb 8, 2024

@eastig the backport was successfully created on the branch backport-eastig-4cd31875 in my personal fork of openjdk/jdk21u. To create a pull request with this backport targeting openjdk/jdk21u:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit 4cd31875 from the openjdk/jdk repository.

The commit being backported was authored by Evgeny Astigeevich on 6 Feb 2024 and was reviewed by Andrew Haley and Nick Gasson.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk21u:

$ git fetch https://github.com/openjdk-bots/jdk21u.git backport-eastig-4cd31875:backport-eastig-4cd31875
$ git checkout backport-eastig-4cd31875
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk21u.git backport-eastig-4cd31875

⚠️ @eastig You are not yet a collaborator in my fork openjdk-bots/jdk21u. An invite will be sent out and you need to accept it before you can proceed.

@eastig
Copy link
Member Author

eastig commented Feb 8, 2024

/backport jdk21u-dev

@openjdk
Copy link

openjdk bot commented Feb 8, 2024

@eastig the backport was successfully created on the branch backport-eastig-4cd31875 in my personal fork of openjdk/jdk21u-dev. To create a pull request with this backport targeting openjdk/jdk21u-dev:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit 4cd31875 from the openjdk/jdk repository.

The commit being backported was authored by Evgeny Astigeevich on 6 Feb 2024 and was reviewed by Andrew Haley and Nick Gasson.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk21u-dev:

$ git fetch https://github.com/openjdk-bots/jdk21u-dev.git backport-eastig-4cd31875:backport-eastig-4cd31875
$ git checkout backport-eastig-4cd31875
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk21u-dev.git backport-eastig-4cd31875

⚠️ @eastig You are not yet a collaborator in my fork openjdk-bots/jdk21u-dev. An invite will be sent out and you need to accept it before you can proceed.

@TobiHartmann
Copy link
Member

/backport jdk22u

@openjdk
Copy link

openjdk bot commented Apr 10, 2024

@TobiHartmann the backport was successfully created on the branch backport-TobiHartmann-4cd31875 in my personal fork of openjdk/jdk22u. To create a pull request with this backport targeting openjdk/jdk22u:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit 4cd31875 from the openjdk/jdk repository.

The commit being backported was authored by Evgeny Astigeevich on 6 Feb 2024 and was reviewed by Andrew Haley and Nick Gasson.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk22u:

$ git fetch https://github.com/openjdk-bots/jdk22u.git backport-TobiHartmann-4cd31875:backport-TobiHartmann-4cd31875
$ git checkout backport-TobiHartmann-4cd31875
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk22u.git backport-TobiHartmann-4cd31875

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot hotspot-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

4 participants