aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/hash/xxhash/common.odin4
-rw-r--r--tests/core/Makefile2
2 files changed, 4 insertions, 2 deletions
diff --git a/core/hash/xxhash/common.odin b/core/hash/xxhash/common.odin
index 4fa0b9d55..537d2d772 100644
--- a/core/hash/xxhash/common.odin
+++ b/core/hash/xxhash/common.odin
@@ -11,7 +11,7 @@ package xxhash
import "core:intrinsics"
import "core:runtime"
-import "core:sys/llvm"
+
mem_copy :: runtime.mem_copy
byte_swap :: intrinsics.byte_swap
@@ -48,6 +48,8 @@ Error :: enum {
XXH_DISABLE_PREFETCH :: #config(XXH_DISABLE_PREFETCH, false)
when !XXH_DISABLE_PREFETCH {
+ import "core:sys/llvm"
+
prefetch_address :: #force_inline proc(address: rawptr) {
llvm.prefetch(address, .Read, .High, .Data)
}
diff --git a/tests/core/Makefile b/tests/core/Makefile
index 5bcb924b1..65f3ee36f 100644
--- a/tests/core/Makefile
+++ b/tests/core/Makefile
@@ -16,4 +16,4 @@ strings_test:
$(ODIN) run strings/test_core_strings.odin
hash_test:
- $(ODIN) run hash/test_core_hash.odin -o:size -no-bounds-check \ No newline at end of file
+ $(ODIN) run hash -out=test_hash -o:speed -no-bounds-check -define:XXH_DISABLE_PREFETCH=true \ No newline at end of file