RFR: 8330266: RISC-V: Restore frm to RoundingMode::rne after JNI [v2]

Hamlin Li mli at openjdk.org
Mon Apr 15 16:30:00 UTC 2024


On Mon, 15 Apr 2024 16:12:35 GMT, Ludovic Henry <luhenry at openjdk.org> wrote:

>> Hamlin Li has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   refine code
>
> src/hotspot/cpu/riscv/macroAssembler_riscv.cpp line 1177:
> 
>> 1175:     // Set FRM to the state we need. We do want Round to Nearest. We
>> 1176:     // don't want non-IEEE rounding modes.
>> 1177:     beq(tmp1, tmp2, skip_fsrmi);        // Only reset FRM if it's wrong
> 
> Same as https://github.com/openjdk/jdk/pull/18758#discussion_r1566037120, you can take advantage of `RoundingMode::rne == 0` by doing `beq(tmp1, zr, skip_fsrmi);` and adding a `guarantee(RoundingMode::rne == 0);` right above for self-documentation.

Thanks, fixed.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/18785#discussion_r1566084422


More information about the hotspot-dev mailing list