8372806: [lworld] x64: save bad values instead of rfp and lr above the extension space #1839
+129
−45
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
That's the x86 counterpart of JDK-8371993.
I've added some comments, using the offsets given in
frame_x86.hppto make sure to put the frame start at the right place. In particular, the frame start is 2 pointer sizes under the sender's sp:valhalla/src/hotspot/cpu/x86/frame_x86.hpp
Lines 61 to 62 in 3c41c2a
Unlike aarch64, with x64 we have only one copy of rbp. As with aarch64, I had to get rid of an assert that can't be checked anymore. A small price to pay.
Now, in debug, instead of
we have
I've kept the
pop r13to limit the difference of behavior between debug and product builds: both will overwriter13with the return address, whether it's a good idea or not.And at runtime, on my favorite
compiler/valhalla/inlinetypes/CorrectlyRestoreRfp.javaexample, instead of the stack:we have
I had to problem list some virtual thread tests, in the same fashion as for aarch64, as it used the wrong return address. The assert I had to remove was a sign that only one of the return address is updated in case of deopt, so only one of them is reliable. To help with that, I've added
frame::compiled_frame_detailslike for aarch64, that makes sure to do all the fixing internally.Thanks,
Marc
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/valhalla.git pull/1839/head:pull/1839$ git checkout pull/1839Update a local copy of the PR:
$ git checkout pull/1839$ git pull https://git.openjdk.org/valhalla.git pull/1839/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 1839View PR using the GUI difftool:
$ git pr show -t 1839Using diff file
Download this PR as a diff file:
https://git.openjdk.org/valhalla/pull/1839.diff
Using Webrev
Link to Webrev Comment