RFR: 8295351: java/lang/Float/Binary16Conversion.java fails with "Unexpected result of converting" [v2]
Smita Kamath
svkamath at openjdk.org
Wed Nov 23 22:36:23 UTC 2022
On Wed, 23 Nov 2022 05:07:00 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Smita Kamath has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Addressed review comments
>
> src/hotspot/share/runtime/sharedRuntime.cpp line 455:
>
>> 453: union {jfloat f; juint i;} bits;
>> 454: bits.f = x;
>> 455: jint doppel = bits.i;
>
> Doesn't the conversion from unsigned to signed risk a compiler warning being emitted?
>
> Can't you just use the existing `JavaValue` type to perform the union conversion trick?
Hi David, thanks for pointing this out. I have updated the code to use jint.
I have used the union conversion trick that was previously used in SharedRuntime::drem and SharedRuntime::frem. I hope that's okay with you.
-------------
PR: https://git.openjdk.org/jdk/pull/11301
More information about the hotspot-dev
mailing list