-
Notifications
You must be signed in to change notification settings - Fork 6.1k
8330844: Add aliases for conditional jumps and additional instruction forms for x86 #18893
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
Conversation
|
👋 Welcome back sgibbons! A progress list of the required criteria for merging this PR into |
|
@asgibbons 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 30 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 (@vnkozlov, @eme64, @sviswa7) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
|
@asgibbons 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. |
|
/label hotspot-compiler |
|
@asgibbons |
|
This is a precursor for JDK-8320448, essentially adding infrastructure requirements for that algorithm. |
Webrevs
|
I am not sure I understand why you need to move it. Your changes for JDK-8320448 shows that new code is used only by C2. You can move your new code in stubGenerator_x86_64.cpp into the part under |
|
Adding the |
|
Can you also remove changes in |
| assert((!expand_ary2) || ((expand_ary2) && (UseAVX == 2)), | ||
| "Expansion only implemented for AVX2"); |
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.
BTW, the check in assert could be simplified: (!expand_ary2 || UseAVX == 2)
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 thought this would make the intent explicitly clear.
|
A large part of this PR was to lessen the burden of reviewing JDK-8320448 changes. Am I hearing you say that this approach is not desired? The other PR is a big review and I was hoping to piecemeal some non-core algorithm changes in to make the review easier. It is, of course, trivial to revert the change to arrays_equals. Please let me know your final decision. Thanks. |
I am for splitting big PRs if possible. And you are not limited how many self-containing sub-PRs you can create. I consider this PR should address what in its title: aliases for jump instructions and adding missing cmp/jump instructions (which is related). Any changes to not related code, like arrays_equals, do not belong here. It could be separate sub-PR or even followup PR. |
|
OK. arrays_equals changes reverted. |
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.
Good.
|
/integrate Thanks! |
|
@asgibbons |
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.
Looks reasonable. Can you apply the indentation issue, please?
| // * No condition for this * void ALWAYSINLINE jcxz(Label& L, bool maybe_short = true) { jcc(Assembler::cxz, L, maybe_short); } | ||
| // * No condition for this * void ALWAYSINLINE jecxz(Label& L, bool maybe_short = true) { jcc(Assembler::cxz, L, maybe_short); } | ||
|
|
||
| // Short versions of the above |
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.
| // * No condition for this * void ALWAYSINLINE jcxz(Label& L, bool maybe_short = true) { jcc(Assembler::cxz, L, maybe_short); } | |
| // * No condition for this * void ALWAYSINLINE jecxz(Label& L, bool maybe_short = true) { jcc(Assembler::cxz, L, maybe_short); } | |
| // Short versions of the above | |
| // * No condition for this * void ALWAYSINLINE jcxz(Label& L, bool maybe_short = true) { jcc(Assembler::cxz, L, maybe_short); } | |
| // * No condition for this * void ALWAYSINLINE jecxz(Label& L, bool maybe_short = true) { jcc(Assembler::cxz, L, maybe_short); } | |
| // Short versions of the above |
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.
Everywhere else it is indented, so it would be nice if this kept the style
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.
Done
| // * No condition for this * void ALWAYSINLINE jcxz_b(Label& L) { jccb(Assembler::cxz, L); } | ||
| // * No condition for this * void ALWAYSINLINE jecxz_b(Label& L) { jccb(Assembler::cxz, L); } |
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.
| // * No condition for this * void ALWAYSINLINE jcxz_b(Label& L) { jccb(Assembler::cxz, L); } | |
| // * No condition for this * void ALWAYSINLINE jecxz_b(Label& L) { jccb(Assembler::cxz, L); } | |
| // * No condition for this * void ALWAYSINLINE jcxz_b(Label& L) { jccb(Assembler::cxz, L); } | |
| // * No condition for this * void ALWAYSINLINE jecxz_b(Label& L) { jccb(Assembler::cxz, L); } |
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.
Done
|
Thanks for the update. I can sponsor as soon as you attempt integration again. |
|
Thank you. I'm waiting on @sviswa7 review before integrating again |
| Assembler::vpcmpeqb(dst, nds, src, vector_len); | ||
| } | ||
|
|
||
| void MacroAssembler::vpcmpeqb(XMMRegister dst, XMMRegister src1, Address src2, int vector_len) { |
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 assert is missing here:
assert(((dst->encoding() < 16 && src1->encoding() < 16) || VM_Version::supports_avx512vlbw()),"XMM register should be 0-15");
| // Adding more natural conditional jump instructions | ||
| void ALWAYSINLINE jo(Label& L, bool maybe_short = true) { jcc(Assembler::overflow, L, maybe_short); } | ||
| void ALWAYSINLINE jno(Label& L, bool maybe_short = true) { jcc(Assembler::noOverflow, L, maybe_short); } | ||
| void ALWAYSINLINE js(Label& L, bool maybe_short = true) { jcc(Assembler::positive, L, maybe_short); } |
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.
Isn't js -> jump is sign flag is set -> Assembler::negative?
Correspondingly jns, js_b, jns_b should also be corrected.
| emit_int8(0x66); | ||
| prefix(dst, reg); | ||
| emit_int8((unsigned char)0x39); | ||
| emit_operand(reg, dst, 1); |
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.
This should be emit_operand(reg, dst, 0);
| void Assembler::vpcmpeqw(XMMRegister dst, XMMRegister nds, Address src, int vector_len) { | ||
| assert(vector_len == AVX_128bit ? VM_Version::supports_avx() : VM_Version::supports_avx2(), ""); |
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.
InstructionMark missing in this instruction which takes Address as operand?
| emit_int16(0x74, (0xC0 | encode)); | ||
| } | ||
|
|
||
| void Assembler::vpcmpeqb(XMMRegister dst, XMMRegister src1, Address src2, int vector_len) { |
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.
InstructionMark missing in this instruction as well.
|
@sviswa7 Thanks for the good catches. Fixed. |
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.
Looks good to me.
|
Thanks! /integrate |
|
@asgibbons |
|
/sponsor |
|
Going to push as commit 7a89555.
Your commit was automatically rebased without conflicts. |
|
@sviswa7 @asgibbons Pushed as commit 7a89555. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Adding infrastructure for JDK-8320448. Aliasing conditional jump instructions; adding some x86 instructions.
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/18893/head:pull/18893$ git checkout pull/18893Update a local copy of the PR:
$ git checkout pull/18893$ git pull https://git.openjdk.org/jdk.git pull/18893/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 18893View PR using the GUI difftool:
$ git pr show -t 18893Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/18893.diff
Webrev
Link to Webrev Comment