mirror of
https://github.com/codex-storage/nim-leopard.git
synced 2025-01-30 20:55:41 +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/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 system/ansi_c
|
||||||
|
|
||||||
|
when defined(amd64) or defined(i386):
|
||||||
import ./cpuinfo_x86
|
import ./cpuinfo_x86
|
||||||
|
|
||||||
## inspired by https://github.com/mratsim/weave/blob/master/weave/memory/allocs.nim
|
## inspired by https://github.com/mratsim/weave/blob/master/weave/memory/allocs.nim
|
||||||
|
|
||||||
let
|
when defined(amd64) or defined(i386):
|
||||||
LeoAlignBytes* = if hasAvx2(): 32'u else: 16'u
|
let LeoAlignBytes* = if hasAvx2(): 32'u else: 16'u
|
||||||
|
else:
|
||||||
|
let LeoAlignBytes* = 16'u
|
||||||
|
|
||||||
when defined(windows):
|
when defined(windows):
|
||||||
proc alignedAllocWindows(size, alignment: csize_t): pointer
|
proc alignedAllocWindows(size, alignment: csize_t): pointer
|
||||||
|
Loading…
x
Reference in New Issue
Block a user