added C-extension support

This commit is contained in:
Luxferre
2026-06-18 19:10:32 +03:00
parent caf64b689b
commit 3391969951
6 changed files with 378 additions and 15 deletions
+9 -9
View File
@@ -2,21 +2,21 @@ CC = riscv64-linux-gnu-gcc
OBJCOPY = riscv64-linux-gnu-objcopy
EMULATOR = ./amach
ASFLAGS = -march=rv32ima -mabi=ilp32 -nostdlib -s -static -fno-pic -fno-pie -mno-relax
ASFLAGS = -march=rv32imac -mabi=ilp32 -nostdlib -s -static -fno-pic -fno-pie -mno-relax
LDFLAGS = -Wl,-Ttext=0x100b0 -Wl,--build-id=none
all: rv32ima_tests.bin
all: rv32imac_tests.bin
rv32ima_tests.elf: rv32ima_tests.s
$(CC) $(ASFLAGS) $(LDFLAGS) rv32ima_tests.s -o rv32ima_tests.elf
rv32imac_tests.elf: rv32imac_tests.s
$(CC) $(ASFLAGS) $(LDFLAGS) rv32imac_tests.s -o rv32imac_tests.elf
rv32ima_tests.bin: rv32ima_tests.elf
$(OBJCOPY) -O binary rv32ima_tests.elf rv32ima_tests.bin
rv32imac_tests.bin: rv32imac_tests.elf
$(OBJCOPY) -O binary rv32imac_tests.elf rv32imac_tests.bin
run: rv32ima_tests.bin
$(EMULATOR) rv32ima_tests.bin
run: rv32imac_tests.bin
$(EMULATOR) rv32imac_tests.bin
clean:
rm -f rv32ima_tests.elf rv32ima_tests.bin
rm -f rv32imac_tests.elf rv32imac_tests.bin
.PHONY: all run clean