[llvm-commits] [compiler-rt] r172613 - /compiler-rt/trunk/lib/sanitizer_common/sanitizer_internal_defs.h
Dmitry Vyukov
dvyukov at google.com
Wed Jan 16 06:35:13 PST 2013
Author: dvyukov
Date: Wed Jan 16 08:35:13 2013
New Revision: 172613
URL: http://llvm.org/viewvc/llvm-project?rev=172613&view=rev
Log:
asan: fix ARM build
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_internal_defs.h
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_internal_defs.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_internal_defs.h?rev=172613&r1=172612&r2=172613&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_internal_defs.h (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_internal_defs.h Wed Jan 16 08:35:13 2013
@@ -52,7 +52,12 @@
# define UNLIKELY(x) __builtin_expect(!!(x), 0)
# define UNUSED __attribute__((unused))
# define USED __attribute__((used))
-# define PREFETCH(x) __asm__("prefetchnta (%0)" : : "r" (x))
+# if defined(__i386__) || defined(__x86_64__)
+// __builtin_prefetch(x) generates prefetchnt0 on x86
+# define PREFETCH(x) __asm__("prefetchnta (%0)" : : "r" (x))
+# else
+# define PREFETCH(x) __builtin_prefetch(x)
+# endif
#endif // _MSC_VER
#if defined(_WIN32)
More information about the llvm-commits
mailing list