blob: f075f47c493af6e6ec79ffa2d754c4136132d75d (
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
58
59
60
|
riscv_subproject_deps = \
softfloat_riscv \
softfloat \
riscv_insn_hdrs := $(notdir $(wildcard $(src_dir)/riscv/insns/*.h))
riscv_hdrs = \
applink.h \
common.h \
decode.h \
mmu.h \
processor.h \
sim.h \
trap.h \
opcodes.h \
insn_header.h \
insn_footer.h \
dispatch.h \
NDISPATCH := 10
DISPATCH_SRCS := \
dispatch0.cc \
dispatch1.cc \
dispatch2.cc \
dispatch3.cc \
dispatch4.cc \
dispatch5.cc \
dispatch6.cc \
dispatch7.cc \
dispatch8.cc \
dispatch9.cc \
dispatch10.cc \
$(DISPATCH_SRCS): %.cc: dispatch $(wildcard insns/*.h) $(riscv_hdrs)
$< $(subst dispatch,,$(subst .cc,,$@)) $(NDISPATCH) 1024 < $(src_dir)/riscv/opcodes.h > $@
$(src_dir)/riscv/dispatch.h: %.h: dispatch
$< $(NDISPATCH) 1024 < $(src_dir)/riscv/opcodes.h > $@
$(patsubst %.h, %.cc, $(riscv_insn_hdrs)): %.cc: insns/%.h $(riscv_hdrs)
@echo \#define FUNC insn_func_$(@:.cc=) > $@
@echo \#define OPCODE_MASK MASK_$(@:.cc=) >> $@
@echo \#define OPCODE_MATCH MATCH_$(@:.cc=) >> $@
@cat $(src_dir)/riscv/insn_header.h >> $@
@cat $< >> $@
@cat $(src_dir)/riscv/insn_footer.h >> $@
riscv_srcs = \
applink.cc \
processor.cc \
sim.cc \
trap.cc \
icsim.cc \
mmu.cc \
$(DISPATCH_SRCS) \
riscv_test_srcs =
riscv_install_prog_srcs = \
riscv-isa-run.cc \
|