From: H.J. Lu Date: Wed, 7 Apr 2004 23:06:50 +0000 (+0000) Subject: gcconfig.h (PREFETCH): Use __builtin_prefetch for gcc >= 3.0. X-Git-Tag: releases/gcc-3.3.4~97 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=71d57bb4dd08c8162a68029c867e7493580100d5;p=thirdparty%2Fgcc.git gcconfig.h (PREFETCH): Use __builtin_prefetch for gcc >= 3.0. 2004-04-07 H.J. Lu * include/private/gcconfig.h (PREFETCH): Use __builtin_prefetch for gcc >= 3.0. (PREFETCH_FOR_WRITE): Likewise. From-SVN: r80491 --- diff --git a/boehm-gc/ChangeLog b/boehm-gc/ChangeLog index 31d9cab33a80..e386223bc6ff 100644 --- a/boehm-gc/ChangeLog +++ b/boehm-gc/ChangeLog @@ -1,3 +1,9 @@ +2004-04-07 H.J. Lu + + * include/private/gcconfig.h (PREFETCH): Use __builtin_prefetch + for gcc >= 3.0. + (PREFETCH_FOR_WRITE): Likewise. + 2004-02-14 Release Manager * GCC 3.3.3 Released. diff --git a/boehm-gc/include/private/gcconfig.h b/boehm-gc/include/private/gcconfig.h index b07d4b9a18e9..3ecbcdf5ffe1 100644 --- a/boehm-gc/include/private/gcconfig.h +++ b/boehm-gc/include/private/gcconfig.h @@ -1667,10 +1667,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