You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(122) |
Nov
(152) |
Dec
(69) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(6) |
Feb
(25) |
Mar
(73) |
Apr
(82) |
May
(24) |
Jun
(25) |
Jul
(10) |
Aug
(11) |
Sep
(10) |
Oct
(54) |
Nov
(203) |
Dec
(182) |
| 2004 |
Jan
(307) |
Feb
(305) |
Mar
(430) |
Apr
(312) |
May
(187) |
Jun
(342) |
Jul
(487) |
Aug
(637) |
Sep
(336) |
Oct
(373) |
Nov
(441) |
Dec
(210) |
| 2005 |
Jan
(385) |
Feb
(480) |
Mar
(636) |
Apr
(544) |
May
(679) |
Jun
(625) |
Jul
(810) |
Aug
(838) |
Sep
(634) |
Oct
(521) |
Nov
(965) |
Dec
(543) |
| 2006 |
Jan
(494) |
Feb
(431) |
Mar
(546) |
Apr
(411) |
May
(406) |
Jun
(322) |
Jul
(256) |
Aug
(401) |
Sep
(345) |
Oct
(542) |
Nov
(308) |
Dec
(481) |
| 2007 |
Jan
(427) |
Feb
(326) |
Mar
(367) |
Apr
(255) |
May
(244) |
Jun
(204) |
Jul
(223) |
Aug
(231) |
Sep
(354) |
Oct
(374) |
Nov
(497) |
Dec
(362) |
| 2008 |
Jan
(322) |
Feb
(482) |
Mar
(658) |
Apr
(422) |
May
(476) |
Jun
(396) |
Jul
(455) |
Aug
(267) |
Sep
(280) |
Oct
(253) |
Nov
(232) |
Dec
(304) |
| 2009 |
Jan
(486) |
Feb
(470) |
Mar
(458) |
Apr
(423) |
May
(696) |
Jun
(461) |
Jul
(551) |
Aug
(575) |
Sep
(134) |
Oct
(110) |
Nov
(157) |
Dec
(102) |
| 2010 |
Jan
(226) |
Feb
(86) |
Mar
(147) |
Apr
(117) |
May
(107) |
Jun
(203) |
Jul
(193) |
Aug
(238) |
Sep
(300) |
Oct
(246) |
Nov
(23) |
Dec
(75) |
| 2011 |
Jan
(133) |
Feb
(195) |
Mar
(315) |
Apr
(200) |
May
(267) |
Jun
(293) |
Jul
(353) |
Aug
(237) |
Sep
(278) |
Oct
(611) |
Nov
(274) |
Dec
(260) |
| 2012 |
Jan
(303) |
Feb
(391) |
Mar
(417) |
Apr
(441) |
May
(488) |
Jun
(655) |
Jul
(590) |
Aug
(610) |
Sep
(526) |
Oct
(478) |
Nov
(359) |
Dec
(372) |
| 2013 |
Jan
(467) |
Feb
(226) |
Mar
(391) |
Apr
(281) |
May
(299) |
Jun
(252) |
Jul
(311) |
Aug
(352) |
Sep
(481) |
Oct
(571) |
Nov
(222) |
Dec
(231) |
| 2014 |
Jan
(185) |
Feb
(329) |
Mar
(245) |
Apr
(238) |
May
(281) |
Jun
(399) |
Jul
(382) |
Aug
(500) |
Sep
(579) |
Oct
(435) |
Nov
(487) |
Dec
(256) |
| 2015 |
Jan
(338) |
Feb
(357) |
Mar
(330) |
Apr
(294) |
May
(191) |
Jun
(108) |
Jul
(142) |
Aug
(261) |
Sep
(190) |
Oct
(54) |
Nov
(83) |
Dec
(22) |
| 2016 |
Jan
(49) |
Feb
(89) |
Mar
(33) |
Apr
(50) |
May
(27) |
Jun
(34) |
Jul
(53) |
Aug
(53) |
Sep
(98) |
Oct
(206) |
Nov
(93) |
Dec
(53) |
| 2017 |
Jan
(65) |
Feb
(82) |
Mar
(102) |
Apr
(86) |
May
(187) |
Jun
(67) |
Jul
(23) |
Aug
(93) |
Sep
(65) |
Oct
(45) |
Nov
(35) |
Dec
(17) |
| 2018 |
Jan
(26) |
Feb
(35) |
Mar
(38) |
Apr
(32) |
May
(8) |
Jun
(43) |
Jul
(27) |
Aug
(30) |
Sep
(43) |
Oct
(42) |
Nov
(38) |
Dec
(67) |
| 2019 |
Jan
(32) |
Feb
(37) |
Mar
(53) |
Apr
(64) |
May
(49) |
Jun
(18) |
Jul
(14) |
Aug
(53) |
Sep
(25) |
Oct
(30) |
Nov
(49) |
Dec
(31) |
| 2020 |
Jan
(87) |
Feb
(45) |
Mar
(37) |
Apr
(51) |
May
(99) |
Jun
(36) |
Jul
(11) |
Aug
(14) |
Sep
(20) |
Oct
(24) |
Nov
(40) |
Dec
(23) |
| 2021 |
Jan
(14) |
Feb
(53) |
Mar
(85) |
Apr
(15) |
May
(19) |
Jun
(3) |
Jul
(14) |
Aug
(1) |
Sep
(57) |
Oct
(73) |
Nov
(56) |
Dec
(22) |
| 2022 |
Jan
(3) |
Feb
(22) |
Mar
(6) |
Apr
(55) |
May
(46) |
Jun
(39) |
Jul
(15) |
Aug
(9) |
Sep
(11) |
Oct
(34) |
Nov
(20) |
Dec
(36) |
| 2023 |
Jan
(79) |
Feb
(41) |
Mar
(99) |
Apr
(169) |
May
(48) |
Jun
(16) |
Jul
(16) |
Aug
(57) |
Sep
(19) |
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
1
(2) |
2
(2) |
3
|
4
(1) |
5
|
|
6
|
7
(2) |
8
(6) |
9
(2) |
10
|
11
|
12
|
|
13
|
14
|
15
(2) |
16
|
17
(1) |
18
(1) |
19
|
|
20
(1) |
21
(1) |
22
(1) |
23
|
24
|
25
|
26
|
|
27
|
28
|
29
|
30
(1) |
31
|
|
|
|
From: Julian S. <se...@so...> - 2020-12-09 12:00:20
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=cb52fee5ddbc2c0e936fd1efe5107a1afcf375cf commit cb52fee5ddbc2c0e936fd1efe5107a1afcf375cf Author: Julian Seward <js...@ac...> Date: Wed Dec 9 12:54:45 2020 +0100 Bug 414268 - Enable AArch64 feature detection and decoding for v8.x instructions (where x>0). Patch from Assad Hashmi <ass...@li...>. Diff: --- VEX/priv/main_main.c | 50 +++++++++-- VEX/pub/libvex.h | 13 ++- coregrind/m_machine.c | 234 +++++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 286 insertions(+), 11 deletions(-) diff --git a/VEX/priv/main_main.c b/VEX/priv/main_main.c index 12f521d8c3..43f053ea55 100644 --- a/VEX/priv/main_main.c +++ b/VEX/priv/main_main.c @@ -1765,11 +1765,36 @@ static const HChar* show_hwcaps_arm ( UInt hwcaps ) static const HChar* show_hwcaps_arm64 ( UInt hwcaps ) { - /* Since there are no variants, just insist that hwcaps is zero, - and declare it invalid otherwise. */ - if (hwcaps == 0) - return "baseline"; - return "Unsupported"; + static const HChar prefix[] = "v8"; + static const struct { + UInt hwcaps_bit; + HChar name[16]; + } hwcaps_list[] = { + { VEX_HWCAPS_ARM64_FHM, "fhm" }, + { VEX_HWCAPS_ARM64_DPBCVAP, "dpcvap" }, + { VEX_HWCAPS_ARM64_DPBCVADP, "dpbcvadp" }, + { VEX_HWCAPS_ARM64_SM3, "sm3" }, + { VEX_HWCAPS_ARM64_SM4, "sm4" }, + { VEX_HWCAPS_ARM64_SHA3, "sha3" }, + { VEX_HWCAPS_ARM64_RDM, "rdm" }, + { VEX_HWCAPS_ARM64_I8MM, "i8mm" }, + { VEX_HWCAPS_ARM64_ATOMICS, "atomics" }, + { VEX_HWCAPS_ARM64_BF16, "bf16" }, + { VEX_HWCAPS_ARM64_FP16, "fp16" }, + { VEX_HWCAPS_ARM64_VFP16, "vfp16" }, + }; + + static HChar buf[sizeof prefix + // '\0' + NUM_HWCAPS * (sizeof hwcaps_list[0].name + 1) + 1]; + + HChar *p = buf + vex_sprintf(buf, "%s", prefix); + UInt i; + for (i = 0 ; i < NUM_HWCAPS; ++i) { + if (hwcaps & hwcaps_list[i].hwcaps_bit) + p = p + vex_sprintf(p, "-%s", hwcaps_list[i].name); + } + + return buf; } static const HChar* show_hwcaps_s390x ( UInt hwcaps ) @@ -2130,11 +2155,20 @@ static void check_hwcaps ( VexArch arch, UInt hwcaps ) } } - case VexArchARM64: - if (hwcaps != 0) + case VexArchARM64: { + /* Mandatory dependencies. */ + Bool have_fp16 = ((hwcaps & VEX_HWCAPS_ARM64_FP16) != 0); + Bool have_vfp16 = ((hwcaps & VEX_HWCAPS_ARM64_VFP16) != 0); + if (have_fp16 != have_vfp16) invalid_hwcaps(arch, hwcaps, - "Unsupported hardware capabilities.\n"); + "Mismatch detected between scalar and vector FP16 features.\n"); + Bool have_rdm = ((hwcaps & VEX_HWCAPS_ARM64_RDM) != 0); + Bool have_atomics = ((hwcaps & VEX_HWCAPS_ARM64_ATOMICS) != 0); + if (have_rdm != have_atomics) + invalid_hwcaps(arch, hwcaps, + "Mismatch detected between RDMA and atomics features.\n"); return; + } case VexArchS390X: if (! s390_host_has_ldisp) diff --git a/VEX/pub/libvex.h b/VEX/pub/libvex.h index 2ffed0ad06..46a7a5553e 100644 --- a/VEX/pub/libvex.h +++ b/VEX/pub/libvex.h @@ -207,7 +207,18 @@ typedef #define VEX_ARM_ARCHLEVEL(x) ((x) & 0x3f) /* ARM64: baseline capability is AArch64 v8. */ -/* (no definitions since no variants so far) */ +#define VEX_HWCAPS_ARM64_FHM (1 << 4) +#define VEX_HWCAPS_ARM64_DPBCVAP (1 << 5) +#define VEX_HWCAPS_ARM64_DPBCVADP (1 << 6) +#define VEX_HWCAPS_ARM64_SM3 (1 << 7) +#define VEX_HWCAPS_ARM64_SM4 (1 << 8) +#define VEX_HWCAPS_ARM64_SHA3 (1 << 9) +#define VEX_HWCAPS_ARM64_RDM (1 << 10) +#define VEX_HWCAPS_ARM64_ATOMICS (1 << 11) +#define VEX_HWCAPS_ARM64_I8MM (1 << 12) +#define VEX_HWCAPS_ARM64_BF16 (1 << 13) +#define VEX_HWCAPS_ARM64_FP16 (1 << 14) +#define VEX_HWCAPS_ARM64_VFP16 (1 << 15) /* MIPS baseline capability */ /* Assigned Company values for bits 23:16 of the PRId Register diff --git a/coregrind/m_machine.c b/coregrind/m_machine.c index 228ae2554e..1bf50846d2 100644 --- a/coregrind/m_machine.c +++ b/coregrind/m_machine.c @@ -478,7 +478,7 @@ Int VG_(machine_arm_archlevel) = 4; testing, so we need a VG_MINIMAL_JMP_BUF. */ #if defined(VGA_ppc32) || defined(VGA_ppc64be) || defined(VGA_ppc64le) \ || defined(VGA_arm) || defined(VGA_s390x) || defined(VGA_mips32) \ - || defined(VGA_mips64) + || defined(VGA_mips64) || defined(VGA_arm64) #include "pub_core_libcsetjmp.h" static VG_MINIMAL_JMP_BUF(env_unsup_insn); static void handler_unsup_insn ( Int x ) { @@ -1719,10 +1719,84 @@ Bool VG_(machine_get_hwcaps)( void ) #elif defined(VGA_arm64) { + /* Use the attribute and feature registers to determine host hardware + * capabilities. Only user-space features are read. Naming conventions + * follow the Arm Architecture Reference Manual. + * + * ID_AA64ISAR0_EL1 Instruction Set Attribute Register 0 + * ---------------- + * ...5544 4444 4444 3333 3333 3332 2222 2222 1111 1111 11 + * ...1098 7654 3210 9876 5432 1098 7654 3210 9876 5432 1098 7654 3210 + * FHM DP SM4 SM3 SHA3 RDM ATOMICS + * + * ID_AA64ISAR1_EL1 Instruction Set Attribute Register 1 + * ---------------- + * ...5555 5544 4444 4444 3333 3333 3332 2222 2222 1111 1111 11 + * ...5432 1098 7654 3210 9876 5432 1098 7654 3210 9876 5432 1098 7654 3210 + * ...I8MM BF16 DPB + * + * ID_AA64PFR0_EL1 Processor Feature Register 0 + * --------------- + * 6666...2222 2222 1111 1111 11 + * 3210...7654 3210 9876 5432 1098 7654 3210 + * ASIMD FP16 + */ + + Bool is_base_v8 = False; + + Bool have_fhm, have_dp, have_sm4, have_sm3, have_sha3, have_rdm; + Bool have_atomics, have_i8mm, have_bf16, have_dpbcvap, have_dpbcvadp; + Bool have_vfp16, have_fp16; + + have_fhm = have_dp = have_sm4 = have_sm3 = have_sha3 = have_rdm + = have_atomics = have_i8mm = have_bf16 = have_dpbcvap + = have_dpbcvadp = have_vfp16 = have_fp16 = False; + + /* Some baseline v8.0 kernels do not allow reads of these registers. Use + * the same SIGILL handling algorithm as other architectures for such + * kernels. + */ + vki_sigset_t saved_set, tmp_set; + vki_sigaction_fromK_t saved_sigill_act; + vki_sigaction_toK_t tmp_sigill_act; + + vg_assert(sizeof(vki_sigaction_fromK_t) == sizeof(vki_sigaction_toK_t)); + + VG_(sigemptyset)(&tmp_set); + VG_(sigaddset)(&tmp_set, VKI_SIGILL); + + Int r; + + r = VG_(sigprocmask)(VKI_SIG_UNBLOCK, &tmp_set, &saved_set); + vg_assert(r == 0); + + r = VG_(sigaction)(VKI_SIGILL, NULL, &saved_sigill_act); + vg_assert(r == 0); + tmp_sigill_act = saved_sigill_act; + + /* NODEFER: signal handler does not return (from the kernel's point of + view), hence if it is to successfully catch a signal more than once, + we need the NODEFER flag. */ + tmp_sigill_act.sa_flags &= ~VKI_SA_RESETHAND; + tmp_sigill_act.sa_flags &= ~VKI_SA_SIGINFO; + tmp_sigill_act.sa_flags |= VKI_SA_NODEFER; + tmp_sigill_act.ksa_handler = handler_unsup_insn; + VG_(sigaction)(VKI_SIGILL, &tmp_sigill_act, NULL); + + /* Does reading ID_AA64ISAR0_EL1 register throw SIGILL on base v8.0? */ + if (VG_MINIMAL_SETJMP(env_unsup_insn)) + is_base_v8 = True; + else + __asm__ __volatile__("mrs x0, ID_AA64ISAR0_EL1"); + + VG_(convert_sigaction_fromK_to_toK)(&saved_sigill_act, &tmp_sigill_act); + VG_(sigaction)(VKI_SIGILL, &tmp_sigill_act, NULL); + VG_(sigprocmask)(VKI_SIG_SETMASK, &saved_set, NULL); + va = VexArchARM64; vai.endness = VexEndnessLE; - /* So far there are no variants. */ + /* Baseline features are v8.0. */ vai.hwcaps = 0; VG_(machine_get_cache_info)(&vai); @@ -1747,6 +1821,162 @@ Bool VG_(machine_get_hwcaps)( void ) VG_(debugLog)(1, "machine", "ARM64: requires_fallback_LLSC: %s\n", vai.arm64_requires_fallback_LLSC ? "yes" : "no"); + if (is_base_v8) + return True; + + /* ID_AA64ISAR0_EL1 Instruction set attribute register 0 fields */ + #define ID_AA64ISAR0_FHM_SHIFT 48 + #define ID_AA64ISAR0_DP_SHIFT 44 + #define ID_AA64ISAR0_SM4_SHIFT 40 + #define ID_AA64ISAR0_SM3_SHIFT 36 + #define ID_AA64ISAR0_SHA3_SHIFT 32 + #define ID_AA64ISAR0_RDM_SHIFT 28 + #define ID_AA64ISAR0_ATOMICS_SHIFT 20 + /* Field values */ + #define ID_AA64ISAR0_FHM_SUPPORTED 0x1 + #define ID_AA64ISAR0_DP_SUPPORTED 0x1 + #define ID_AA64ISAR0_SM4_SUPPORTED 0x1 + #define ID_AA64ISAR0_SM3_SUPPORTED 0x1 + #define ID_AA64ISAR0_SHA3_SUPPORTED 0x1 + #define ID_AA64ISAR0_RDM_SUPPORTED 0x1 + #define ID_AA64ISAR0_ATOMICS_SUPPORTED 0x2 + + /* ID_AA64ISAR1_EL1 Instruction set attribute register 1 fields */ + #define ID_AA64ISAR1_I8MM_SHIFT 52 + #define ID_AA64ISAR1_BF16_SHIFT 44 + #define ID_AA64ISAR1_DPB_SHIFT 0 + /* Field values */ + #define ID_AA64ISAR1_I8MM_SUPPORTED 0x1 + #define ID_AA64ISAR1_BF16_SUPPORTED 0x1 + #define ID_AA64ISAR1_DPBCVAP_SUPPORTED 0x1 + #define ID_AA64ISAR1_DPBCVADP_SUPPORTED 0x2 + + /* ID_AA64PFR0_EL1 Processor feature register 0 fields */ + #define ID_AA64PFR0_VFP16_SHIFT 20 + #define ID_AA64PFR0_FP16_SHIFT 16 + /* Field values */ + #define ID_AA64PFR0_VFP16_SUPPORTED 0x1 + #define ID_AA64PFR0_FP16_SUPPORTED 0x1 + + #define get_cpu_ftr(id) ({ \ + unsigned long val; \ + asm("mrs %0, "#id : "=r" (val)); \ + VG_(debugLog)(1, "machine", "ARM64: %-20s: 0x%016lx\n", #id, val); \ + }) + get_cpu_ftr(ID_AA64ISAR0_EL1); + get_cpu_ftr(ID_AA64ISAR1_EL1); + get_cpu_ftr(ID_AA64PFR0_EL1); + + #define get_ftr(id, ftr, fval, have_ftr) ({ \ + unsigned long rval; \ + asm("mrs %0, "#id : "=r" (rval)); \ + have_ftr = (fval & ((rval >> ftr) & 0xf)) >= fval ? True : False; \ + }) + + /* Read ID_AA64ISAR0_EL1 attributes */ + + /* FHM indicates support for FMLAL and FMLSL instructions. + * Optional for v8.2. + */ + get_ftr(ID_AA64ISAR0_EL1, ID_AA64ISAR0_FHM_SHIFT, + ID_AA64ISAR0_FHM_SUPPORTED, have_fhm); + + /* DP indicates support for UDOT and SDOT instructions. + * Optional for v8.2. + */ + get_ftr(ID_AA64ISAR0_EL1, ID_AA64ISAR0_DP_SHIFT, + ID_AA64ISAR0_DP_SUPPORTED, have_dp); + + /* SM4 indicates support for SM4E and SM4EKEY instructions. + * Optional for v8.2. + */ + get_ftr(ID_AA64ISAR0_EL1, ID_AA64ISAR0_SM4_SHIFT, + ID_AA64ISAR0_SM4_SUPPORTED, have_sm4); + + /* SM3 indicates support for SM3SS1, SM3TT1A, SM3TT1B, SM3TT2A, * SM3TT2B, + * SM3PARTW1, and SM3PARTW2 instructions. + * Optional for v8.2. + */ + get_ftr(ID_AA64ISAR0_EL1, ID_AA64ISAR0_SM3_SHIFT, + ID_AA64ISAR0_SM3_SUPPORTED, have_sm3); + + /* SHA3 indicates support for EOR3, RAX1, XAR, and BCAX instructions. + * Optional for v8.2. + */ + get_ftr(ID_AA64ISAR0_EL1, ID_AA64ISAR0_SHA3_SHIFT, + ID_AA64ISAR0_SHA3_SUPPORTED, have_sha3); + + /* RDM indicates support for SQRDMLAH and SQRDMLSH instructions. + * Mandatory from v8.1 onwards. + */ + get_ftr(ID_AA64ISAR0_EL1, ID_AA64ISAR0_RDM_SHIFT, + ID_AA64ISAR0_RDM_SUPPORTED, have_rdm); + + /* v8.1 ATOMICS indicates support for LDADD, LDCLR, LDEOR, LDSET, LDSMAX, + * LDSMIN, LDUMAX, LDUMIN, CAS, CASP, and SWP instructions. + * Mandatory from v8.1 onwards. + */ + get_ftr(ID_AA64ISAR0_EL1, ID_AA64ISAR0_ATOMICS_SHIFT, + ID_AA64ISAR0_ATOMICS_SUPPORTED, have_atomics); + + /* Read ID_AA64ISAR1_EL1 attributes */ + + /* I8MM indicates support for SMMLA, SUDOT, UMMLA, USMMLA, and USDOT + * instructions. + * Optional for v8.2. + */ + get_ftr(ID_AA64ISAR1_EL1, ID_AA64ISAR1_I8MM_SHIFT, + ID_AA64ISAR1_I8MM_SUPPORTED, have_i8mm); + + /* BF16 indicates support for BFDOT, BFMLAL, BFMLAL2, BFMMLA, BFCVT, and + * BFCVT2 instructions. + * Optional for v8.2. + */ + get_ftr(ID_AA64ISAR1_EL1, ID_AA64ISAR1_BF16_SHIFT, + ID_AA64ISAR1_BF16_SUPPORTED, have_bf16); + + /* DPB indicates support for DC CVAP instruction. + * Mandatory for v8.2 onwards. + */ + get_ftr(ID_AA64ISAR1_EL1, ID_AA64ISAR1_DPB_SHIFT, + ID_AA64ISAR1_DPBCVAP_SUPPORTED, have_dpbcvap); + + /* DPB indicates support for DC CVADP instruction. + * Optional for v8.2. + */ + get_ftr(ID_AA64ISAR1_EL1, ID_AA64ISAR1_DPB_SHIFT, + ID_AA64ISAR1_DPBCVADP_SUPPORTED, have_dpbcvadp); + + /* Read ID_AA64PFR0_EL1 attributes */ + + /* VFP16 indicates support for half-precision vector arithmetic. + * Optional for v8.2. Must be the same value as FP16. + */ + get_ftr(ID_AA64PFR0_EL1, ID_AA64PFR0_VFP16_SHIFT, + ID_AA64PFR0_VFP16_SUPPORTED, have_vfp16); + + /* FP16 indicates support for half-precision scalar arithmetic. + * Optional for v8.2. Must be the same value as VFP16. + */ + get_ftr(ID_AA64PFR0_EL1, ID_AA64PFR0_FP16_SHIFT, + ID_AA64PFR0_FP16_SUPPORTED, have_fp16); + + if (have_fhm) vai.hwcaps |= VEX_HWCAPS_ARM64_FHM; + if (have_dpbcvap) vai.hwcaps |= VEX_HWCAPS_ARM64_DPBCVAP; + if (have_dpbcvadp) vai.hwcaps |= VEX_HWCAPS_ARM64_DPBCVADP; + if (have_sm3) vai.hwcaps |= VEX_HWCAPS_ARM64_SM3; + if (have_sm4) vai.hwcaps |= VEX_HWCAPS_ARM64_SM4; + if (have_sha3) vai.hwcaps |= VEX_HWCAPS_ARM64_SHA3; + if (have_rdm) vai.hwcaps |= VEX_HWCAPS_ARM64_RDM; + if (have_i8mm) vai.hwcaps |= VEX_HWCAPS_ARM64_I8MM; + if (have_atomics) vai.hwcaps |= VEX_HWCAPS_ARM64_ATOMICS; + if (have_bf16) vai.hwcaps |= VEX_HWCAPS_ARM64_BF16; + if (have_fp16) vai.hwcaps |= VEX_HWCAPS_ARM64_FP16; + if (have_vfp16) vai.hwcaps |= VEX_HWCAPS_ARM64_VFP16; + + #undef get_cpu_ftr + #undef get_ftr + return True; } |
|
From: Paul F. <pa...@so...> - 2020-12-09 07:57:46
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=383e463e1a0f3b6b1ba4783de4d490956b9ea7a7 commit 383e463e1a0f3b6b1ba4783de4d490956b9ea7a7 Author: Paul Floyd <pj...@wa...> Date: Wed Dec 9 08:55:55 2020 +0100 Initial change for Bug 429952 didn't work well with older GCC. Use the __clang__ macro instead. Diff: --- drd/tests/std_thread.cpp | 2 +- drd/tests/std_thread2.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drd/tests/std_thread.cpp b/drd/tests/std_thread.cpp index 7114e401e8..0e19cbcc16 100644 --- a/drd/tests/std_thread.cpp +++ b/drd/tests/std_thread.cpp @@ -21,7 +21,7 @@ int main(int argc, char** argv) return 0; } -#if defined(__GNUC__) && __GNUC__ -0 < 6 && (defined(_GLIBCXX_THREAD_ABI_COMPAT) && _GLIBCXX_THREAD_ABI_COMPAT) +#if defined(__GNUC__) && __GNUC__ -0 < 6 && !defined(__clang__) // // From libstdc++-v3/src/c++11/thread.cc // diff --git a/drd/tests/std_thread2.cpp b/drd/tests/std_thread2.cpp index eef5ba30ff..ab764e8e27 100644 --- a/drd/tests/std_thread2.cpp +++ b/drd/tests/std_thread2.cpp @@ -26,7 +26,7 @@ int main(int argc, char** argv) return 0; } -#if defined(__GNUC__) && __GNUC__ -0 < 6 && (defined(_GLIBCXX_THREAD_ABI_COMPAT) && _GLIBCXX_THREAD_ABI_COMPAT) +#if defined(__GNUC__) && __GNUC__ -0 < 6 && !defined(__clang__) // // From libstdc++-v3/src/c++11/thread.cc // |