mirror of
https://github.com/odin-lang/Odin.git
synced 2026-04-20 05:20:28 +00:00
xxhash: Fix test on Linux.
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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
|
||||
$(ODIN) run hash -out=test_hash -o:speed -no-bounds-check -define:XXH_DISABLE_PREFETCH=true
|
||||
Reference in New Issue
Block a user