blob: 92adb8f71c0894e0b7bf18249e82d472867741c0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
get_insn_list = $(shell grep ^DECLARE_INSN $(1) | sed 's/DECLARE_INSN(\(.*\),.*,.*)/\1/')
get_opcode = $(shell grep ^DECLARE_INSN.*\\\<$(2)\\\> $(1) | sed 's/DECLARE_INSN(.*,\(.*\),.*)/\1/')
riscv_subproject_deps = \
softfloat \
hwacha \
riscv_install_prog_srcs = \
spike.cc \
riscv-dis.cc \
xspike.cc \
termios-xspike.cc \
riscv_hdrs = \
htif.h \
common.h \
decode.h \
mmu.h \
processor.h \
sim.h \
trap.h \
encoding.h \
cachesim.h \
memtracer.h \
extension.h \
rocc.h \
dummy-rocc.h \
riscv_srcs = \
htif.cc \
processor.cc \
sim.cc \
interactive.cc \
trap.cc \
cachesim.cc \
mmu.cc \
disasm.cc \
extension.cc \
rocc.cc \
$(riscv_gen_srcs) \
riscv_test_srcs =
riscv_gen_hdrs = \
icache.h \
riscv_gen_srcs = \
$(addsuffix .cc, $(call get_insn_list,$(src_dir)/riscv/encoding.h))
icache.h:
$(src_dir)/riscv/gen_icache 1024 > $@
$(riscv_gen_srcs): %.cc: insns/%.h insn_template.cc
sed 's/NAME/$(subst .cc,,$@)/' $(src_dir)/riscv/insn_template.cc | sed 's/OPCODE/$(call get_opcode,$(src_dir)/riscv/encoding.h,$(subst .cc,,$@))/' > $@
riscv_junk = \
$(riscv_gen_srcs) \
|