diff options
author | Albert Ou <aou@eecs.berkeley.edu> | 2014-10-23 17:55:00 -0700 |
---|---|---|
committer | Albert Ou <aou@eecs.berkeley.edu> | 2014-10-23 17:55:00 -0700 |
commit | d4a26c50d1c8d69082533196b7f79e4762fb9637 (patch) | |
tree | 1195f90d0c388763dea29ad2d5db768252b83c8d /Makefile | |
parent | 04e3614f776c9721114ca451a3c71612085877dc (diff) | |
download | riscv-opcodes-d4a26c50d1c8d69082533196b7f79e4762fb9637.zip riscv-opcodes-d4a26c50d1c8d69082533196b7f79e4762fb9637.tar.gz riscv-opcodes-d4a26c50d1c8d69082533196b7f79e4762fb9637.tar.bz2 |
Prevent regenerating the Hwacha spike header by default
Not every instruction in the main opcodes file is implemented by Hwacha;
at present, updating opcodes_hwacha_ut.h requires manual culling of the
unneeded instructions to avoid breaking the spike build.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 15 |
1 files changed, 7 insertions, 8 deletions
@@ -1,3 +1,5 @@ +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 @@ -7,22 +9,19 @@ XCC_H := ../riscv-gcc/gcc-4.6.1/gcc/config/riscv/riscv-opc.h ALL_OPCODES := opcodes opcodes-pseudo opcodes-rvc opcodes-hwacha opcodes-hwacha-pseudo opcodes-hwacha-ut opcodes-custom -install: $(ISASIM_H) $(ISASIM_HWACHA_H) $(PK_H) $(ENV_H) $(GAS_H) $(XCC_H) inst.chisel instr-table.tex +install: $(ISASIM_H) $(PK_H) $(ENV_H) $(GAS_H) $(XCC_H) inst.chisel instr-table.tex $(ISASIM_H) $(PK_H) $(ENV_H): $(ALL_OPCODES) parse-opcodes cp encoding.h $@ - cat opcodes | ./parse-opcodes -c >> $@ + ./parse-opcodes -c < opcodes >> $@ $(GAS_H) $(XCC_H): $(ALL_OPCODES) parse-opcodes cat $(ALL_OPCODES) | ./parse-opcodes -c > $@ $(ISASIM_HWACHA_H): $(ALL_OPCODES) parse-opcodes - echo "#define DECLARE_INSN DECLARE_INSN" > hwacha.tmp.cc - cat opcodes opcodes-hwacha-ut | ./parse-opcodes -c >> hwacha.tmp.cc - sed -i -e 's/DECLARE_INSN(/DECLARE_INSN(ut_/g' hwacha.tmp.cc - gcc -E -P hwacha.tmp.cc -o $@ - sort $@ -o $@ # Sorted to make culling unneeded instructions easier - rm -f hwacha.tmp.cc + 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 > $@ |