xxhash: Disable prefetch on Linux.

This commit is contained in:
Jeroen van Rijn
2021-09-11 15:45:17 +02:00
parent 72782d9035
commit 5f920414d7
2 changed files with 5 additions and 2 deletions
+4 -1
View File
@@ -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) {
+1 -1
View File
@@ -16,4 +16,4 @@ strings_test:
$(ODIN) run strings/test_core_strings.odin
hash_test:
$(ODIN) run hash -out=test_hash -o:speed -no-bounds-check -define:XXH_DISABLE_PREFETCH=true
$(ODIN) run hash -out=test_hash -o:speed -no-bounds-check