From 6e84dc968bc4eaf047fbefcba2f670940718dda8 Mon Sep 17 00:00:00 2001 From: Richard Miller Date: Mon, 9 Nov 2020 11:36:14 +0000 Subject: Add toolchain for riscv (ia ic il) and riscv64 (ja jc jl) Because the rv64 ISA is very nearly a proper superset of rv32, the compilers ic and jc are actually the same program, which compiles to .i or .j depending on how it is invoked; similarly for ia/ja and il/jl. It is also possible to invoke ia/ic/il with a '-j' option to specify 64-bit behaviour. --- utils/ic/machcap.c | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 utils/ic/machcap.c (limited to 'utils/ic/machcap.c') diff --git a/utils/ic/machcap.c b/utils/ic/machcap.c new file mode 100644 index 00000000..4da0aa91 --- /dev/null +++ b/utils/ic/machcap.c @@ -0,0 +1,9 @@ +#include "gc.h" + +int +machcap(Node *n) +{ + if(n == Z) /* test */ + return thechar == 'j'; + return 0; +} -- cgit v1.2.3