From 5b1f8cb4d060eead34a8136ab64e577eb7a866a3 Mon Sep 17 00:00:00 2001 From: fanjinke Date: Thu, 16 May 2019 23:39:53 +0800 Subject: [PATCH] libgimpbase: add hygon cpu detection and enable MMX/SSE support Signed-off-by: fanjinke --- libgimpbase/gimpcpuaccel.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libgimpbase/gimpcpuaccel.c b/libgimpbase/gimpcpuaccel.c index 3bf9276aba..86a2d4970b 100644 --- a/libgimpbase/gimpcpuaccel.c +++ b/libgimpbase/gimpcpuaccel.c @@ -101,6 +101,7 @@ typedef enum ARCH_X86_VENDOR_RISE, ARCH_X86_VENDOR_UMC, ARCH_X86_VENDOR_SIS, + ARCH_X86_VENDOR_HYGON, ARCH_X86_VENDOR_UNKNOWN = 0xff } X86Vendor; @@ -195,6 +196,8 @@ arch_get_vendor (void) #ifdef ARCH_X86_64 if (strcmp (id.idaschar, "AuthenticAMD") == 0) return ARCH_X86_VENDOR_AMD; + else if (strcmp (id.idaschar, "HygonGenuine") == 0) + return ARCH_X86_VENDOR_HYGON; else if (strcmp (id.idaschar, "GenuineIntel") == 0) return ARCH_X86_VENDOR_INTEL; #else @@ -202,6 +205,8 @@ arch_get_vendor (void) return ARCH_X86_VENDOR_INTEL; else if (strcmp (id.idaschar, "AuthenticAMD") == 0) return ARCH_X86_VENDOR_AMD; + else if (strcmp (id.idaschar, "HygonGenuine") == 0) + return ARCH_X86_VENDOR_HYGON; else if (strcmp (id.idaschar, "CentaurHauls") == 0) return ARCH_X86_VENDOR_CENTAUR; else if (strcmp (id.idaschar, "CyrixInstead") == 0) @@ -406,6 +411,7 @@ arch_accel (void) break; case ARCH_X86_VENDOR_AMD: + case ARCH_X86_VENDOR_HYGON: caps = arch_accel_amd (); break;