print_cpu_features_value ("mte_state",
GLRO (dl_aarch64_cpu_features).mte_state);
print_cpu_features_value ("sve", GLRO (dl_aarch64_cpu_features).sve);
+ print_cpu_features_value ("sve2", GLRO (dl_aarch64_cpu_features).sve2);
print_cpu_features_value ("zva_size",
GLRO (dl_aarch64_cpu_features).zva_size);
#include <ldsodefs.h>
#include <sys/auxv.h>
-/* Make glibc MTE-safe on a system that supports MTE in case user code
- enables tag checks independently of the mte_status of glibc. There
- is currently no ABI contract for enabling tag checks in user code,
- but this can be useful for debugging with MTE. */
-#define MTE_ENABLED() (GLRO(dl_hwcap2) & HWCAP2_MTE)
-
#define INIT_ARCH() \
uint64_t __attribute__((unused)) midr = \
GLRO(dl_aarch64_cpu_features).midr_el1; \
unsigned __attribute__((unused)) zva_size = \
GLRO(dl_aarch64_cpu_features).zva_size; \
- bool __attribute__((unused)) bti = \
- GLRO(dl_aarch64_cpu_features).bti; \
- bool __attribute__((unused)) mte = \
- MTE_ENABLED (); \
- bool __attribute__((unused)) sve = \
- GLRO(dl_aarch64_cpu_features).sve; \
- bool __attribute__((unused)) mops = \
- GLRO(dl_aarch64_cpu_features).mops;
+ bool __attribute__((unused)) bti = GLRO(dl_aarch64_cpu_features).bti; \
+ bool __attribute__((unused)) mte = GLRO(dl_hwcap2) & HWCAP2_MTE; \
+ bool __attribute__((unused)) sve = GLRO(dl_aarch64_cpu_features).sve; \
+ bool __attribute__((unused)) sve2 = GLRO(dl_aarch64_cpu_features).sve2; \
+ bool __attribute__((unused)) mops = GLRO(dl_aarch64_cpu_features).mops;
/* Check if SVE is supported. */
cpu_features->sve = GLRO (dl_hwcap) & HWCAP_SVE;
+ cpu_features->sve2 = GLRO (dl_hwcap2) & HWCAP2_SVE2;
/* Check if MOPS is supported. */
cpu_features->mops = GLRO (dl_hwcap2) & HWCAP2_MOPS;