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

Use 32-bit XOR to zero registers in x64 #19320

Merged
merged 1 commit into from
May 8, 2024

Conversation

R2steven
Copy link
Contributor

Swept through x86 codegen and replaced XORRegReg with XOR4RegReg when used to zero a register

Closes #19236
Signed-off-by: Ryan Stevens restevens52@gmail.com

@R2steven R2steven marked this pull request as draft April 18, 2024 20:14
@R2steven R2steven marked this pull request as ready for review April 18, 2024 20:15
@R2steven R2steven changed the title WIP Use 32-bit XOR to zero registers in x64 Use 32-bit XOR to zero registers in x64 Apr 18, 2024
@BradleyWood BradleyWood self-requested a review April 24, 2024 14:20
Copy link
Member

@BradleyWood BradleyWood left a comment

Choose a reason for hiding this comment

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

Looks good. I found two missing cases in AMD64JNILinkage.cpp

@R2steven
Copy link
Contributor Author

Thanks @BradleyWood, I wasn't sure whether the x/amd64 folder was meant to generate code to run on an x86 machine. I also noticed a PXORRegReg instruction in J9TreeEvaluator.cpp. Do you happen to know if this instruction is already 32 bit, or is it 64 bit and I should look into optimizing it?

@BradleyWood
Copy link
Member

I also noticed a PXORRegReg instruction in J9TreeEvaluator.cpp.

No, that is a vector instruction and wouldn't apply to this issue.

@0xdaryl Can you launch a build?

@0xdaryl
Copy link
Contributor

0xdaryl commented Apr 29, 2024

Jenkins test sanity xlinux,win,xmac jdk21

@BradleyWood
Copy link
Member

@0xdaryl Failures are infrastructure related

@0xdaryl
Copy link
Contributor

0xdaryl commented May 4, 2024

Changes appear fine. Please squash your commits.

Swept through x86 codegen and replaced XORRegReg with XOR4RegReg when used to zero a register

Fix missing cases in AMD64JNILinkage
converted XORRegReg() to XOR4RegReg in AMD64JNILinkage.cpp

closes eclipse-openj9#19236
Signed-off-by: Ryan Stevens <restevens52@gmail.com>
@0xdaryl
Copy link
Contributor

0xdaryl commented May 6, 2024

Jenkins test sanity xlinux,win,xmac jdk21

@R2steven
Copy link
Contributor Author

R2steven commented May 7, 2024

failures appear to be infrastructure related again.

@0xdaryl
Copy link
Contributor

0xdaryl commented May 8, 2024

Windows testing succeeded. Linux and Mac still afflicted by UNB outage. Changes look safe to me.

@0xdaryl 0xdaryl merged commit 9eb718e into eclipse-openj9:master May 8, 2024
6 of 9 checks passed
@BradleyWood
Copy link
Member

@R2steven If you are interested, we have a similar issue in eclipse/omr#7295

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use 32-bit XORRegReg to zero registers on x64
3 participants