RFR: 8368897: RISC-V: Cleanup RV_EXT_FEATURE_FLAGS & RV_NON_EXT_FEATURE_FLAGS
Hamlin Li
mli at openjdk.org
Tue Sep 30 09:06:23 UTC 2025
On Tue, 30 Sep 2025 03:03:04 GMT, Fei Yang <fyang at openjdk.org> wrote:
> Hi, You need merge and rebase :-)
Thanks for reminding :) I think my forked master needs to be adjusted in some way, as seems I previously accidently pushed some commit to master instead of branch, I'll figure out it later.
> But the order of the detection of these extesions (the order in `RiscvHwprobe::add_features_from_query_result()`) still matters, right? Say we must detect `ext_v` before `ext_Zvbb`.
Yes, you're right.
But seems previous way (assert introduced in https://github.com/openjdk/jdk/pull/24094) does not work as expected, I moved ext_V below other ext_Zv ones, the assert was not triggerred, it's verified in a commit before (https://github.com/openjdk/jdk/pull/27152, https://github.com/openjdk/jdk/pull/27171), check below for a simple patch. I'll do more investigation and find out a way to catch the out of order detections in another PR.
diff --git a/src/hotspot/cpu/riscv/vm_version_riscv.hpp b/src/hotspot/cpu/riscv/vm_version_riscv.hpp
index a0a42fb5463..17e9635d0b6 100644
--- a/src/hotspot/cpu/riscv/vm_version_riscv.hpp
+++ b/src/hotspot/cpu/riscv/vm_version_riscv.hpp
@@ -169,7 +169,6 @@ class VM_Version : public Abstract_VM_Version {
decl(ext_C , "c" , ('C' - 'A'), true , UPDATE_DEFAULT(UseRVC)) \
decl(ext_Q , "q" , ('Q' - 'A'), true , NO_UPDATE_DEFAULT) \
decl(ext_H , "h" , ('H' - 'A'), true , NO_UPDATE_DEFAULT) \
- decl(ext_V , "v" , ('V' - 'A'), true , UPDATE_DEFAULT(UseRVV)) \
decl(ext_Zicbom , "Zicbom" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZicbom)) \
decl(ext_Zicboz , "Zicboz" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZicboz)) \
decl(ext_Zicbop , "Zicbop" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZicbop)) \
@@ -193,6 +192,7 @@ class VM_Version : public Abstract_VM_Version {
decl(ext_Zvbc , "Zvbc" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT_DEP(UseZvbc, ext_V)) \
decl(ext_Zvfh , "Zvfh" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT_DEP(UseZvfh, ext_V)) \
decl(ext_Zvkn , "Zvkn" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT_DEP(UseZvkn, ext_V)) \
+ decl(ext_V , "v" , ('V' - 'A'), true , UPDATE_DEFAULT(UseRVV)) \
decl(ext_Zicond , "Zicond" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZicond)) \
decl(mvendorid , "VendorId" , RV_NO_FLAG_BIT, false, NO_UPDATE_DEFAULT) \
decl(marchid , "ArchId" , RV_NO_FLAG_BIT, false, NO_UPDATE_DEFAULT) \
-------------
PR Comment: https://git.openjdk.org/jdk/pull/27562#issuecomment-3350827288
More information about the hotspot-dev
mailing list