[foreign-memaccess+abi] RFR: 8262118: Specialize upcalls [v2]
mcimadamore at openjdk.java.net
Tue Feb 23 14:23:57 UTC 2021
On Tue, 23 Feb 2021 14:17:07 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:
>> Yes, I found that that the native code passes float-only structs in float registers, but we were trying to load it using an int carrier, which maps to an int register in the Java calling convention. Besides being inefficient to have to move between these registers, it is not possible to move between float and int registers directly in x86, which would complicate the shuffling process by having to go through memory.
>> By using float/double as a carrier here instead, the upcall handle expects it's argument to be in a float register as well, and we don't have to move it between registers.
> Ah, wait this is AArch64. I've kept this as is so far (it was previously using ints as a carrier as well). You are probably right that this is incorrect.
> Currently it doesn't matter though since we always go through an intermediate buffer (AArch64 doesn't support specialized upcalls yet). I simply didn't attempt to pick the correct type here yet.
Yes - this is Aarch, the STRUCT_HFA case which AFAIK should be structs passed by FP registers.
More information about the panama-dev