]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb/djgpp: Add Hygon Dhyana processor support
authorJinke Fan <fanjinke51@yeah.net>
Wed, 15 May 2019 09:34:57 +0000 (17:34 +0800)
committerPedro Alves <palves@redhat.com>
Wed, 21 Aug 2019 17:07:39 +0000 (18:07 +0100)
Chengdu Haiguang IC Design Co., Ltd (Hygon) is a Joint Venture between
AMD and Haiguang Information Technology Co.,Ltd., which aims at
providing high performance x86 processors for the China server market.
Its first generation processor codename is Dhyana, which originates
from AMD technology and shares most of the architecture with AMD's
family 17h, but with different CPU Vendor ID("HygonGenuine")/Family
series number(Family 18h).

gdb/ChangeLog:
2019-08-21  Jinke Fan  <fanjinke51@yeah.net>

* go32-nat.c (go32_sysinfo): Add hygon_p.

gdb/ChangeLog
gdb/go32-nat.c

index 41d02a6b49b36acd905491f92a697036f02b2945..3d9c3ce1b1f67c2007f50e9869036f64db23e33b 100644 (file)
@@ -1,3 +1,7 @@
+2019-08-21  Jinke Fan  <fanjinke51@yeah.net>
+
+       * go32-nat.c (go32_sysinfo): Add hygon_p.
+
 2019-08-20  Tom Tromey  <tom@tromey.com>
 
        * tui/tui-regs.h (struct tui_data_window) <last_regs_line_no,
index 6a58565fef1c8717a0e0eba9b167a48ba989b66f..81fcfe2c2acbfe6844b3e4c053be07fd219612dc 100644 (file)
@@ -1162,6 +1162,7 @@ go32_sysinfo (const char *arg, int from_tty)
       unsigned brand_idx;
       int intel_p = strcmp (cpuid_vendor, "GenuineIntel") == 0;
       int amd_p = strcmp (cpuid_vendor, "AuthenticAMD") == 0;
+      int hygon_p = strcmp (cpuid_vendor, "HygonGenuine") == 0;
       unsigned cpu_family, cpu_model;
 
 #if 0
@@ -1261,12 +1262,12 @@ go32_sysinfo (const char *arg, int from_tty)
            }
        }
       xsnprintf (cpu_string, sizeof (cpu_string), "%s%s Model %d Stepping %d",
-                intel_p ? "Pentium" : (amd_p ? "AMD" : "ix86"),
+                intel_p ? "Pentium" : (amd_p ? "AMD" : (hygon_p ? "Hygon" : "ix86")),
                 cpu_brand, cpu_model, cpuid_eax & 0xf);
       printfi_filtered (31, "%s\n", cpu_string);
       if (((cpuid_edx & (6 | (0x0d << 23))) != 0)
          || ((cpuid_edx & 1) == 0)
-         || (amd_p && (cpuid_edx & (3 << 30)) != 0))
+         || ((amd_p || hygon_p) && (cpuid_edx & (3 << 30)) != 0))
        {
          puts_filtered ("CPU Features...................");
          /* We only list features which might be useful in the DPMI
@@ -1285,7 +1286,7 @@ go32_sysinfo (const char *arg, int from_tty)
            puts_filtered ("SSE ");
          if ((cpuid_edx & (1 << 26)) != 0)
            puts_filtered ("SSE2 ");
-         if (amd_p)
+         if (amd_p || hygon_p)
            {
              if ((cpuid_edx & (1 << 31)) != 0)
                puts_filtered ("3DNow! ");