Add Elbrus 2000 architecture (#19024)
* Add Elbrus 2000 architecture * Add e2k to niminst * Update compiler/installer.ini Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
This commit is contained in:
parent
1a45da9150
commit
5e2b9341f3
5 changed files with 13 additions and 3 deletions
|
|
@ -197,7 +197,8 @@ type
|
||||||
cpuNone, cpuI386, cpuM68k, cpuAlpha, cpuPowerpc, cpuPowerpc64,
|
cpuNone, cpuI386, cpuM68k, cpuAlpha, cpuPowerpc, cpuPowerpc64,
|
||||||
cpuPowerpc64el, cpuSparc, cpuVm, cpuHppa, cpuIa64, cpuAmd64, cpuMips,
|
cpuPowerpc64el, cpuSparc, cpuVm, cpuHppa, cpuIa64, cpuAmd64, cpuMips,
|
||||||
cpuMipsel, cpuArm, cpuArm64, cpuJS, cpuNimVM, cpuAVR, cpuMSP430,
|
cpuMipsel, cpuArm, cpuArm64, cpuJS, cpuNimVM, cpuAVR, cpuMSP430,
|
||||||
cpuSparc64, cpuMips64, cpuMips64el, cpuRiscV32, cpuRiscV64, cpuEsp, cpuWasm32
|
cpuSparc64, cpuMips64, cpuMips64el, cpuRiscV32, cpuRiscV64, cpuEsp, cpuWasm32,
|
||||||
|
cpuE2k
|
||||||
|
|
||||||
type
|
type
|
||||||
TInfoCPU* = tuple[name: string, intSize: int, endian: Endianness,
|
TInfoCPU* = tuple[name: string, intSize: int, endian: Endianness,
|
||||||
|
|
@ -232,7 +233,8 @@ const
|
||||||
(name: "riscv32", intSize: 32, endian: littleEndian, floatSize: 64, bit: 32),
|
(name: "riscv32", intSize: 32, endian: littleEndian, floatSize: 64, bit: 32),
|
||||||
(name: "riscv64", intSize: 64, endian: littleEndian, floatSize: 64, bit: 64),
|
(name: "riscv64", intSize: 64, endian: littleEndian, floatSize: 64, bit: 64),
|
||||||
(name: "esp", intSize: 32, endian: littleEndian, floatSize: 64, bit: 32),
|
(name: "esp", intSize: 32, endian: littleEndian, floatSize: 64, bit: 32),
|
||||||
(name: "wasm32", intSize: 32, endian: littleEndian, floatSize: 64, bit: 32)]
|
(name: "wasm32", intSize: 32, endian: littleEndian, floatSize: 64, bit: 32),
|
||||||
|
(name: "e2k", intSize: 64, endian: littleEndian, floatSize: 64, bit: 64)]
|
||||||
|
|
||||||
type
|
type
|
||||||
Target* = object
|
Target* = object
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,8 @@ type
|
||||||
msp430, ## TI MSP430 microcontroller
|
msp430, ## TI MSP430 microcontroller
|
||||||
riscv32, ## RISC-V 32-bit processor
|
riscv32, ## RISC-V 32-bit processor
|
||||||
riscv64, ## RISC-V 64-bit processor
|
riscv64, ## RISC-V 64-bit processor
|
||||||
wasm32 ## WASM, 32-bit
|
wasm32, ## WASM, 32-bit
|
||||||
|
e2k ## MCST Elbrus 2000
|
||||||
|
|
||||||
OsPlatform* {.pure.} = enum ## the OS this program will run on.
|
OsPlatform* {.pure.} = enum ## the OS this program will run on.
|
||||||
none, dos, windows, os2, linux, morphos, skyos, solaris,
|
none, dos, windows, os2, linux, morphos, skyos, solaris,
|
||||||
|
|
@ -93,5 +94,6 @@ const
|
||||||
elif defined(riscv32): CpuPlatform.riscv32
|
elif defined(riscv32): CpuPlatform.riscv32
|
||||||
elif defined(riscv64): CpuPlatform.riscv64
|
elif defined(riscv64): CpuPlatform.riscv64
|
||||||
elif defined(wasm32): CpuPlatform.wasm32
|
elif defined(wasm32): CpuPlatform.wasm32
|
||||||
|
elif defined(e2k): CpuPlatform.e2k
|
||||||
else: CpuPlatform.none
|
else: CpuPlatform.none
|
||||||
## the CPU this program will run on.
|
## the CPU this program will run on.
|
||||||
|
|
|
||||||
|
|
@ -74,6 +74,7 @@ _nim() {
|
||||||
'*--cpu=arm64[compile for ARM64 architecture]' \
|
'*--cpu=arm64[compile for ARM64 architecture]' \
|
||||||
'*--cpu=avr[compile for AVR architecture]' \
|
'*--cpu=avr[compile for AVR architecture]' \
|
||||||
'*--cpu=esp[compile for ESP architecture]' \
|
'*--cpu=esp[compile for ESP architecture]' \
|
||||||
|
'*--cpu=e2k[compile for Elbrus 2000 architecture]' \
|
||||||
'*--cpu=hppa[compile for HPPA architecture]' \
|
'*--cpu=hppa[compile for HPPA architecture]' \
|
||||||
'*--cpu=i386[compile for i386 architecture]' \
|
'*--cpu=i386[compile for i386 architecture]' \
|
||||||
'*--cpu=ia64[compile for ia64 architecture]' \
|
'*--cpu=ia64[compile for ia64 architecture]' \
|
||||||
|
|
|
||||||
|
|
@ -227,6 +227,8 @@ case $ucpu in
|
||||||
mycpu="arm" ;;
|
mycpu="arm" ;;
|
||||||
*riscv64|riscv* )
|
*riscv64|riscv* )
|
||||||
mycpu="riscv64" ;;
|
mycpu="riscv64" ;;
|
||||||
|
*e2k* )
|
||||||
|
mycpu="e2k" ;;
|
||||||
*)
|
*)
|
||||||
echo 2>&1 "Error: unknown processor: $ucpu"
|
echo 2>&1 "Error: unknown processor: $ucpu"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
||||||
|
|
@ -166,6 +166,9 @@ endif
|
||||||
ifeq ($(ucpu),riscv64)
|
ifeq ($(ucpu),riscv64)
|
||||||
mycpu = riscv64
|
mycpu = riscv64
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(ucpu),e2k)
|
||||||
|
mycpu = e2k
|
||||||
|
endif
|
||||||
ifndef mycpu
|
ifndef mycpu
|
||||||
$(error unknown CPU architecture: $(ucpu) See makefile.nimf)
|
$(error unknown CPU architecture: $(ucpu) See makefile.nimf)
|
||||||
endif
|
endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue