projects
/
riscv-isa-sim.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
71d04ec
)
Fix non-portable sed commands generating insn_list.h
author
Albert Ou
<aou@eecs.berkeley.edu>
Fri, 11 Sep 2015 00:01:59 +0000
(17:01 -0700)
committer
Albert Ou
<aou@eecs.berkeley.edu>
Fri, 11 Sep 2015 00:01:59 +0000
(17:01 -0700)
riscv/riscv.mk.in
patch
|
blob
|
history
diff --git
a/riscv/riscv.mk.in
b/riscv/riscv.mk.in
index f35f200c18ae41ccee84cbea6b6199645d86464b..6ddba1d659f0f5c4273e662c143a64180d6c8f81 100644
(file)
--- a/
riscv/riscv.mk.in
+++ b/
riscv/riscv.mk.in
@@
-251,7
+251,9
@@
icache.h: mmu.h
mv $@.tmp $@
insn_list.h: $(src_dir)/riscv/riscv.mk.in
- echo $(riscv_insn_list) | sed 's/\s\+\|$$/\n/g' | sed '/^$$/d' | sed 's/\./_/g' | sed 's/\(.*\)/DEFINE_INSN(\1)/' > $@.tmp
+ for insn in $(foreach insn,$(riscv_insn_list),$(subst .,_,$(insn))) ; do \
+ printf 'DEFINE_INSN(%s)\n' "$${insn}" ; \
+ done > $@.tmp
mv $@.tmp $@
$(riscv_gen_srcs): %.cc: insns/%.h insn_template.cc