From af28e02e74fbc9f955d292c19fa6dc790386bc4b Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Thu, 30 Apr 2020 18:04:25 -0700 Subject: [PATCH] [clang] Add vendor identity for Hygon Dhyana processor to cpuid.h The vendor id is used to determine whether the processor supports hardware CRC32 in the Scudo code. The previous discussion about the patch is in [1], and more information about Hygon Dhyana processor is in[2]. [1]: https://reviews.llvm.org/D62368 [2]: https://git.kernel.org/torvalds/c/c9661c1e80b609cd038db7c908e061f0535804ef Patch by fanjinke (Jinke Fan) Differential Revision: https://reviews.llvm.org/D78874 --- clang/lib/Headers/cpuid.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/clang/lib/Headers/cpuid.h b/clang/lib/Headers/cpuid.h index ebce647..6c38b57 100644 --- a/clang/lib/Headers/cpuid.h +++ b/clang/lib/Headers/cpuid.h @@ -24,6 +24,10 @@ #define signature_CYRIX_ebx 0x69727943 #define signature_CYRIX_edx 0x736e4978 #define signature_CYRIX_ecx 0x64616574 +/* HYGON: "HygonGenuine" */ +#define signature_HYGON_ebx 0x6f677948 +#define signature_HYGON_edx 0x6e65476e +#define signature_HYGON_ecx 0x656e6975 /* INTEL: "GenuineIntel" */ #define signature_INTEL_ebx 0x756e6547 #define signature_INTEL_edx 0x49656e69 -- 2.7.4