[clang] af28e02 - [clang] Add vendor identity for Hygon Dhyana processor to cpuid.h

Craig Topper via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 30 18:17:33 PDT 2020


Author: Craig Topper
Date: 2020-04-30T18:17:01-07:00
New Revision: af28e02e74fbc9f955d292c19fa6dc790386bc4b

URL: https://github.com/llvm/llvm-project/commit/af28e02e74fbc9f955d292c19fa6dc790386bc4b
DIFF: https://github.com/llvm/llvm-project/commit/af28e02e74fbc9f955d292c19fa6dc790386bc4b.diff

LOG: [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

Added: 
    

Modified: 
    clang/lib/Headers/cpuid.h

Removed: 
    


################################################################################
diff  --git a/clang/lib/Headers/cpuid.h b/clang/lib/Headers/cpuid.h
index ebce64781788..6c38b578b30e 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


        


More information about the cfe-commits mailing list