Experiments with C ABI calls

Andrew Haley aph at redhat.com
Tue Feb 16 15:48:24 UTC 2021


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.

-- 
Andrew Haley  (he/him)
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
https://keybase.io/andrewhaley
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671



More information about the panama-dev mailing list