summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2019-05-18 11:02:03 -0400
committerBen Gamari <ben@smart-cactus.org>2019-10-22 12:18:39 -0400
commitdacf4cae179e4f9ee67cd2a5e0c9de7900b5f274 (patch)
treeb49e70785bdb68aeff641f95e8dd1190503c5509 /includes
parente5eda61e768a74723f6e7955cc9247c14ecabc6d (diff)
downloadhaskell-dacf4cae179e4f9ee67cd2a5e0c9de7900b5f274.tar.gz
rts: Add prefetch macros
Diffstat (limited to 'includes')
-rw-r--r--includes/Rts.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/includes/Rts.h b/includes/Rts.h
index def06de90d..7ad6988f3b 100644
--- a/includes/Rts.h
+++ b/includes/Rts.h
@@ -74,6 +74,10 @@ extern "C" {
#define RTS_UNREACHABLE abort()
#endif
+/* Prefetch primitives */
+#define prefetchForRead(ptr) __builtin_prefetch(ptr, 0)
+#define prefetchForWrite(ptr) __builtin_prefetch(ptr, 1)
+
/* Fix for mingw stat problem (done here so it's early enough) */
#if defined(mingw32_HOST_OS)
#define __MSVCRT__ 1