All of lore.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@linux.intel.com>
To: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org
Cc: Florian Mickler <florian@mickler.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Russell King <linux@arm.linux.org.uk>,
	Mike Frysinger <vapier@gentoo.org>, Ingo Molnar <mingo@elte.hu>,
	Thomas Gleixner <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	"H. Peter Anvin" <hpa@linux.intel.com>
Subject: [PATCH 4/5] x86, mem: Remove gcc < 4.1 support code for memcpy()
Date: Mon, 13 Sep 2010 13:14:39 -0700	[thread overview]
Message-ID: <1284408880-14414-5-git-send-email-hpa@linux.intel.com> (raw)
In-Reply-To: <1284408880-14414-1-git-send-email-hpa@linux.intel.com>

We require gcc 4.1 or later, so remove support code for previous
versions of gcc.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
---
 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


  parent reply	other threads:[~2010-09-13 20:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-13 20:14 [RFC PATCH 0/5] Bump gcc minimum version to 3.4, 4.1 for x86 H. Peter Anvin
2010-09-13 20:14 ` [PATCH 1/5] Disallow building with gcc < 3.4 H. Peter Anvin
2010-09-13 21:52   ` Russell King - ARM Linux
2010-09-13 20:14 ` [PATCH 2/5] x86, gcc: Disallow building Linux/x86 with gcc 3.x/4.0 H. Peter Anvin
2010-09-13 20:14 ` [PATCH 3/5] x86, cpu: Remove gcc 3.x workarounds in <asm/cpufeature.h> H. Peter Anvin
2010-09-13 20:14 ` H. Peter Anvin [this message]
2010-09-13 20:14 ` [PATCH 5/5] x86, bitops: Remove gcc < 4.1 workaround H. Peter Anvin
2010-09-14  0:11 ` [RFC PATCH 0/5] Bump gcc minimum version to 3.4, 4.1 for x86 Brian Gerst
2010-09-15 22:24   ` H. Peter Anvin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1284408880-14414-5-git-send-email-hpa@linux.intel.com \
    --to=hpa@linux.intel.com \
    --cc=florian@mickler.org \
    --cc=hpa@zytor.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=vapier@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.