-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
8279301: c1 getObjectSize intrinsic should guard round mask constant #7076
Conversation
👋 Welcome back snazarki! A progress list of the required criteria for merging this PR into |
@snazarkin 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.
I think all uses of logical_and
should be reconsidered too. I see that LIRGenerator::load_immediate
does additional checks for T_LONG
on AArch64 and PPC64. But doing it right now would probably fail due to LIRGenerator::load_immediate
accepting int
, truncating the long mask!
I submitted the more generic bug here: https://bugs.openjdk.java.net/browse/JDK-8280003. Current ARM32 point fix looks fine, but you can also choose to close this one as duplicate, and help on more generic thing.
@@ -1420,7 +1420,9 @@ void LIRGenerator::do_getObjectSize(Intrinsic* x) { | |||
#else | |||
__ add(length_int, header_size, length_int); | |||
if (round_mask != 0) { | |||
__ logical_and(length_int, LIR_OprFact::intConst(~round_mask), length_int); | |||
// generates LIR_Const if mask fits instruction requirement |
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.
I think the comment here is excessive, especially given other uses of logical_and
that would probably get fixed too.
@snazarkin 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 71 new commits pushed to the
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. As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@shipilev) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
Withdraw in favor of pr/7080 |
This is the fix for the issue that was found during the test of arm32 (see JDK-8279300). Constant verification was added to the arm32 specific code but root cause was not fixed: the constant for logical AND op can't be encoded directly and should be loaded to a register. load_immediate function is sophisticated enough and able to generate LIR_Const on the platforms where it is possible, and load op for arm32.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/7076/head:pull/7076
$ git checkout pull/7076
Update a local copy of the PR:
$ git checkout pull/7076
$ git pull https://git.openjdk.java.net/jdk pull/7076/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 7076
View PR using the GUI difftool:
$ git pr show -t 7076
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/7076.diff