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>
This commit is contained in:
Paolo Bonzini 2020-08-07 12:10:23 +02:00
parent 2c44220d05
commit abff1abfe8
62 changed files with 595 additions and 328 deletions

View file

@ -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

View file

@ -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, \

View file

@ -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}

View file

@ -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];