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: Fix getArgPointer() for FFI upcall #16332
Conversation
Jenkins test sanity alinux64,amac jdk19 |
bffc313
to
52c5c03
Compare
Jenkins test sanity alinux64,amac jdk19 |
This PR fixes the failures with TestUpcallHighArity.java on AArch64 in #16237. |
FYI. @ChengJin01 |
This commit fixes getArgPointer() for AArch64 for FFI upcall. The function needs to maintain two offsets in the stack: one for the arguments stored by the upcall thunk, another one for the arguments stored in the stack by the caller. Signed-off-by: KONNO Kazuhiro <konno@jp.ibm.com>
52c5c03
to
ad8d0e5
Compare
Jenkins test sanity alinux64,amac jdk19 |
I ran the following tests with this fix on Linux and macOS manually. TestUpcallAsync.java TestUpcallStack.java failed only on macOS, and #16336 tracks it. All other tests were successful. |
maintaining two stack-pointer(s) sounds more complicated than necessary. it can be done relatively simply: saving-frame is of fixed size because you can know the max stack saving area needed for all possibly in-register args. at the same time, original passed-in-stack arg pointer can be calculated according to that fixed size and arg's offset together. z (and to a lesser degree, p where the ABI dictates the stack saving area either none or all) implemented this way. |
your fix did implement that way. implementation details are slightly different. LGTM ... approved! |
This commit fixes getArgPointer() for AArch64 for FFI upcall.
The function needs to maintain two offsets in the stack: one for the arguments stored by the upcall thunk, another one for the arguments stored in the stack by the caller.
Fixes: #16237
Signed-off-by: KONNO Kazuhiro konno@jp.ibm.com