From 72782d903502ebdf3174f918d15d9487575506d7 Mon Sep 17 00:00:00 2001 From: Jeroen van Rijn Date: Sat, 11 Sep 2021 15:39:11 +0200 Subject: [PATCH] xxhash: Fix test on Linux. --- core/hash/xxhash/common.odin | 4 +++- tests/core/Makefile | 2 +- 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