Skip to content

Commit

Permalink
Merge pull request #16326 from dchopra001/ffiFix
Browse files Browse the repository at this point in the history
Increment counter correctly in FFI Upcall on Z
  • Loading branch information
joransiu committed Nov 16, 2022
2 parents 30a8df1 + de300b8 commit 4c499f8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions runtime/vm/xz64/UpcallThunkGen.cpp
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

0 comments on commit 4c499f8

Please sign in to comment.