29 lines
1,002 B
Diff
29 lines
1,002 B
Diff
From 4e32231c73cb7a9b004fb160d03c26498ec3860d Mon Sep 17 00:00:00 2001
|
|
From: Zhao Hang <wb-zh951434@alibaba-inc.com>
|
|
Date: Tue, 28 May 2024 10:10:11 +0800
|
|
Subject: [PATCH] Add Hygon Support
|
|
|
|
Signed-off-by: Zhao Hang <wb-zh951434@alibaba-inc.com>
|
|
---
|
|
sysdeps/x86/cpu-features.c | 5 +++--
|
|
1 file changed, 3 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/sysdeps/x86/cpu-features.c b/sysdeps/x86/cpu-features.c
|
|
index 1248a702..c72dc2f3 100644
|
|
--- a/sysdeps/x86/cpu-features.c
|
|
+++ b/sysdeps/x86/cpu-features.c
|
|
@@ -546,8 +546,9 @@ init_cpu_features (struct cpu_features *cpu_features)
|
|
|= bit_arch_Prefer_AVX2_STRCMP;
|
|
}
|
|
}
|
|
- /* This spells out "AuthenticAMD". */
|
|
- else if (ebx == 0x68747541 && ecx == 0x444d4163 && edx == 0x69746e65)
|
|
+ /* This spells out "AuthenticAMD" or "HygonGenuine". */
|
|
+ else if ((ebx == 0x68747541 && ecx == 0x444d4163 && edx == 0x69746e65)||(ebx == 0x6f677948 && ecx == 0x656e6975 && edx == 0x6e65476e))
|
|
+
|
|
{
|
|
unsigned int extended_model;
|
|
|
|
--
|
|
2.31.1
|
|
|