RFR: 8303040: linux PPC64le: Implementation of Foreign Function & Memory API (Preview) [v24]
Martin Doerr
mdoerr at openjdk.org
Wed May 10 11:19:34 UTC 2023
On Thu, 27 Apr 2023 16:19:46 GMT, Richard Reingruber <rrich at openjdk.org> wrote:
>> Martin Doerr has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Revert unintended formatting changes. Fix comment.
>
> src/hotspot/cpu/ppc/upcallLinker_ppc.cpp line 202:
>
>> 200:
>> 201: MacroAssembler* _masm = new MacroAssembler(&buffer);
>> 202: address start = __ function_entry(); // called by C
>
> If `!defined(ABI_ELFv2)` a function descriptor will be emitted here. It will be initialized with `friend_toc` and `friend_env`. But that's not correct for external callers, is it? If so, wouldn't an `Unimplemented()` be better than obscure crashes?
No, this code is correct and tested (I have a partially working Big Endian patch). `toc` and `env` are loaded by the external caller (C code), but not used by the stub. So, we don't need to initialize them to any specific values.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/12708#discussion_r1189755698
More information about the core-libs-dev
mailing list