RFR: 8284563: AArch64: bitperm feature detection for SVE2 on Linux
Eric Liu
eliu at openjdk.java.net
Mon Apr 18 03:30:45 UTC 2022
On Fri, 15 Apr 2022 09:59:47 GMT, Ningsheng Jian <njian at openjdk.org> wrote:
>> This patch adds BITPERM feature detection for SVE2 on Linux. BITPERM is
>> an optional feature in SVE2 [1]. It enables 3 SVE2 instructions (BEXT,
>> BDEP, BGRP). BEXT and BDEP map efficiently to some vector operations,
>> e.g., the compress and expand functionalities [2] which are proposed in
>> VectorAPI's 4th incubation [3]. Besides, to generate specific code based
>> on different architecture features like x86, this patch exports
>> VM_Version::supports_XXX() for all CPU features. E.g.,
>> VM_Version::supports_svebitperm() for easy use.
>>
>> This patch also fixes a trivial bug, that sets UseSVE back to 1 if it's
>> 2 in SVE1 system.
>>
>> [1] https://developer.arm.com/documentation/ddi0601/2022-03/AArch64-Registers/ID-AA64ZFR0-EL1--SVE-Feature-ID-register-0
>> [2] https://bugs.openjdk.java.net/browse/JDK-8283893
>> [3] https://bugs.openjdk.java.net/browse/JDK-8280173
>
> src/hotspot/cpu/aarch64/vm_version_aarch64.hpp line 132:
>
>> 130: // Feature identification
>> 131: #define CPU_FEATURE_DETECTION(id, name, bit) \
>> 132: static bool supports_##name() { return (_features & CPU_##id) != 0; };
>
> Having supports_a53mac() looks a bit weird to me.
Yeah, I was thinking this before. Indeed, A53MAC and STXR_PREFETCH are not CPU feature. Considering that some codes depend on that, it's acceptable to me leaving them here at this moment.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8258
More information about the hotspot-compiler-dev
mailing list