RFR: 8369685: RISC-V: refactor code related to RVFeatureValue::enabled [v4]
Hamlin Li
mli at openjdk.org
Fri Oct 17 08:20:08 UTC 2025
On Fri, 17 Oct 2025 02:59:15 GMT, Fei Yang <fyang at openjdk.org> wrote:
>> Thanks for reviewing!
>
> Hmm ... But I find the only use of `value` in `VM_Version::setup_cpu_available_features()` is for `log_debug`:
>
> 147 log_debug(os, cpu)("Enabled RV64 feature "%s" (%ld)",
> 148 _feature_list[i]->pretty(),
> 149 _feature_list[i]->value());
>
> Can we simply move this to other methods like `enable_feature()` or `disable_feature()` in the subclasses? These are the places where we do the real enable / disable for them. If that make sense, then we would be able to make `value()` a method only for non-extensions. What do you think?
Good idea. Maybe put them into `update_flag` instead?
@robehn how do you think about it? That means `value()` is only a method in `RVNonExtFeatureValue`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27771#discussion_r2438800974
More information about the hotspot-dev
mailing list