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

AArch64: Implement unsafe helper functions #3502

Merged
merged 1 commit into from
Feb 13, 2019

Conversation

knn-k
Copy link
Contributor

@knn-k knn-k commented Oct 31, 2018

This commit implements the unsafe helper functions for aarch64.

Signed-off-by: knn-k konno@jp.ibm.com

@knn-k
Copy link
Contributor Author

knn-k commented Nov 1, 2018

The Travis CI build failed with:

DeadTreesElimination.cpp:742:39: error: ‘class TR::ILOpCode’ has no member named ‘isPackedExponentiation’
                if (child->getOpCode().isPackedExponentiation())

This is not caused by this commit.

@hangshao0
Copy link
Contributor

I guess you also need to add vpath to module.xml for AArch64:
https://github.com/eclipse/openj9/blob/master/runtime/vm/module.xml#L148toL150

@hangshao0
Copy link
Contributor

There are also changes required in https://github.com/eclipse/openj9/blob/master/runtime/vm/gphandle.c#L238 that handles SIGBUS from the unsafe helpers.

The idea is that when SIGBUS is triggered from accessing the invalid address in the unsafe helpers, we know the UNSAFE_TARGET_REGISTER (x0 here) has the invalid address, then we update this register to an writable/readable but garbage address on stack, so that we can bypass the offending instruction and turn SIGBUS into an exception.

If you are not making the above change in this PR, please put some comments in unsafeHelper.s and gphandle.c saying that this needs to be done on AArch64.

@knn-k
Copy link
Contributor Author

knn-k commented Nov 2, 2018

@hangshao0 Thanks for your comments.

I will add vpath to module.xml. What should the spec name be for AArch64? I would say linux_aarch64. I guess I also have to put a new file in openj9/buildspecs with the same name (I am not going to do that in this PR) -- Correct?

@knn-k
Copy link
Contributor Author

knn-k commented Nov 2, 2018

Updated files reflecting the comments.

@hangshao0
Copy link
Contributor

What should the spec name be for AArch64? I would say linux_aarch64

I am fine with this name.

I guess I also have to put a new file in openj9/buildspecs with the same name (I am not going to do that in this PR) -- Correct?

Yes.

Copy link
Contributor

@hangshao0 hangshao0 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@DanHeidinga DanHeidinga left a comment

Choose a reason for hiding this comment

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

lgtm assuming the linux_aarch64 spec is being added in a separate PR

@DanHeidinga
Copy link
Member

Jenkins compile xlinux jdk8

@DanHeidinga DanHeidinga self-assigned this Jan 7, 2019
@DanHeidinga
Copy link
Member

@knn-k can you rebase to resolve the conflict? I think it should be fairly straightforward

@knn-k knn-k force-pushed the aarch64unsafe branch 2 times, most recently from ea714b7 to a6c1ffd Compare January 28, 2019 01:11
@knn-k
Copy link
Contributor Author

knn-k commented Jan 28, 2019

Resolved merge conflict.

@DanHeidinga
Copy link
Member

Sorry @knn-k hopefully the last minor change - the end date in the copyrights of changed files must be 2019

20:12:24 runtime/vm/module.xml
20:12:24 	IBM Copyright date appears to be incorrect
[Pipeline] echo
20:12:24 runtime/vm/xr64/unsafeHelper.s
20:12:24 	IBM Copyright date appears to be incorrect

This commit implements the unsafe helper functions for aarch64.

Signed-off-by: knn-k <konno@jp.ibm.com>
@knn-k
Copy link
Contributor Author

knn-k commented Jan 28, 2019

Corrected copyright years.

@DanHeidinga
Copy link
Member

Jenkins compile xlinux jdk8

@knn-k
Copy link
Contributor Author

knn-k commented Feb 13, 2019

I would like this to be merged if the code is OK.

@DanHeidinga DanHeidinga merged commit 4350233 into eclipse-openj9:master Feb 13, 2019
@knn-k knn-k deleted the aarch64unsafe branch February 13, 2019 03:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants