RFR: 8362524: Fix confusing but harmless typos in x86 CPU Features
Kim Barrett
kbarrett at openjdk.org
Fri Jul 18 00:32:49 UTC 2025
On Thu, 17 Jul 2025 16:24:43 GMT, Jan Kratochvil <jkratochvil at openjdk.org> wrote:
> The name `DECLARE_CPU_FEATURE_FLAG` is used in all other cases. In `vmStructs_jvmci.cpp` there was no matching `#define`.
Changes requested by kbarrett (Reviewer).
src/hotspot/cpu/x86/vm_version_x86.cpp line 50:
> 48: VM_Version::CpuidInfo VM_Version::_cpuid_info = { 0, };
> 49:
> 50: #define DECLARE_CPU_FEATURE_FLAG(id, name, bit) name,
I think the "typo" here is in the `#undef` rather than the define. Calling this `xxx_NAME` seems
appropriate, since it is providing the name for the feature for collection in `_features_names[]`.
Places that are using `xxx_FLAG` are constructing the enumerator for the feature. There is no
requirement that all uses of an X-macro use the same name for the passed in macro, and indeed
it is quite normal to not do so.
-------------
PR Review: https://git.openjdk.org/jdk/pull/26371#pullrequestreview-3031385928
PR Review Comment: https://git.openjdk.org/jdk/pull/26371#discussion_r2214569387
More information about the graal-dev
mailing list