From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755596Ab0IMUPV (ORCPT ); Mon, 13 Sep 2010 16:15:21 -0400 Received: from mga02.intel.com ([134.134.136.20]:39660 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753922Ab0IMUOv (ORCPT ); Mon, 13 Sep 2010 16:14:51 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.56,360,1280732400"; d="scan'208";a="656856287" From: "H. Peter Anvin" To: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org Cc: Florian Mickler , Peter Zijlstra , Russell King , Mike Frysinger , Ingo Molnar , Thomas Gleixner , "H. Peter Anvin" , "H. Peter Anvin" Subject: [PATCH 4/5] x86, mem: Remove gcc < 4.1 support code for memcpy() Date: Mon, 13 Sep 2010 13:14:39 -0700 Message-Id: <1284408880-14414-5-git-send-email-hpa@linux.intel.com> X-Mailer: git-send-email 1.7.2.1 In-Reply-To: <1284408880-14414-1-git-send-email-hpa@linux.intel.com> References: <1284408880-14414-1-git-send-email-hpa@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We require gcc 4.1 or later, so remove support code for previous versions of gcc. Signed-off-by: H. Peter Anvin --- arch/x86/include/asm/string_32.h | 21 --------------------- 1 files changed, 0 insertions(+), 21 deletions(-) diff --git a/arch/x86/include/asm/string_32.h b/arch/x86/include/asm/string_32.h index 3d3e835..fde4eb2 100644 --- a/arch/x86/include/asm/string_32.h +++ b/arch/x86/include/asm/string_32.h @@ -177,16 +177,8 @@ static inline void *__memcpy3d(void *to, const void *from, size_t len) */ #ifndef CONFIG_KMEMCHECK - -#if (__GNUC__ >= 4) #define memcpy(t, f, n) __builtin_memcpy(t, f, n) #else -#define memcpy(t, f, n) \ - (__builtin_constant_p((n)) \ - ? __constant_memcpy((t), (f), (n)) \ - : __memcpy((t), (f), (n))) -#endif -#else /* * kmemcheck becomes very happy if we use the REP instructions unconditionally, * because it means that we know both memory operands in advance. @@ -284,12 +276,7 @@ void *__constant_c_and_count_memset(void *s, unsigned long pattern, { int d0, d1; -#if __GNUC__ == 4 && __GNUC_MINOR__ == 0 - /* Workaround for broken gcc 4.0 */ - register unsigned long eax asm("%eax") = pattern; -#else unsigned long eax = pattern; -#endif switch (count % 4) { case 0: @@ -321,15 +308,7 @@ void *__constant_c_and_count_memset(void *s, unsigned long pattern, : __memset_generic((s), (c), (count))) #define __HAVE_ARCH_MEMSET -#if (__GNUC__ >= 4) #define memset(s, c, count) __builtin_memset(s, c, count) -#else -#define memset(s, c, count) \ - (__builtin_constant_p(c) \ - ? __constant_c_x_memset((s), (0x01010101UL * (unsigned char)(c)), \ - (count)) \ - : __memset((s), (c), (count))) -#endif /* * find the first occurrence of byte 'c', or 1 past the area if none -- 1.7.2.1