mirror of
https://github.com/codex-storage/nim-leopard.git
synced 2025-01-29 20:26:09 +00:00
avoid X86 specific code on ARM
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
This commit is contained in:
parent
41cd86df5b
commit
e0e642e978
@ -1,4 +1,7 @@
|
||||
import ./utils/allocs
|
||||
import ./utils/cpuinfo_x86
|
||||
|
||||
export cpuinfo_x86, allocs
|
||||
when defined(amd64) or defined(i386):
|
||||
import ./utils/cpuinfo_x86
|
||||
export cpuinfo_x86
|
||||
|
||||
export allocs
|
||||
|
@ -14,12 +14,15 @@ push: {.upraises: [].}
|
||||
|
||||
import system/ansi_c
|
||||
|
||||
import ./cpuinfo_x86
|
||||
when defined(amd64) or defined(i386):
|
||||
import ./cpuinfo_x86
|
||||
|
||||
## inspired by https://github.com/mratsim/weave/blob/master/weave/memory/allocs.nim
|
||||
|
||||
let
|
||||
LeoAlignBytes* = if hasAvx2(): 32'u else: 16'u
|
||||
when defined(amd64) or defined(i386):
|
||||
let LeoAlignBytes* = if hasAvx2(): 32'u else: 16'u
|
||||
else:
|
||||
let LeoAlignBytes* = 16'u
|
||||
|
||||
when defined(windows):
|
||||
proc alignedAllocWindows(size, alignment: csize_t): pointer
|
||||
|
Loading…
x
Reference in New Issue
Block a user