summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorGravatar Andrew Waterman <waterman@eecs.berkeley.edu>2013-11-25 01:43:47 -0800
committerGravatar Andrew Waterman <waterman@eecs.berkeley.edu>2013-11-25 01:43:47 -0800
commit2d11bac94537e08b30b8ace0eb39ecbbbc386c8e (patch)
tree5c9b9dcee1a2fe0e2fb666020d552a207daa8958 /Makefile
parentbc445390566f8831dd8bb34bcc05d80c7401296a (diff)
New privileged ISA
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile35
1 files changed, 14 insertions, 21 deletions
diff --git a/Makefile b/Makefile
index c2b134f..20d430f 100644
--- a/Makefile
+++ b/Makefile
@@ -1,31 +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-custom
-$(ISASIM_H): opcodes parse-opcodes
- ./parse-opcodes -isasim < $< > $@
+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-rvc opcodes-custom 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 >> $@
+$(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