RFR(M): 8139258: PPC64LE: argument passing problem when passing 15 floats in native call
martin.doerr at sap.com
Mon Nov 16 10:11:15 UTC 2015
the fix for the compiler looks good, too. The test passes in interpreted and compiled mode, now.
I'm ok with keeping the 3 cases separate.
However, I still wonder why you use _LITTLE_ENDIAN. We use VM_LITTLE_ENDIAN at all other places.
Thanks and best regards,
From: Alexander Smundak [mailto:asmundak at google.com]
Sent: Samstag, 14. November 2015 01:18
To: Volker Simonis <volker.simonis at gmail.com>
Cc: Doerr, Martin <martin.doerr at sap.com>; HotSpot Open Source Developers <hotspot-dev at openjdk.java.net>
Subject: Re: RFR(M): 8139258: PPC64LE: argument passing problem when passing 15 floats in native call
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);
>> __ stfs(floatSlot, 0, arg_c);
> That's good, but I'd add comment like:
> #if defined(LINUX) && !defined(VM_LITTLE_ENDIAN)
> __ stfs(floatSlot, 4, arg_c);
> // 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);
>> Best regards and thanks again,
>> -----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.
More information about the hotspot-dev