Experiments with C ABI calls

Jorn Vernee jorn.vernee at oracle.com
Tue Feb 16 15:52:17 UTC 2021


Hi Andrew,

Calls that pass arguments on the stack (i.e. that have a large number of 
arguments) are not currently intrinsified [1], and neither are calls 
that return values in multiple registers [2].

These is still on the TODO list.

Jorn

[1] : https://bugs.openjdk.java.net/browse/JDK-8255902
[2] : https://bugs.openjdk.java.net/browse/JDK-8255903

On 16/02/2021 16:48, Andrew Haley wrote:
> On 16/02/2021 13:18, Maurizio Cimadamore wrote:
>> No, this is not expected.
>>
>> If the native method handle is executed enough times, intrinsification
>> should kick in and you should get a direct native call (essentially).
>>
>> The fact that you're seeing ProgrammableInvoker suggests that
>> intrinsification has not kicked in.
>>
>> Which platform are you on? What is the native call you are trying?
> OK. This is x86. I was trying to stress test calls with large numbers of
> args on AArch64, but it doesn't work on x86 either.
>
> The type is
>
> FunctionDescriptor.of(CLinker.C_DOUBLE,
>                 CLinker.C_FLOAT, CLinker.C_FLOAT, CLinker.C_FLOAT, CLinker.C_FLOAT,
>                 CLinker.C_FLOAT, CLinker.C_FLOAT, CLinker.C_FLOAT, CLinker.C_FLOAT,
>                 CLinker.C_FLOAT));
>
> Maybe there's some kind of limit on the number of args? It works with
> just two ints.
>
> I can sens you a test case if you like.
>


More information about the panama-dev mailing list