aboutsummaryrefslogtreecommitdiff
path: root/target/openrisc
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2020-08-07 12:10:23 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2020-08-21 06:30:35 -0400
commitabff1abfe8113a989215ed33c48839a827e531f1 (patch)
treefb31d57aff267871822d237052c264788664047e /target/openrisc
parent2c44220d055d12142f27cf513848f17d6007ae35 (diff)
meson: target
Similar to hw_arch, each architecture defines two sourceset which are placed in dictionaries target_arch and target_softmmu_arch. These are then picked up from there when building the per-emulator static_library. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target/openrisc')
-rw-r--r--target/openrisc/Makefile.objs15
-rw-r--r--target/openrisc/disas.c2
-rw-r--r--target/openrisc/meson.build23
-rw-r--r--target/openrisc/translate.c2
4 files changed, 25 insertions, 17 deletions
diff --git a/target/openrisc/Makefile.objs b/target/openrisc/Makefile.objs
deleted file mode 100644
index 423d64512e..0000000000
--- a/target/openrisc/Makefile.objs
+++ /dev/null
@@ -1,15 +0,0 @@
-obj-$(CONFIG_SOFTMMU) += machine.o
-obj-y += cpu.o exception.o interrupt.o mmu.o translate.o disas.o
-obj-y += exception_helper.o fpu_helper.o \
- interrupt_helper.o sys_helper.o
-obj-y += gdbstub.o
-
-DECODETREE = $(SRC_PATH)/scripts/decodetree.py
-
-target/openrisc/decode.c.inc: \
- $(SRC_PATH)/target/openrisc/insns.decode $(DECODETREE)
- $(call quiet-command,\
- $(PYTHON) $(DECODETREE) -o $@ $<, "GEN", $(TARGET_DIR)$@)
-
-target/openrisc/translate.o: target/openrisc/decode.c.inc
-target/openrisc/disas.o: target/openrisc/decode.c.inc
diff --git a/target/openrisc/disas.c b/target/openrisc/disas.c
index cc91775344..dc025bd64d 100644
--- a/target/openrisc/disas.c
+++ b/target/openrisc/disas.c
@@ -25,7 +25,7 @@
typedef disassemble_info DisasContext;
/* Include the auto-generated decoder. */
-#include "decode.c.inc"
+#include "decode-insns.c.inc"
#define output(mnemonic, format, ...) \
(info->fprintf_func(info->stream, "%-9s " format, \
diff --git a/target/openrisc/meson.build b/target/openrisc/meson.build
new file mode 100644
index 0000000000..9774a58306
--- /dev/null
+++ b/target/openrisc/meson.build
@@ -0,0 +1,23 @@
+gen = decodetree.process('insns.decode')
+
+openrisc_ss = ss.source_set()
+openrisc_ss.add(gen)
+openrisc_ss.add(files(
+ 'cpu.c',
+ 'disas.c',
+ 'exception.c',
+ 'exception_helper.c',
+ 'fpu_helper.c',
+ 'gdbstub.c',
+ 'interrupt.c',
+ 'interrupt_helper.c',
+ 'mmu.c',
+ 'sys_helper.c',
+ 'translate.c',
+))
+
+openrisc_softmmu_ss = ss.source_set()
+openrisc_softmmu_ss.add(files('machine.c'))
+
+target_arch += {'openrisc': openrisc_ss}
+target_softmmu_arch += {'openrisc': openrisc_softmmu_ss}
diff --git a/target/openrisc/translate.c b/target/openrisc/translate.c
index 573428b8ea..c6dce879f1 100644
--- a/target/openrisc/translate.c
+++ b/target/openrisc/translate.c
@@ -65,7 +65,7 @@ static inline bool is_user(DisasContext *dc)
}
/* Include the auto-generated decoder. */
-#include "decode.c.inc"
+#include "decode-insns.c.inc"
static TCGv cpu_sr;
static TCGv cpu_regs[32];