Add arm64 support (untested)

This commit is contained in:
def
2015-07-31 23:57:50 +02:00
parent 130605567e
commit 13389eab9b
3 changed files with 5 additions and 2 deletions

View File

@@ -159,7 +159,7 @@ type
# alias conditionals to condsyms (end of module).
cpuNone, cpuI386, cpuM68k, cpuAlpha, cpuPowerpc, cpuPowerpc64,
cpuPowerpc64el, cpuSparc, cpuVm, cpuIa64, cpuAmd64, cpuMips, cpuMipsel,
cpuArm, cpuJS, cpuNimrodVM, cpuAVR
cpuArm, cpuArm64, cpuJS, cpuNimrodVM, cpuAVR
type
TEndian* = enum
@@ -183,6 +183,7 @@ const
(name: "mips", intSize: 32, endian: bigEndian, floatSize: 64, bit: 32),
(name: "mipsel", intSize: 32, endian: littleEndian, floatSize: 64, bit: 32),
(name: "arm", intSize: 32, endian: littleEndian, floatSize: 64, bit: 32),
(name: "arm64", intSize: 64, endian: littleEndian, floatSize: 64, bit: 64),
(name: "js", intSize: 32, endian: bigEndian,floatSize: 64,bit: 32),
(name: "nimrodvm", intSize: 32, endian: bigEndian, floatSize: 64, bit: 32),
(name: "avr", intSize: 16, endian: littleEndian, floatSize: 32, bit: 16)]

View File

@@ -1151,7 +1151,7 @@ const
hostCPU* {.magic: "HostCPU".}: string = ""
## a string that describes the host CPU. Possible values:
## "i386", "alpha", "powerpc", "powerpc64", "powerpc64el", "sparc",
## "amd64", "mips", "mipsel", "arm".
## "amd64", "mips", "mipsel", "arm", "arm64".
seqShallowFlag = low(int)

View File

@@ -25,6 +25,7 @@ type
mips, ## Mips based processor
mipsel, ## Little Endian Mips based processor
arm, ## ARM based processor
arm64, ## ARM64 based processor
vm, ## Some Virtual machine: Nim's VM or JavaScript
avr ## AVR based processor
@@ -72,6 +73,7 @@ const
elif defined(mips): CpuPlatform.mips
elif defined(mipsel): CpuPlatform.mipsel
elif defined(arm): CpuPlatform.arm
elif defined(arm64): CpuPlatform.arm64
elif defined(vm): CpuPlatform.vm
elif defined(avr): CpuPlatform.avr
else: CpuPlatform.none