RFR: 8315801: [PPC64] JNI code should be more similar to the Panama implementation [v6]

Martin Doerr mdoerr at openjdk.org
Wed Nov 8 18:12:58 UTC 2023


On Thu, 19 Oct 2023 08:53:27 GMT, Martin Doerr <mdoerr at openjdk.org> wrote:

>> This PR removes writing parameters to stack which are passed in registers. (See JBS issue for more details.) This allows us to get rid of the extra parameter for `c_calling_convention`.
>> 
>> We can also remove the extra space for the Parameter Save Area in some ABIv2 cases (ppc64le). Note that JNI and runtime calls don't support VarArgs (except as array object for JNI), so this optimization is valid (unlike in downcalls for Panama).
>> 
>> The offset of floats on stack can be put into a constant and used by interpreter and `c_calling_convention`. Panama handles this in the CallArranger. Added comment which resolves a Panama "todo".
>> 
>> Tests have passed on linux ppc64 and ppc64le and AIX.
>
> Martin Doerr has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Leave handling of Argument::float_on_stack_offset_in_bytes_c in CallArranger.

Right, the float load and store instructions can access a Java frame. That was wrong for linux on PPC64 big endian in the older version of this PR. This is one of the reasons why it's better to compute the precise address in CallArranger.java.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/15599#issuecomment-1802402366


More information about the hotspot-compiler-dev mailing list