mirror of
https://github.com/logos-storage/nim-leopard.git
synced 2026-01-07 16:13:10 +00:00
Merge pull request #5 from status-im/arm64
Add Apple M1 and generic ARM64+Neon support
This commit is contained in:
commit
2a6a63923e
@ -38,7 +38,7 @@ When nim-leopard is installed with `nimble install leopard`, or as a dependency
|
|||||||
|
|
||||||
In a standalone `git clone` of nim-leopard, it's necessary to init the submodule before running `nimble develop` or `nimble install` in the root of the clone
|
In a standalone `git clone` of nim-leopard, it's necessary to init the submodule before running `nimble develop` or `nimble install` in the root of the clone
|
||||||
```text
|
```text
|
||||||
$ git submodule update --init
|
$ git submodule update --init --recursive
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Build
|
#### Build
|
||||||
|
|||||||
@ -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
|
||||||
|
|
||||||
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
|
## 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
|
||||||
|
|||||||
2
vendor/leopard
vendored
2
vendor/leopard
vendored
@ -1 +1 @@
|
|||||||
Subproject commit b58d1eaf59e263d25e473a3460437e19386956eb
|
Subproject commit 20eb7c8bc5ba41349091addd4e374d4b74e9fb07
|
||||||
Loading…
x
Reference in New Issue
Block a user