RFR: 8367253: RISC-V: refactor dependent cpu extensions

Hamlin Li mli at openjdk.org
Tue Sep 9 12:59:35 UTC 2025


Hi,
Can you help to review this patch?

Dependent extensions could be improved in several ways.

Currently, the dependent cpu extensions are processed in 2 separate places:
1. update_flag() when calling VM_Version::setup_cpu_available_features()
2. at the end of VM_Version::common_initialize().
But we can do it in one single place, that is update_flag().

And, dependency relationship can only be expressed in (1:1) way, can not be expressed (1:N) way, but in fact some extensions can depend on several different other extensions, for example, zvfh depends on zvf and rvv. It's would be better to support this (1:N) relationship.

Thanks!

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

Commit messages:
 - remove obsolete extension dependency code
 - initial commit

Changes: https://git.openjdk.org/jdk/pull/27171/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=27171&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8367253
  Stats: 142 lines in 2 files changed: 52 ins; 30 del; 60 mod
  Patch: https://git.openjdk.org/jdk/pull/27171.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/27171/head:pull/27171

PR: https://git.openjdk.org/jdk/pull/27171


More information about the hotspot-dev mailing list