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

Increment counter correctly in FFI Upcall on Z #16326

Merged
merged 1 commit into from
Nov 16, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions runtime/vm/xz64/UpcallThunkGen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -752,6 +752,10 @@ getArgPointer(J9UpcallNativeSignature *nativeSig, void *argListPtr, I_32 argIdx)
// where the struct must be stored when we return to native caller. So we must skip over that
// "hiddenParameter" when trying to identify arguments in getArgPointer.
calleeFrameIndex++;
// When the return type is a struct, the buffer where the struct must be populated is initially
// provided in GPR2 by the caller. So we must increment the GPR index as well in order to correctly
// find the position of the current argument pointer.
gprIndex++;
}

I_32 structOffset = 0;
Expand Down