From e7e2b793be5c692dec0e5d5738bdf8630ff31e5a Mon Sep 17 00:00:00 2001 From: hjl Date: Tue, 6 Apr 2004 18:05:05 +0000 Subject: [PATCH] 2004-04-06 H.J. Lu * include/private/gcconfig.h (PREFETCH): Use __builtin_prefetch for gcc >= 3.0. (PREFETCH_FOR_WRITE): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@80459 138bc75d-0d04-0410-961f-82ee72b054a4 --- ChangeLog | 6 ++++++ include/private/gcconfig.h | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index a8409143..182fef1c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-04-06 H.J. Lu + + * include/private/gcconfig.h (PREFETCH): Use __builtin_prefetch + for gcc >= 3.0. + (PREFETCH_FOR_WRITE): Likewise. + 2004-03-10 Kelley Cook * configure.ac: Bump AC_PREREQ to 2.59. diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h index a13ad2ef..32b6e482 100644 --- a/include/private/gcconfig.h +++ b/include/private/gcconfig.h @@ -1801,10 +1801,10 @@ extern int etext[]; # define DATASTART ((ptr_t)((((word) (etext)) + 0xfff) & ~0xfff)) # endif -# define PREFETCH(x) \ - __asm__ __volatile__ (" prefetch %0": : "m"(*(char *)(x))) -# define PREFETCH_FOR_WRITE(x) \ - __asm__ __volatile__ (" prefetchw %0": : "m"(*(char *)(x))) +# if defined(__GNUC__) && __GNUC__ >= 3 +# define PREFETCH(x) __builtin_prefetch ((x), 0, 0) +# define PREFETCH_FOR_WRITE(x) __builtin_prefetch ((x), 1) +# endif # endif # endif -- 2.40.0