RFR: 8356875: RISC-V: extension flag UseZvfh should depends on UseZfh
Hamlin Li
mli at openjdk.org
Wed May 14 08:54:52 UTC 2025
On Wed, 14 May 2025 08:46:23 GMT, Hamlin Li <mli at openjdk.org> wrote:
>> src/hotspot/cpu/riscv/vm_version_riscv.cpp line 251:
>>
>>> 249: warning("Cannot enable UseZvfh on cpu without Zfh support.");
>>> 250: FLAG_SET_DEFAULT(UseZvfh, false);
>>> 251: }
>>
>> For QEMU, Zvfh also means Zvfhmin and Zfhmin. So there is no Zfh if you only enable Zvfh when start QEMU.
>> That means hwprobe syscall will detect Zvfh and Zfhmin but no Zfh. Is there a similar issue for this case?
>
> One question: Not sure if I understand you correctly, seems to me Zfh is also detected and automatically set by hwprobe when running with qemu?
For this pr, it tries to address the situation: when neither Zfh/Zvfh can not be enabled automatically (no matter what's the reason), so user could enable Zvfh manually to get some optimization, in that case it will fail to get such optimization even if with -XX:+PrintFlagsFinal it shows that UseZvfh == true, this is very confusing.
So to make this situation more understanable for user (maybe more for developer) of jdk, we'd better to automatically unset UseZvfh when UseZfh is false.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25213#discussion_r2088424995
More information about the hotspot-dev
mailing list