RFR(M): 8139258: PPC64LE: argument passing problem when passing 15 floats in native call

Alexander Smundak asmundak at google.com
Sat Nov 14 00:18:27 UTC 2015

Please find the updated patch at

I have added the changes for the compiled case, and added comments.
I have kept AIX and Linux cases separate, though -- IMHO mixing them
would make the situation logically less clear.

Note that I wasn't able to run JDK9 with -Xcomp on the Power8 machine
I have (I am investigating the reason currently), so have I modified
the test case to invoke the JNI method sufficiently large number of
times for the JIT to kick in. I have also tested in on JDK8u40 we are
currently using where -Xcomp works.

On Fri, Nov 13, 2015 at 9:24 AM, Volker Simonis
<volker.simonis at gmail.com> wrote:
> On Fri, Nov 13, 2015 at 3:57 PM, Doerr, Martin <martin.doerr at sap.com> wrote:
>> Hi Sasha,
>> thank you very much for debugging the interpreter. The test passes as long as the method gets interpreted, now.
>> However, I didn't get the right result when running with -Xcomp.
>> I guess there's still something wrong with the native wrapper (generate_native_wrapper / float_move etc.) for PPC64LE.
>> Btw. I think the defined(VM_LITTLE_ENDIAN) should be used. I'd simply change the code to
>> #if defined(LINUX) && !defined(VM_LITTLE_ENDIAN)
>>   __ stfs(floatSlot, 4, arg_c);
>> #else
>>   __ stfs(floatSlot, 0, arg_c);
>> #endif
> That's good, but I'd add comment like:
> #if defined(LINUX) && !defined(VM_LITTLE_ENDIAN)
>   __ stfs(floatSlot, 4, arg_c);
> #else
>   // This handles Linux/little-endian and AIX which is big-endian but
> stores the floats in the
>   // most-significant bytes of a double while the Linux ABI places
> them in the least-significant bytes.
>   __ stfs(floatSlot, 0, arg_c);
> #endif
>> Best regards and thanks again,
>>   Martin
>> -----Original Message-----
>> From: hotspot-dev [mailto:hotspot-dev-bounces at openjdk.java.net] On Behalf Of Alexander Smundak
>> Sent: Freitag, 13. November 2015 00:37
>> To: HotSpot Open Source Developers <hotspot-dev at openjdk.java.net>
>> Subject: RFR(M): 8139258: PPC64LE: argument passing problem when passing 15 floats in native call
>> Please review the patch fixing https://bugs.openjdk.java.net/browse/JDK-8139258.
>> I have tested in on Linux running on ppc64le.
>> I need a sponsor.
>> http://cr.openjdk.java.net/~asmundak/8139258/hotspot/webrev.00
>> Sasha

More information about the hotspot-dev mailing list