SHELL := /bin/sh ISASIM_H := ../riscv-isa-sim/riscv/encoding.h ISASIM_HWACHA_H := ../riscv-isa-sim/hwacha/opcodes_hwacha_ut.h PK_H := ../riscv-pk/pk/encoding.h FESVR_H := ../riscv-fesvr/fesvr/encoding.h ENV_H := ../riscv-tests/env/encoding.h GAS_H := ../riscv-gnu-toolchain/binutils/include/opcode/riscv-opc.h XCC_H := ../riscv-gnu-toolchain/gcc/gcc/config/riscv/riscv-opc.h ALL_OPCODES := opcodes-pseudo opcodes opcodes-rvc opcodes-rvc-pseudo opcodes-hwacha-pseudo opcodes-hwacha opcodes-hwacha-ut opcodes-custom install: $(ISASIM_H) $(PK_H) $(FESVR_H) $(ENV_H) $(GAS_H) $(XCC_H) inst.chisel instr-table.tex priv-instr-table.tex $(ISASIM_H) $(PK_H) $(FESVR_H) $(ENV_H): $(ALL_OPCODES) parse-opcodes encoding.h cp encoding.h $@ cat opcodes opcodes-rvc opcodes-rvc-pseudo | ./parse-opcodes -c >> $@ $(GAS_H) $(XCC_H): $(ALL_OPCODES) parse-opcodes cat $(ALL_OPCODES) | ./parse-opcodes -c > $@ $(ISASIM_HWACHA_H): $(ALL_OPCODES) parse-opcodes cat opcodes opcodes-hwacha-ut | ./parse-opcodes -c | \ sed 's/DECLARE_INSN(/DECLARE_INSN(ut_/g' | \ cpp -P -D DECLARE_INSN=DECLARE_INSN | sort -o $@ inst.chisel: $(ALL_OPCODES) parse-opcodes cat opcodes opcodes-custom | ./parse-opcodes -chisel > $@ instr-table.tex: $(ALL_OPCODES) parse-opcodes cat opcodes opcodes-pseudo | ./parse-opcodes -tex > $@ priv-instr-table.tex: $(ALL_OPCODES) parse-opcodes cat opcodes opcodes-pseudo | ./parse-opcodes -privtex > $@ .PHONY : install