From abff1abfe8113a989215ed33c48839a827e531f1 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Fri, 7 Aug 2020 12:10:23 +0200 Subject: meson: target MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Paolo Bonzini --- target/openrisc/Makefile.objs | 15 --------------- target/openrisc/disas.c | 2 +- target/openrisc/meson.build | 23 +++++++++++++++++++++++ target/openrisc/translate.c | 2 +- 4 files changed, 25 insertions(+), 17 deletions(-) delete mode 100644 target/openrisc/Makefile.objs create mode 100644 target/openrisc/meson.build (limited to 'target/openrisc') diff --git a/target/openrisc/Makefile.objs b/target/openrisc/Makefile.objs deleted file mode 100644 index 423d645..0000000 --- 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 cc91775..dc025bd 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 0000000..9774a58 --- /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 573428b..c6dce87 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]; -- cgit v1.1