From 13389eab9bc879a32e74c9b11ce17d68968cd4fe Mon Sep 17 00:00:00 2001 From: def Date: Fri, 31 Jul 2015 23:57:50 +0200 Subject: [PATCH] Add arm64 support (untested) --- compiler/platform.nim | 3 ++- lib/system.nim | 2 +- lib/system/platforms.nim | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/compiler/platform.nim b/compiler/platform.nim index 153ada2b2..c4e7d453a 100644 --- a/compiler/platform.nim +++ b/compiler/platform.nim @@ -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)] diff --git a/lib/system.nim b/lib/system.nim index 19af433de..260d7fbcd 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -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) diff --git a/lib/system/platforms.nim b/lib/system/platforms.nim index 243f48a3a..0a7045fae 100644 --- a/lib/system/platforms.nim +++ b/lib/system/platforms.nim @@ -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