RFR: 8367103: RISC-V: store cpu features in a bitmap [v5]
Hamlin Li
mli at openjdk.org
Mon Sep 22 11:32:11 UTC 2025
On Mon, 22 Sep 2025 10:29:52 GMT, Ludovic Henry <luhenry at openjdk.org> wrote:
>> Hamlin Li has updated the pull request incrementally with one additional commit since the last revision:
>>
>> simplify names
>
> src/hotspot/cpu/riscv/vm_version_riscv.hpp line 415:
>
>> 413: // Null terminated list
>> 414: static RVFeatureValue* _feature_list[];
>> 415: static RVExtFeatures* _rv_ext_features;
>
> Does that need to be a pointer? Can't it be `static RVExtFeatures _rv_ext_features` directly?
The reason to put `RVExtFeatures` as a pointer here is that, there is such dependency relationship among classes and macro here: `DECLARE_RV_EXT_FEATURE` -(deps)-> `RVFeatureValue`/`RVExtFeatureValue`/`RVNonExtFeatureValue` -(deps)-> `RVExtFeatures` -> `RVFeatureIndex` -> `DECLARE_RV_EXT_FEATURE`.
One way to break the cyclic deps is to use a pointer of RVExtFeatures in `RVExtFeatureValue`/`RVNonExtFeatureValue`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27152#discussion_r2367815808
More information about the hotspot-dev
mailing list