-
Notifications
You must be signed in to change notification settings - Fork 738
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
Relocate the J2I thunk in PIC data on Power #2882
Conversation
Currently marked WIP because it depends on #2874 (which depends on eclipse-omr/omr#2965 ). @gita-omr Do you want to take a look at this? |
info->data2 = callNode ? callNode->getInlinedSiteIndex() : (uintptr_t)-1; | ||
|
||
// data3 = distance in bytes from Constant Pool Pointer to J2I Thunk | ||
info->data3 = 3 * TR::Compiler->om.sizeofReferenceAddress(); |
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.
Personally, I'd be happier if this offset was computed from the generated code addresses...something like (cursorForThunkAddress - cursorForConstantPoolPointer)
so that, even if the layout changes, nobody has to remember to change this 3
or the other 8
. Yeah, I know that means you'll have to "remember" more locations so that you can generate the relocation later on, but I think it's a better approach.
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.
At that point in the code cursor and j2iThunkRelocationPoint already have the values I need so I replaced it with cursor - j2iThunkRelocationPoint.
Ok, the change looks good to me now. @IBMJimmyk would you please squash the two commits ? We will only need to test this PR on POWER (because it only changes one file in the POWER codegen) once #2874 is merged. |
71b5cee
to
1443d58
Compare
I squashed the commits. |
The J2I Thunk in the PIC data for PPCVirtualUnresolvedSnippet and PPCInterfaceCallSnippet needs to be relocateable for AOT compiles. emitSnippetBody was modified for both to add support for this using the new TR_J2IVirtualThunkPointer type of relocation. Signed-off-by: jimmyk <jimmyk@ca.ibm.com>
1443d58
to
a78baba
Compare
I removed the WIP tag since #2874 has been merged. |
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.
lgtm, thanks @IBMJimmyk
jenkins test sanity plinux jdk8 |
only needs testing on POWER because only affects p codegen jenkins test sanity aix jdk8 |
With apologies to @gita-omr (who I know is away this week) for merging before she has had a chance to review; this PR is needed for our 0.10 release. |
The J2I Thunk in the PIC data for PPCVirtualUnresolvedSnippet and
PPCInterfaceCallSnippet needs to be relocateable for AOT compiles.
emitSnippetBody was modified for both to add support for this using the
new TR_J2IVirtualThunkPointer type of relocation.
Signed-off-by: jimmyk jimmyk@ca.ibm.com