0b0d35
From 27d3ce1467990f89126e228559dec8f84b96c60e Mon Sep 17 00:00:00 2001
0b0d35
From: "H.J. Lu" <hjl.tools@gmail.com>
0b0d35
Date: Fri, 1 Apr 2016 15:08:48 -0700
0b0d35
Subject: [PATCH] Remove Fast_Copy_Backward from Intel Core processors
0b0d35
0b0d35
Intel Core i3, i5 and i7 processors have fast unaligned copy and
0b0d35
copy backward is ignored.  Remove Fast_Copy_Backward from Intel Core
0b0d35
processors to avoid confusion.
0b0d35
0b0d35
	* sysdeps/x86/cpu-features.c (init_cpu_features): Don't set
0b0d35
	bit_arch_Fast_Copy_Backward for Intel Core proessors.
0b0d35
---
0b0d35
 ChangeLog                  | 5 +++++
0b0d35
 sysdeps/x86/cpu-features.c | 6 +-----
0b0d35
 2 files changed, 6 insertions(+), 5 deletions(-)
0b0d35
0b0d35
diff -rup a/sysdeps/x86/cpu-features.c b/sysdeps/x86/cpu-features.c
0b0d35
--- a/sysdeps/x86/cpu-features.c	2020-01-21 16:44:28.637555853 -0500
0b0d35
+++ b/sysdeps/x86/cpu-features.c	2020-01-21 16:46:51.208756416 -0500
0b0d35
@@ -116,11 +116,8 @@ init_cpu_features (struct cpu_features *
0b0d35
 	    case 0x2c:
0b0d35
 	    case 0x2e:
0b0d35
 	    case 0x2f:
0b0d35
-	      /* Rep string instructions, copy backward, unaligned loads
0b0d35
+	      /* Rep string instructions, unaligned load, unaligned copy,
0b0d35
 		 and pminub are fast on Intel Core i3, i5 and i7.  */
0b0d35
-#if index_Fast_Rep_String != index_Fast_Copy_Backward
0b0d35
-# error index_Fast_Rep_String != index_Fast_Copy_Backward
0b0d35
-#endif
0b0d35
 #if index_Fast_Rep_String != index_Fast_Unaligned_Load
0b0d35
 # error index_Fast_Rep_String != index_Fast_Unaligned_Load
0b0d35
 #endif
0b0d35
@@ -129,7 +126,6 @@ init_cpu_features (struct cpu_features *
0b0d35
 #endif
0b0d35
 	      cpu_features->feature[index_Fast_Rep_String]
0b0d35
 		|= (bit_Fast_Rep_String
0b0d35
-		    | bit_Fast_Copy_Backward
0b0d35
 		    | bit_Fast_Unaligned_Load
0b0d35
 		    | bit_Prefer_PMINUB_for_stringop);
0b0d35
 	      break;
0b0d35