RFR: 8367103: RISC-V: store cpu features in a bitmap [v8]

Fei Yang fyang at openjdk.org
Thu Sep 25 09:22:49 UTC 2025


On Thu, 25 Sep 2025 08:33:33 GMT, Hamlin Li <mli at openjdk.org> wrote:

>> src/hotspot/cpu/riscv/vm_version_riscv.hpp line 296:
>> 
>>> 294:     }
>>> 295: 
>>> 296:     static int element_index(RVFeatureIndex feature) {
>> 
>> Can we rename this as `feature_element`? This together with `feature_bit` tell us where the bit lies.
>
> I think it's better to be element_index, please check usage of it,`int idx = element_index(f);`, we are using it to find the index in the _features_bitmap, and there is another method called `element_count`, their name should be related to each other.

OK. That's fine.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27152#discussion_r2378394102


More information about the hotspot-dev mailing list