From 34517b26c8017d696aa4b336f8ad7d64ad163d08 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Mon, 11 Sep 2006 21:05:16 +0200 Subject: [PATCH] Enable prefetching on some more CPU's. --- lib/prefetch.h | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/lib/prefetch.h b/lib/prefetch.h index 8c97906d..776fc6a6 100644 --- a/lib/prefetch.h +++ b/lib/prefetch.h @@ -1,7 +1,7 @@ /* * UCW Library -- Prefetch * - * (c) 1997--2005 Martin Mares + * (c) 1997--2006 Martin Mares * * This software may be freely distributed and used according to the terms * of the GNU Lesser General Public License. @@ -10,18 +10,12 @@ #ifndef _UCW_PREFETCH_H #define _UCW_PREFETCH_H -#if defined(__pentium4) - -#define HAVE_PREFETCH -static inline void prefetch(void *addr) -{ - asm volatile ("prefetcht0 %0" : : "m" (*(byte*)addr)); -} - -#elif defined(__k6) +#if defined(__k6) /* K6 doesn't have prefetches */ -#elif defined(__athlon) || defined(__i686) +#elif defined(__athlon) || defined(__k8) || \ + defined(__i686) || \\ + defined(__pentium4) || defined(__prescott) || defined(__nocona) #define HAVE_PREFETCH static inline void prefetch(void *addr) -- 2.39.2