aboutsummaryrefslogtreecommitdiff
path: root/core/hash/xxhash/common.odin
diff options
context:
space:
mode:
authorJeroen van Rijn <Kelimion@users.noreply.github.com>2021-09-11 15:45:17 +0200
committerJeroen van Rijn <Kelimion@users.noreply.github.com>2021-09-11 15:45:17 +0200
commit5f920414d7989daa4029270a716d06505b4dfff9 (patch)
tree909845aaae9bcc5a3e572d48257dbafa49858174 /core/hash/xxhash/common.odin
parent72782d903502ebdf3174f918d15d9487575506d7 (diff)
xxhash: Disable prefetch on Linux.
Diffstat (limited to 'core/hash/xxhash/common.odin')
-rw-r--r--core/hash/xxhash/common.odin5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/hash/xxhash/common.odin b/core/hash/xxhash/common.odin
index 537d2d772..aac5af7e1 100644
--- a/core/hash/xxhash/common.odin
+++ b/core/hash/xxhash/common.odin
@@ -47,7 +47,10 @@ Error :: enum {
XXH_DISABLE_PREFETCH :: #config(XXH_DISABLE_PREFETCH, false)
-when !XXH_DISABLE_PREFETCH {
+/*
+ llvm.prefetch fails code generation on Linux.
+*/
+when !XXH_DISABLE_PREFETCH && ODIN_OS == "windows" {
import "core:sys/llvm"
prefetch_address :: #force_inline proc(address: rawptr) {