diff --git a/src/arm.c b/src/arm.c index 4cc609d..3cd6217 100644 --- a/src/arm.c +++ b/src/arm.c @@ -72,8 +72,8 @@ struct subarch_info subarches[] = { * * - CHECK_HWCAP and CHECK_HWCAP2 refer to appropriate values in 32-bit * ARM AT_HWCAP*, - * - CHECK_AARCH64_HWCAP refer to appropriate values in 64-bit AArch64 - * AT_HWCAP, + * - CHECK_AARCH64_HWCAP and CHECK_HWCAP2 refer to appropriate values + * in 64-bit AArch64 AT_HWCAP, * - CHECK_SUBARCH refers to the subarch determined via 'uname -m'. */ enum check_type @@ -83,6 +83,7 @@ enum check_type CHECK_HWCAP, CHECK_HWCAP2, CHECK_AARCH64_HWCAP, + CHECK_AARCH64_HWCAP2, CHECK_SUBARCH, CHECK_MAX @@ -106,6 +107,8 @@ struct flag_info flags[] = { { "vfpv3", CHECK_HWCAP, (1 << 13) }, { "vfpv4", CHECK_HWCAP, (1 << 16) }, { "vfp-d32", CHECK_HWCAP, (1 << 19) }, + { "asimddp", CHECK_HWCAP, (1 << 24) }, + { "i8mm", CHECK_HWCAP, (1 << 27) }, { "aes", CHECK_HWCAP2, (1 << 0) }, { "sha1", CHECK_HWCAP2, (1 << 2) }, { "sha2", CHECK_HWCAP2, (1 << 3) }, @@ -125,6 +128,10 @@ struct flag_info flags[] = { { "sha1", CHECK_AARCH64_HWCAP, (1 << 5) }, { "sha2", CHECK_AARCH64_HWCAP, (1 << 6) }, { "crc32", CHECK_AARCH64_HWCAP, (1 << 7) }, + { "sm4", CHECK_AARCH64_HWCAP, (1 << 19) }, + { "asimddp", CHECK_AARCH64_HWCAP, (1 << 20) }, + { "sve", CHECK_AARCH64_HWCAP, (1 << 22) }, + { "i8mm", CHECK_AARCH64_HWCAP2, (1 << 13) }, /* subarches */ { "v4", CHECK_SUBARCH, SUBARCH_V4 }, @@ -203,6 +210,10 @@ int print_flags() if (subarch >= SUBARCH_AARCH64) reg = &hwcap; break; + case CHECK_AARCH64_HWCAP2: + if (subarch >= SUBARCH_AARCH64) + reg = &hwcap2; + break; case CHECK_SUBARCH: reg = &subarch; break; diff --git a/tests/arm/aarch64-neoverse-n1.txt b/tests/arm/aarch64-neoverse-n1.txt index edff6e5..61cf087 100644 --- a/tests/arm/aarch64-neoverse-n1.txt +++ b/tests/arm/aarch64-neoverse-n1.txt @@ -1,4 +1,4 @@ -expected:edsp neon thumb vfp vfpv3 vfpv4 vfp-d32 aes sha1 sha2 crc32 v4 v5 v6 v7 v8 thumb2 +expected:edsp neon thumb vfp vfpv3 vfpv4 vfp-d32 aes sha1 sha2 crc32 asimddp v4 v5 v6 v7 v8 thumb2 hwcap:0000000010119fff hwcap2:0000000000000000 machine:aarch64