e354a5
commit 76d5b2f002a1243ddba06bd646249553353f4322
e354a5
Author: H.J. Lu <hjl.tools@gmail.com>
e354a5
Date:   Thu May 21 13:36:54 2020 -0700
e354a5
e354a5
    x86: Update Intel Atom processor family optimization
e354a5
    
e354a5
    Enable Intel Silvermont optimization for Intel Goldmont Plus.  Detect more
e354a5
    Intel Airmont processors.  Optimize Intel Tremont like Intel Silvermont
e354a5
    with rep string instructions.
e354a5
e354a5
diff --git a/sysdeps/x86/cpu-features.c b/sysdeps/x86/cpu-features.c
e354a5
index c432d646ce6806a6..2a801e1856cfe1b3 100644
e354a5
--- a/sysdeps/x86/cpu-features.c
e354a5
+++ b/sysdeps/x86/cpu-features.c
e354a5
@@ -347,18 +347,23 @@ init_cpu_features (struct cpu_features *cpu_features)
e354a5
 	    case 0x57:
e354a5
 	      /* Knights Landing.  Enable Silvermont optimizations.  */
e354a5
 
e354a5
+	    case 0x7a:
e354a5
+	      /* Unaligned load versions are faster than SSSE3
e354a5
+		 on Goldmont Plus.  */
e354a5
+
e354a5
 	    case 0x5c:
e354a5
 	    case 0x5f:
e354a5
 	      /* Unaligned load versions are faster than SSSE3
e354a5
 		 on Goldmont.  */
e354a5
 
e354a5
 	    case 0x4c:
e354a5
+	    case 0x5a:
e354a5
+	    case 0x75:
e354a5
 	      /* Airmont is a die shrink of Silvermont.  */
e354a5
 
e354a5
 	    case 0x37:
e354a5
 	    case 0x4a:
e354a5
 	    case 0x4d:
e354a5
-	    case 0x5a:
e354a5
 	    case 0x5d:
e354a5
 	      /* Unaligned load versions are faster than SSSE3
e354a5
 		 on Silvermont.  */
e354a5
@@ -369,6 +374,19 @@ init_cpu_features (struct cpu_features *cpu_features)
e354a5
 		    | bit_arch_Slow_SSE4_2);
e354a5
 	      break;
e354a5
 
e354a5
+	    case 0x86:
e354a5
+	    case 0x96:
e354a5
+	    case 0x9c:
e354a5
+	      /* Enable rep string instructions, unaligned load, unaligned
e354a5
+	         copy, pminub and avoid SSE 4.2 on Tremont.  */
e354a5
+	      cpu_features->feature[index_arch_Fast_Rep_String]
e354a5
+		|= (bit_arch_Fast_Rep_String
e354a5
+		    | bit_arch_Fast_Unaligned_Load
e354a5
+		    | bit_arch_Fast_Unaligned_Copy
e354a5
+		    | bit_arch_Prefer_PMINUB_for_stringop
e354a5
+		    | bit_arch_Slow_SSE4_2);
e354a5
+	      break;
e354a5
+
e354a5
 	    default:
e354a5
 	      /* Unknown family 0x06 processors.  Assuming this is one
e354a5
 		 of Core i3/i5/i7 processors if AVX is available.  */