mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
xxhash: Disable prefetch on Linux.
This commit is contained in:
@@ -47,7 +47,10 @@ Error :: enum {
|
|||||||
|
|
||||||
XXH_DISABLE_PREFETCH :: #config(XXH_DISABLE_PREFETCH, false)
|
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"
|
import "core:sys/llvm"
|
||||||
|
|
||||||
prefetch_address :: #force_inline proc(address: rawptr) {
|
prefetch_address :: #force_inline proc(address: rawptr) {
|
||||||
|
|||||||
+1
-1
@@ -16,4 +16,4 @@ strings_test:
|
|||||||
$(ODIN) run strings/test_core_strings.odin
|
$(ODIN) run strings/test_core_strings.odin
|
||||||
|
|
||||||
hash_test:
|
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
|
||||||
Reference in New Issue
Block a user