diff options
author | Michael Forney <mforney@mforney.org> | 2022-02-12 02:27:50 -0800 |
---|---|---|
committer | Quentin Carbonneaux <quentin@c9x.me> | 2022-02-17 22:43:12 +0100 |
commit | 4e93eeaa3b63b6ae50954a29662cc3ea6be48b23 (patch) | |
tree | 42f9dd888d3581ca9758afad53116f95ef790083 /Makefile | |
parent | 8e040d58615e49a63fb50dda5dc695e96a54a7bc (diff) | |
download | roux-4e93eeaa3b63b6ae50954a29662cc3ea6be48b23.tar.gz |
add rv64 backend
It is mostly complete, but still has a few ABI bugs when passing floats in structs, or when structs are passed partly in register, and partly on stack.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/Makefile b/Makefile index 1a0074f..711873b 100644 --- a/Makefile +++ b/Makefile @@ -7,11 +7,13 @@ SRC = main.c util.c parse.c cfg.c mem.c ssa.c alias.c load.c copy.c \ fold.c live.c spill.c rega.c gas.c AMD64SRC = amd64/targ.c amd64/sysv.c amd64/isel.c amd64/emit.c ARM64SRC = arm64/targ.c arm64/abi.c arm64/isel.c arm64/emit.c -SRCALL = $(SRC) $(AMD64SRC) $(ARM64SRC) +RV64SRC = rv64/targ.c rv64/abi.c rv64/isel.c rv64/emit.c +SRCALL = $(SRC) $(AMD64SRC) $(ARM64SRC) $(RV64SRC) AMD64OBJ = $(AMD64SRC:%.c=$(OBJDIR)/%.o) ARM64OBJ = $(ARM64SRC:%.c=$(OBJDIR)/%.o) -OBJ = $(SRC:%.c=$(OBJDIR)/%.o) $(AMD64OBJ) $(ARM64OBJ) +RV64OBJ = $(RV64SRC:%.c=$(OBJDIR)/%.o) +OBJ = $(SRC:%.c=$(OBJDIR)/%.o) $(AMD64OBJ) $(ARM64OBJ) $(RV64OBJ) CFLAGS += -Wall -Wextra -std=c99 -g -pedantic @@ -27,11 +29,13 @@ $(OBJDIR)/timestamp: @mkdir -p $(OBJDIR) @mkdir -p $(OBJDIR)/amd64 @mkdir -p $(OBJDIR)/arm64 + @mkdir -p $(OBJDIR)/rv64 @touch $@ $(OBJ): all.h ops.h $(AMD64OBJ): amd64/all.h $(ARM64OBJ): arm64/all.h +$(RV64OBJ): rv64/all.h $(OBJDIR)/main.o: config.h config.h: @@ -46,6 +50,9 @@ config.h: *aarch64*) \ echo "#define Deftgt T_arm64"; \ ;; \ + *riscv64*) \ + echo "#define Deftgt T_rv64"; \ + ;; \ *) \ echo "#define Deftgt T_amd64_sysv";\ ;; \ @@ -72,6 +79,9 @@ check: $(OBJDIR)/$(BIN) check-arm64: $(OBJDIR)/$(BIN) TARGET=arm64 tools/test.sh all +check-rv64: $(OBJDIR)/$(BIN) + TARGET=rv64 tools/test.sh all + src: @echo $(SRCALL) |