RFR: 8318158: RISC-V: implement roundD/roundF intrinsics [v6]
Olga Mikhaltsova
omikhaltcova at openjdk.org
Fri Dec 8 22:34:17 UTC 2023
On Fri, 8 Dec 2023 09:13:44 GMT, Andrew Haley <aph at openjdk.org> wrote:
>> src/hotspot/cpu/riscv/macroAssembler_riscv.cpp line 4292:
>>
>>> 4290: // if +/-0, +/-subnormal numbers, signaling/quiet NaN
>>> 4291: andi(t0, t0, fclass_mask::nan | fclass_mask::zero | fclass_mask::subnorm);
>>> 4292: bnez(t0, done);
>>
>> What is this subnorm test for?
>
> It looks to me like RoundTests.java isn't testing denormals. But I guess you tested the entire 32-bit range against the Java code, right?
Subnormal numbers can be distinguished after fclass call, they were also added here in order not to do redundant operations further, they results to 0 as well.
Yes, that's right, I verified output of this algorithm against the current java implementation on the full 32-bit range.
Thanks for the advice below!
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16382#discussion_r1421076577
More information about the hotspot-dev
mailing list