-
Notifications
You must be signed in to change notification settings - Fork 150
8269879: [PPC64] C2: Math.rint intrinsic uses wrong rounding mode #215
Conversation
👋 Welcome back mdoerr! A progress list of the required criteria for merging this PR into |
@TheRealMDoerr The following label will be automatically applied to this pull request:
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes look good so far.
You are mentioning that the now used instruction is available from Power7 and that for older versions of the Power spec, the intrinsic should be disabled. I am missing such a change, probably in vm_version_ppc.cpp.
Furthermore, you mention that the instruction needs a special (non-default) setting of the rounding mode control flags. How can such flag setting be assured?
Thanks, Lutz
Thanks!
See change in Matcher::match_rule_supported(int opcode).
No, it's the default setting (see referenced ABI chapters). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your clarification! My "prefabricated" opinion blurred the sights on reality. All fine!
@TheRealMDoerr 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:
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 2 new commits pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the ➡️ To integrate this PR with the above commit message to the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks for the reviews! |
Going to push as commit 1f2bf1d.
Your commit was automatically rebased without conflicts. |
@TheRealMDoerr Pushed as commit 1f2bf1d. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
We need to replace the frin and xvrdpi instructions which use a wrong rounding mode. xvrdpic is available with Power7. We can simply switch off RoundDoubleMode intrinsics for older processors (which are outdated).
Note that xvrdpic requires RN=0b00 to use the correct rounding mode. These 2 bits are 0 by default (see "Registers Specified during Process Initialization" in [1]) and are treated as "Limited-Access Bits" (see "2.2.1.2. Limited-Access Bits" in [1] for preservation rules).
[1] "64-Bit ELF V2 ABI Specification" http://cdn.openpowerfoundation.org/wp-content/uploads/resources/leabi/leabi-20170510.pdf
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk17 pull/215/head:pull/215
$ git checkout pull/215
Update a local copy of the PR:
$ git checkout pull/215
$ git pull https://git.openjdk.java.net/jdk17 pull/215/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 215
View PR using the GUI difftool:
$ git pr show -t 215
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk17/pull/215.diff