Also add GC_ prefix to NO_PREFETCH_FOR_WRITE.
* include/gc_inline.h [!GC_PREFETCH_FOR_WRITE] (GC_PREFETCH_FOR_WRITE):
Copy the definition from gcconfig.h.
* include/private/gcconfig.h (NO_PREFETCH_FOR_WRITE): Rename to
GC_NO_PREFETCH_FOR_WRITE.
#endif
#ifndef GC_PREFETCH_FOR_WRITE
-# define GC_PREFETCH_FOR_WRITE(x) (void)0
+# if defined(__GNUC__) && __GNUC__ >= 3 && !defined(GC_NO_PREFETCH_FOR_WRITE)
+# define GC_PREFETCH_FOR_WRITE(x) __builtin_prefetch((x), 1)
+# else
+# define GC_PREFETCH_FOR_WRITE(x) (void)0
+# endif
#endif
/* Object kinds; must match PTRFREE, NORMAL in gc_priv.h. */
# define GC_PREFETCH_FOR_WRITE(x) \
__asm__ __volatile__ ("prefetcht0 %0" : : "m"(*(char *)(x)))
# else
-# define NO_PREFETCH_FOR_WRITE
+# define GC_NO_PREFETCH_FOR_WRITE
# endif
# elif defined(USE_3DNOW_PREFETCH)
# define PREFETCH(x) \
#endif
#ifndef GC_PREFETCH_FOR_WRITE
-# if defined(__GNUC__) && __GNUC__ >= 3 && !defined(NO_PREFETCH_FOR_WRITE)
+# if defined(__GNUC__) && __GNUC__ >= 3 && !defined(GC_NO_PREFETCH_FOR_WRITE)
# define GC_PREFETCH_FOR_WRITE(x) __builtin_prefetch((x), 1)
# else
# define GC_PREFETCH_FOR_WRITE(x) (void)0