RFR: 8303040: linux PPC64le: Implementation of Foreign Function & Memory API (Preview) [v35]

Richard Reingruber rrich at openjdk.org
Tue May 23 16:23:03 UTC 2023


On Tue, 23 May 2023 12:26:52 GMT, Martin Doerr <mdoerr at openjdk.org> wrote:

> I believe omitting the PSA is wrong for varargs, but we don't have this information in the backend.

It is clearly wrong.

> So, I think we should simply not optimize it.

Already agreed for this version.

> Reserving 64 Byte stack space should be affordable for a downcall even if it's not always needed.

It is hardly ever needed to begin with. It's just not pretty to allocate the PSA for little test functions. It'll confuse people that compare the downcall stub to what the C compiler produces. They might even think we havn't understood the ABI ;)

> The Java side could compute it, but there's no way to pass this information to the backend.

I'm not sure about that. First idea would be to keep the allocated `stack` in `nextStorage` if needed and pass it to the backend.

> I've improved the comments. Please take a look.

Great! Thanks :)

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

PR Review Comment: https://git.openjdk.org/jdk/pull/12708#discussion_r1202652115


More information about the hotspot-dev mailing list