RFR: 8369685: RISC-V: refactor code related to RVFeatureValue::enabled [v3]

Robbin Ehn rehn at openjdk.org
Thu Oct 16 15:40:10 UTC 2025


On Thu, 16 Oct 2025 13:59:54 GMT, Hamlin Li <mli at openjdk.org> wrote:

>> 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()`.

Thank you.
Now value() behave the same regardless of implementation.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27771#discussion_r2436501740


More information about the hotspot-dev mailing list