diff options
author | Alf-André Walla <fwsgonzo@hotmail.com> | 2020-12-03 17:33:42 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-03 17:33:42 +0100 |
commit | 545c406cbeb9d312e29f7363727c0eb9b37b7da7 (patch) | |
tree | 01afc467ee195cb2d79f48373198fab41035f85c /lib | |
parent | e223a05123144ae8a030b2c22f4b7d8b23784314 (diff) | |
download | Nim-545c406cbeb9d312e29f7363727c0eb9b37b7da7.tar.gz |
Add 32-bit RISC-V support (#16231)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/system.nim | 2 | ||||
-rw-r--r-- | lib/system/platforms.nim | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/system.nim b/lib/system.nim index c13b419ef..76bcd4eec 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -1068,7 +1068,7 @@ const ## Possible values: ## `"i386"`, `"alpha"`, `"powerpc"`, `"powerpc64"`, `"powerpc64el"`, ## `"sparc"`, `"amd64"`, `"mips"`, `"mipsel"`, `"arm"`, `"arm64"`, - ## `"mips64"`, `"mips64el"`, `"riscv64"`. + ## `"mips64"`, `"mips64el"`, `"riscv32"`, `"riscv64"`. seqShallowFlag = low(int) strlitFlag = 1 shl (sizeof(int)*8 - 2) # later versions of the codegen \ diff --git a/lib/system/platforms.nim b/lib/system/platforms.nim index 6e39dc7f2..59a1333f1 100644 --- a/lib/system/platforms.nim +++ b/lib/system/platforms.nim @@ -33,7 +33,8 @@ type vm, ## Some Virtual machine: Nim's VM or JavaScript avr, ## AVR based processor msp430, ## TI MSP430 microcontroller - riscv64 ## RISC-V 64-bit processor + riscv32, ## RISC-V 32-bit processor + riscv64, ## RISC-V 64-bit processor wasm32 ## WASM, 32-bit OsPlatform* {.pure.} = enum ## the OS this program will run on. @@ -91,6 +92,7 @@ const elif defined(vm): CpuPlatform.vm elif defined(avr): CpuPlatform.avr elif defined(msp430): CpuPlatform.msp430 + elif defined(riscv32): CpuPlatform.riscv32 elif defined(riscv64): CpuPlatform.riscv64 elif defined(wasm32): CpuPlatform.wasm32 else: CpuPlatform.none |