]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gcconfig.h (PREFETCH): Use __builtin_prefetch for gcc >= 3.0.
authorH.J. Lu <hongjiu.lu@intel.com>
Wed, 7 Apr 2004 23:06:50 +0000 (23:06 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Wed, 7 Apr 2004 23:06:50 +0000 (16:06 -0700)
2004-04-07  H.J. Lu  <hongjiu.lu@intel.com>

* include/private/gcconfig.h (PREFETCH): Use __builtin_prefetch
for gcc >= 3.0.
(PREFETCH_FOR_WRITE): Likewise.

From-SVN: r80491

boehm-gc/ChangeLog
boehm-gc/include/private/gcconfig.h

index 31d9cab33a80cce098fc0c99a3ad46a847661f0a..e386223bc6ff31392ecf8e1547e442972923a311 100644 (file)
@@ -1,3 +1,9 @@
+2004-04-07  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * 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.
index b07d4b9a18e9dfb72fffe7a2337fbca349ee3ba0..3ecbcdf5ffe1ad9ed2f94a022ca6618b9f97c176 100644 (file)
             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