summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile37
1 files changed, 14 insertions, 23 deletions
diff --git a/Makefile b/Makefile
index 95f7d76..4bc2d18 100644
--- a/Makefile
+++ b/Makefile
@@ -1,33 +1,24 @@
-ISASIM_H := ../riscv-isa-sim/riscv/opcodes.h
-PK_H := ../riscv-pk/pk/riscv-opc.h
+ISASIM_H := ../riscv-isa-sim/riscv/encoding.h
+PK_H := ../riscv-pk/pk/encoding.h
+ENV_H := ../riscv-tests/env/encoding.h
GAS_H := ../riscv-gcc/binutils-2.21.1/include/opcode/riscv-opc.h
XCC_H := ../riscv-gcc/gcc-4.6.1/gcc/config/riscv/riscv-opc.h
-install: $(ISASIM_H) $(PK_H) $(GAS_H) $(XCC_H) inst.chisel instr-table.tex
+ALL_OPCODES := opcodes opcodes-pseudo opcodes-rvc opcodes-hwacha opcodes-hwacha-pseudo opcodes-hwacha-ut opcodes-custom
-$(ISASIM_H): opcodes parse-opcodes
- ./parse-opcodes -isasim < $< > $@
- ./parse-opcodes -isasim < opcodes-hwacha-ut > ../riscv-isa-sim/hwacha/opcodes_hwacha_ut_half.h
+install: $(ISASIM_H) $(PK_H) $(ENV_H) $(GAS_H) $(XCC_H) inst.chisel instr-table.tex
-$(PK_H): opcodes parse-opcodes
- ./parse-opcodes -disasm < $< > $@
+$(ISASIM_H) $(PK_H) $(ENV_H): $(ALL_OPCODES) parse-opcodes
+ cp encoding.h $@
+ cat opcodes | ./parse-opcodes -c >> $@
-$(GAS_H): opcodes opcodes-hwacha opcodes-hwacha-ut opcodes-rvc opcodes-custom opcodes-hwacha-pseudo parse-opcodes
- ./parse-opcodes -disasm < $< > $@
- ./parse-opcodes -disasm < opcodes-rvc >> $@
- ./parse-opcodes -disasm < opcodes-custom >> $@
- ./parse-opcodes -disasm < opcodes-hwacha >> $@
- ./parse-opcodes -disasm < opcodes-hwacha-pseudo >> $@
- ./parse-opcodes -disasm < opcodes-hwacha-ut >> $@
+$(GAS_H) $(XCC_H): $(ALL_OPCODES) parse-opcodes
+ cat $(ALL_OPCODES) | ./parse-opcodes -c > $@
-$(XCC_H): opcodes parse-opcodes
- ./parse-opcodes -disasm < $< > $@
+inst.chisel: $(ALL_OPCODES) parse-opcodes
+ cat opcodes opcodes-custom | ./parse-opcodes -chisel > $@
-inst.chisel: opcodes parse-opcodes
- ./parse-opcodes -chisel < $< > $@
- ./parse-opcodes -chisel < opcodes-custom >> $@
-
-instr-table.tex: opcodes parse-opcodes
- ./parse-opcodes -tex < $< > $@
+instr-table.tex: $(ALL_OPCODES) parse-opcodes
+ cat opcodes opcodes-pseudo | ./parse-opcodes -tex > $@
.PHONY : install