aboutsummaryrefslogtreecommitdiff
path: root/boehm-gc
diff options
context:
space:
mode:
authorH.J. Lu <hongjiu.lu@intel.com>2004-04-06 18:05:05 +0000
committerH.J. Lu <hjl@gcc.gnu.org>2004-04-06 11:05:05 -0700
commit652466353b681ca7d7d6e04095a41c638ef794cf (patch)
treec5f025a9cb7182caa6ea50a3b0a159295b43adb4 /boehm-gc
parentbef1d7003fb08e9422ead524d0b749e5b03b7ff8 (diff)
downloadgcc-652466353b681ca7d7d6e04095a41c638ef794cf.zip
gcc-652466353b681ca7d7d6e04095a41c638ef794cf.tar.gz
gcc-652466353b681ca7d7d6e04095a41c638ef794cf.tar.bz2
gcconfig.h (PREFETCH): Use __builtin_prefetch for gcc >= 3.0.
2004-04-06 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: r80459
Diffstat (limited to 'boehm-gc')
-rw-r--r--boehm-gc/ChangeLog6
-rw-r--r--boehm-gc/include/private/gcconfig.h8
2 files changed, 10 insertions, 4 deletions
diff --git a/boehm-gc/ChangeLog b/boehm-gc/ChangeLog
index a840914..182fef1 100644
--- a/boehm-gc/ChangeLog
+++ b/boehm-gc/ChangeLog
@@ -1,3 +1,9 @@
+2004-04-06 H.J. Lu <hongjiu.lu@intel.com>
+
+ * include/private/gcconfig.h (PREFETCH): Use __builtin_prefetch
+ for gcc >= 3.0.
+ (PREFETCH_FOR_WRITE): Likewise.
+
2004-03-10 Kelley Cook <kcook@gcc.gnu.org>
* configure.ac: Bump AC_PREREQ to 2.59.
diff --git a/boehm-gc/include/private/gcconfig.h b/boehm-gc/include/private/gcconfig.h
index a13ad2e..32b6e48 100644
--- a/boehm-gc/include/private/gcconfig.h
+++ b/boehm-gc/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