RFR: 8369685: RISC-V: refactor code related to RVFeatureValue::enabled [v3]
Hamlin Li
mli at openjdk.org
Thu Oct 16 14:03:10 UTC 2025
On Thu, 16 Oct 2025 09:58:13 GMT, Robbin Ehn <rehn at openjdk.org> wrote:
>> Same as the above one. In `VM_Version::setup_cpu_available_features()`, we still need it.
>
> automatically C style conversion between booleans and integer should be avoided.
> (pointer to as bool strictly no no)
>
> And I'm confused:
> Disabled value == DEFAULT_VALUE (-1)
> But enabled returns 0 or 1 convertet from bool?
>
> { return enabled() ? _what_value_here : DEFAULT_VALUE; } ?
@robehn Thanks for the offline discussion!
It makes sense to me to use DEFAULT_VALUE in `RVExtFeatureValue::value()`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27771#discussion_r2436040024
More information about the hotspot-dev
mailing list