RFR: 8311130: AArch64: Sync SVE related CPU features with VM options [v2]

Pengfei Li pli at openjdk.org
Thu Jul 20 04:01:07 UTC 2023


On Tue, 18 Jul 2023 09:48:35 GMT, Andrew Haley <aph at openjdk.org> wrote:

>> Pengfei Li has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - Simplify some checks
>>  - Address aph's comment
>
> src/hotspot/cpu/aarch64/vm_version_aarch64.cpp line 580:
> 
>> 578:   int buf_used_len = os::snprintf_checked(buf, sizeof(buf), "0x%02x:0x%x:0x%03x:%d", _cpu, _variant, _model, _revision);
>> 579:   if (_model2) os::snprintf_checked(buf + buf_used_len, sizeof(buf) - buf_used_len, "(0x%03x)", _model2);
>> 580: #define ADD_FEATURE_IF_SUPPORTED(id, name, bit) if (VM_Version::supports_##name()) strcat(buf, ", " #name);
> 
> ```suggestion                                                   \
> #define ADD_FEATURE_IF_SUPPORTED(id, name, bit)                 \
>   do {                                                          \
>     if (VM_Version::supports_##name())  strcat(buf, ", " #name); \
>   } while(0);
> 
> Reason: no dangling else in macros, ever.

Done

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14897#discussion_r1268905526


More information about the hotspot-dev mailing list