mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
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:
+1
-2
@@ -116,7 +116,6 @@ obj-$(CONFIG_TCG) += tcg/tcg-common.o tcg/optimize.o
|
||||
obj-$(CONFIG_TCG_INTERPRETER) += tcg/tci.o
|
||||
obj-$(CONFIG_TCG_INTERPRETER) += disas/tci.o
|
||||
obj-$(CONFIG_TCG) += fpu/softfloat.o
|
||||
obj-y += target/$(TARGET_BASE_ARCH)/
|
||||
obj-y += disas.o
|
||||
obj-$(call notempty,$(TARGET_XML_FILES)) += gdbstub-xml.o
|
||||
LIBS := $(libs_cpu) $(LIBS)
|
||||
@@ -168,7 +167,7 @@ LIBS := $(LIBS) $(BRLAPI_LIBS) $(SDL_LIBS) $(SPICE_LIBS) $(OPENGL_LIBS) $(SECCOM
|
||||
LIBS := $(LIBS) $(COREAUDIO_LIBS) $(DSOUND_LIBS)
|
||||
LIBS := $(LIBS) $(VDE_LIBS) $(SLIRP_LIBS)
|
||||
LIBS := $(LIBS) $(LIBUSB_LIBS) $(SMARTCARD_LIBS) $(USB_REDIR_LIBS)
|
||||
LIBS := $(LIBS) $(VIRGL_LIBS)
|
||||
LIBS := $(LIBS) $(VIRGL_LIBS) $(CURSES_LIBS)
|
||||
|
||||
generated-files-y += hmp-commands.h hmp-commands-info.h
|
||||
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
obj-y += decContext.o
|
||||
obj-y += decNumber.o
|
||||
obj-y += dpd/decimal32.o
|
||||
obj-y += dpd/decimal64.o
|
||||
obj-y += dpd/decimal128.o
|
||||
@@ -0,0 +1,7 @@
|
||||
libdecnumber = files(
|
||||
'decContext.c',
|
||||
'decNumber.c',
|
||||
'dpd/decimal128.c',
|
||||
'dpd/decimal32.c',
|
||||
'dpd/decimal64.c',
|
||||
)
|
||||
+11
@@ -647,10 +647,15 @@ libqemuutil = static_library('qemuutil',
|
||||
qemuutil = declare_dependency(link_with: libqemuutil,
|
||||
sources: genh + version_res)
|
||||
|
||||
decodetree = generator(find_program('scripts/decodetree.py'),
|
||||
output: 'decode-@BASENAME@.c.inc',
|
||||
arguments: ['@INPUT@', '@EXTRA_ARGS@', '-o', '@OUTPUT@'])
|
||||
|
||||
subdir('audio')
|
||||
subdir('io')
|
||||
subdir('chardev')
|
||||
subdir('fsdev')
|
||||
subdir('libdecnumber')
|
||||
subdir('target')
|
||||
subdir('dump')
|
||||
|
||||
@@ -787,6 +792,9 @@ foreach target : target_dirs
|
||||
if target.endswith('-softmmu')
|
||||
qemu_target_name = 'qemu-system-' + target_name
|
||||
target_type='system'
|
||||
t = target_softmmu_arch[arch].apply(config_target, strict: false)
|
||||
arch_srcs += t.sources()
|
||||
|
||||
hw_dir = target_name == 'sparc64' ? 'sparc64' : arch
|
||||
hw = hw_arch[hw_dir].apply(config_target, strict: false)
|
||||
arch_srcs += hw.sources()
|
||||
@@ -807,6 +815,9 @@ foreach target : target_dirs
|
||||
)
|
||||
endif
|
||||
|
||||
t = target_arch[arch].apply(config_target, strict: false)
|
||||
arch_srcs += t.sources()
|
||||
|
||||
target_common = common_ss.apply(config_target, strict: false)
|
||||
objects = common_all.extract_objects(target_common.sources())
|
||||
|
||||
|
||||
Executable → Regular
+1
-1
@@ -1257,7 +1257,7 @@ def main():
|
||||
long_opts = ['decode=', 'translate=', 'output=', 'insnwidth=',
|
||||
'static-decode=', 'varinsnwidth=']
|
||||
try:
|
||||
(opts, args) = getopt.getopt(sys.argv[1:], 'o:vw:', long_opts)
|
||||
(opts, args) = getopt.gnu_getopt(sys.argv[1:], 'o:vw:', long_opts)
|
||||
except getopt.GetoptError as err:
|
||||
error(0, err)
|
||||
for o, a in opts:
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
obj-$(CONFIG_SOFTMMU) += machine.o
|
||||
obj-y += translate.o helper.o cpu.o
|
||||
obj-y += int_helper.o fpu_helper.o vax_helper.o sys_helper.o mem_helper.o
|
||||
obj-y += gdbstub.o
|
||||
@@ -0,0 +1,18 @@
|
||||
alpha_ss = ss.source_set()
|
||||
alpha_ss.add(files(
|
||||
'cpu.c',
|
||||
'fpu_helper.c',
|
||||
'gdbstub.c',
|
||||
'helper.c',
|
||||
'int_helper.c',
|
||||
'mem_helper.c',
|
||||
'sys_helper.c',
|
||||
'translate.c',
|
||||
'vax_helper.c',
|
||||
))
|
||||
|
||||
alpha_softmmu_ss = ss.source_set()
|
||||
alpha_softmmu_ss.add(files('machine.c'))
|
||||
|
||||
target_arch += {'alpha': alpha_ss}
|
||||
target_softmmu_arch += {'alpha': alpha_softmmu_ss}
|
||||
@@ -1,89 +0,0 @@
|
||||
obj-$(CONFIG_TCG) += arm-semi.o
|
||||
obj-y += helper.o vfp_helper.o
|
||||
obj-y += cpu.o gdbstub.o
|
||||
obj-$(TARGET_AARCH64) += cpu64.o gdbstub64.o
|
||||
|
||||
obj-$(CONFIG_SOFTMMU) += machine.o arch_dump.o monitor.o
|
||||
obj-$(CONFIG_SOFTMMU) += arm-powerctl.o
|
||||
|
||||
obj-$(CONFIG_KVM) += kvm.o
|
||||
obj-$(call land,$(CONFIG_KVM),$(call lnot,$(TARGET_AARCH64))) += kvm32.o
|
||||
obj-$(call land,$(CONFIG_KVM),$(TARGET_AARCH64)) += kvm64.o
|
||||
obj-$(call lnot,$(CONFIG_KVM)) += kvm-stub.o
|
||||
|
||||
DECODETREE = $(SRC_PATH)/scripts/decodetree.py
|
||||
|
||||
target/arm/decode-sve.c.inc: $(SRC_PATH)/target/arm/sve.decode $(DECODETREE)
|
||||
$(call quiet-command,\
|
||||
$(PYTHON) $(DECODETREE) --decode disas_sve -o $@ $<,\
|
||||
"GEN", $(TARGET_DIR)$@)
|
||||
|
||||
target/arm/decode-neon-shared.c.inc: $(SRC_PATH)/target/arm/neon-shared.decode $(DECODETREE)
|
||||
$(call quiet-command,\
|
||||
$(PYTHON) $(DECODETREE) --static-decode disas_neon_shared -o $@ $<,\
|
||||
"GEN", $(TARGET_DIR)$@)
|
||||
|
||||
target/arm/decode-neon-dp.c.inc: $(SRC_PATH)/target/arm/neon-dp.decode $(DECODETREE)
|
||||
$(call quiet-command,\
|
||||
$(PYTHON) $(DECODETREE) --static-decode disas_neon_dp -o $@ $<,\
|
||||
"GEN", $(TARGET_DIR)$@)
|
||||
|
||||
target/arm/decode-neon-ls.c.inc: $(SRC_PATH)/target/arm/neon-ls.decode $(DECODETREE)
|
||||
$(call quiet-command,\
|
||||
$(PYTHON) $(DECODETREE) --static-decode disas_neon_ls -o $@ $<,\
|
||||
"GEN", $(TARGET_DIR)$@)
|
||||
|
||||
target/arm/decode-vfp.c.inc: $(SRC_PATH)/target/arm/vfp.decode $(DECODETREE)
|
||||
$(call quiet-command,\
|
||||
$(PYTHON) $(DECODETREE) --static-decode disas_vfp -o $@ $<,\
|
||||
"GEN", $(TARGET_DIR)$@)
|
||||
|
||||
target/arm/decode-vfp-uncond.c.inc: $(SRC_PATH)/target/arm/vfp-uncond.decode $(DECODETREE)
|
||||
$(call quiet-command,\
|
||||
$(PYTHON) $(DECODETREE) --static-decode disas_vfp_uncond -o $@ $<,\
|
||||
"GEN", $(TARGET_DIR)$@)
|
||||
|
||||
target/arm/decode-a32.c.inc: $(SRC_PATH)/target/arm/a32.decode $(DECODETREE)
|
||||
$(call quiet-command,\
|
||||
$(PYTHON) $(DECODETREE) --static-decode disas_a32 -o $@ $<,\
|
||||
"GEN", $(TARGET_DIR)$@)
|
||||
|
||||
target/arm/decode-a32-uncond.c.inc: $(SRC_PATH)/target/arm/a32-uncond.decode $(DECODETREE)
|
||||
$(call quiet-command,\
|
||||
$(PYTHON) $(DECODETREE) --static-decode disas_a32_uncond -o $@ $<,\
|
||||
"GEN", $(TARGET_DIR)$@)
|
||||
|
||||
target/arm/decode-t32.c.inc: $(SRC_PATH)/target/arm/t32.decode $(DECODETREE)
|
||||
$(call quiet-command,\
|
||||
$(PYTHON) $(DECODETREE) --static-decode disas_t32 -o $@ $<,\
|
||||
"GEN", $(TARGET_DIR)$@)
|
||||
|
||||
target/arm/decode-t16.c.inc: $(SRC_PATH)/target/arm/t16.decode $(DECODETREE)
|
||||
$(call quiet-command,\
|
||||
$(PYTHON) $(DECODETREE) -w 16 --static-decode disas_t16 -o $@ $<,\
|
||||
"GEN", $(TARGET_DIR)$@)
|
||||
|
||||
target/arm/translate-sve.o: target/arm/decode-sve.c.inc
|
||||
target/arm/translate.o: target/arm/decode-neon-shared.c.inc
|
||||
target/arm/translate.o: target/arm/decode-neon-dp.c.inc
|
||||
target/arm/translate.o: target/arm/decode-neon-ls.c.inc
|
||||
target/arm/translate.o: target/arm/decode-vfp.c.inc
|
||||
target/arm/translate.o: target/arm/decode-vfp-uncond.c.inc
|
||||
target/arm/translate.o: target/arm/decode-a32.c.inc
|
||||
target/arm/translate.o: target/arm/decode-a32-uncond.c.inc
|
||||
target/arm/translate.o: target/arm/decode-t32.c.inc
|
||||
target/arm/translate.o: target/arm/decode-t16.c.inc
|
||||
|
||||
obj-y += tlb_helper.o debug_helper.o
|
||||
obj-y += translate.o op_helper.o
|
||||
obj-y += crypto_helper.o
|
||||
obj-y += iwmmxt_helper.o vec_helper.o neon_helper.o
|
||||
obj-y += m_helper.o
|
||||
obj-y += cpu_tcg.o
|
||||
|
||||
obj-$(CONFIG_SOFTMMU) += psci.o
|
||||
|
||||
obj-$(TARGET_AARCH64) += translate-a64.o helper-a64.o
|
||||
obj-$(TARGET_AARCH64) += translate-sve.o sve_helper.o
|
||||
obj-$(TARGET_AARCH64) += pauth_helper.o
|
||||
obj-$(TARGET_AARCH64) += mte_helper.o
|
||||
@@ -0,0 +1,62 @@
|
||||
gen = [
|
||||
decodetree.process('sve.decode', extra_args: '--decode=disas_sve'),
|
||||
decodetree.process('neon-shared.decode', extra_args: '--static-decode=disas_neon_shared'),
|
||||
decodetree.process('neon-dp.decode', extra_args: '--static-decode=disas_neon_dp'),
|
||||
decodetree.process('neon-ls.decode', extra_args: '--static-decode=disas_neon_ls'),
|
||||
decodetree.process('vfp.decode', extra_args: '--static-decode=disas_vfp'),
|
||||
decodetree.process('vfp-uncond.decode', extra_args: '--static-decode=disas_vfp_uncond'),
|
||||
decodetree.process('a32.decode', extra_args: '--static-decode=disas_a32'),
|
||||
decodetree.process('a32-uncond.decode', extra_args: '--static-decode=disas_a32_uncond'),
|
||||
decodetree.process('t32.decode', extra_args: '--static-decode=disas_t32'),
|
||||
decodetree.process('t16.decode', extra_args: ['-w', '16', '--static-decode=disas_t16']),
|
||||
]
|
||||
|
||||
arm_ss = ss.source_set()
|
||||
arm_ss.add(gen)
|
||||
arm_ss.add(files(
|
||||
'cpu.c',
|
||||
'crypto_helper.c',
|
||||
'debug_helper.c',
|
||||
'gdbstub.c',
|
||||
'helper.c',
|
||||
'iwmmxt_helper.c',
|
||||
'm_helper.c',
|
||||
'neon_helper.c',
|
||||
'op_helper.c',
|
||||
'tlb_helper.c',
|
||||
'translate.c',
|
||||
'vec_helper.c',
|
||||
'vfp_helper.c',
|
||||
'cpu_tcg.c',
|
||||
))
|
||||
arm_ss.add(zlib)
|
||||
|
||||
arm_ss.add(when: 'CONFIG_TCG', if_true: files('arm-semi.c'))
|
||||
|
||||
kvm_ss = ss.source_set()
|
||||
kvm_ss.add(when: 'TARGET_AARCH64', if_true: files('kvm64.c'), if_false: files('kvm32.c'))
|
||||
arm_ss.add_all(when: 'CONFIG_KVM', if_true: kvm_ss)
|
||||
arm_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c'), if_false: files('kvm-stub.c'))
|
||||
|
||||
arm_ss.add(when: 'TARGET_AARCH64', if_true: files(
|
||||
'cpu64.c',
|
||||
'gdbstub64.c',
|
||||
'helper-a64.c',
|
||||
'mte_helper.c',
|
||||
'pauth_helper.c',
|
||||
'sve_helper.c',
|
||||
'translate-a64.c',
|
||||
'translate-sve.c',
|
||||
))
|
||||
|
||||
arm_softmmu_ss = ss.source_set()
|
||||
arm_softmmu_ss.add(files(
|
||||
'arch_dump.c',
|
||||
'arm-powerctl.c',
|
||||
'machine.c',
|
||||
'monitor.c',
|
||||
'psci.c',
|
||||
))
|
||||
|
||||
target_arch += {'arm': arm_ss}
|
||||
target_softmmu_arch += {'arm': arm_softmmu_ss}
|
||||
@@ -1,34 +0,0 @@
|
||||
#
|
||||
# QEMU AVR
|
||||
#
|
||||
# Copyright (c) 2016-2020 Michael Rolnik
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, see
|
||||
# <http://www.gnu.org/licenses/lgpl-2.1.html>
|
||||
#
|
||||
|
||||
DECODETREE = $(SRC_PATH)/scripts/decodetree.py
|
||||
decode-y = $(SRC_PATH)/target/avr/insn.decode
|
||||
|
||||
target/avr/decode_insn.c.inc: $(decode-y) $(DECODETREE)
|
||||
$(call quiet-command, \
|
||||
$(PYTHON) $(DECODETREE) -o $@ --decode decode_insn --insnwidth 16 $<, \
|
||||
"GEN", $(TARGET_DIR)$@)
|
||||
|
||||
target/avr/translate.o: target/avr/decode_insn.c.inc
|
||||
|
||||
obj-y += translate.o cpu.o helper.o
|
||||
obj-y += gdbstub.o
|
||||
obj-y += disas.o
|
||||
obj-$(CONFIG_SOFTMMU) += machine.o
|
||||
+1
-1
@@ -60,7 +60,7 @@ static int append_16(DisasContext *ctx, int x)
|
||||
|
||||
/* Include the auto-generated decoder. */
|
||||
static bool decode_insn(DisasContext *ctx, uint16_t insn);
|
||||
#include "decode_insn.c.inc"
|
||||
#include "decode-insn.c.inc"
|
||||
|
||||
#define output(mnemonic, format, ...) \
|
||||
(pctx->info->fprintf_func(pctx->info->stream, "%-9s " format, \
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
gen = [
|
||||
decodetree.process('insn.decode', extra_args: [ '--decode', 'decode_insn',
|
||||
'--insnwidth', '16' ])
|
||||
]
|
||||
|
||||
avr_ss = ss.source_set()
|
||||
avr_softmmu_ss = ss.source_set()
|
||||
|
||||
avr_ss.add(gen)
|
||||
avr_ss.add(files(
|
||||
'translate.c',
|
||||
'helper.c',
|
||||
'cpu.c',
|
||||
'gdbstub.c',
|
||||
'disas.c'))
|
||||
|
||||
avr_softmmu_ss.add(files('machine.c'))
|
||||
|
||||
target_arch += {'avr': avr_ss}
|
||||
target_softmmu_arch += {'avr': avr_softmmu_ss}
|
||||
@@ -198,7 +198,7 @@ static bool avr_have_feature(DisasContext *ctx, int feature)
|
||||
}
|
||||
|
||||
static bool decode_insn(DisasContext *ctx, uint16_t insn);
|
||||
#include "decode_insn.c.inc"
|
||||
#include "decode-insn.c.inc"
|
||||
|
||||
/*
|
||||
* Arithmetic Instructions
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
obj-y += translate.o op_helper.o helper.o cpu.o
|
||||
obj-y += gdbstub.o
|
||||
obj-$(CONFIG_SOFTMMU) += mmu.o machine.o
|
||||
@@ -0,0 +1,14 @@
|
||||
cris_ss = ss.source_set()
|
||||
cris_ss.add(files(
|
||||
'cpu.c',
|
||||
'gdbstub.c',
|
||||
'helper.c',
|
||||
'op_helper.c',
|
||||
'translate.c',
|
||||
))
|
||||
|
||||
cris_softmmu_ss = ss.source_set()
|
||||
cris_softmmu_ss.add(files('mmu.c', 'machine.c'))
|
||||
|
||||
target_arch += {'cris': cris_ss}
|
||||
target_softmmu_arch += {'cris': cris_softmmu_ss}
|
||||
@@ -1,11 +0,0 @@
|
||||
obj-y += translate.o helper.o cpu.o op_helper.o gdbstub.o mem_helper.o
|
||||
obj-y += int_helper.o
|
||||
obj-$(CONFIG_SOFTMMU) += machine.o
|
||||
|
||||
DECODETREE = $(SRC_PATH)/scripts/decodetree.py
|
||||
|
||||
target/hppa/decode.c.inc: $(SRC_PATH)/target/hppa/insns.decode $(DECODETREE)
|
||||
$(call quiet-command,\
|
||||
$(PYTHON) $(DECODETREE) -o $@ $<, "GEN", $(TARGET_DIR)$@)
|
||||
|
||||
target/hppa/translate.o: target/hppa/decode.c.inc
|
||||
@@ -0,0 +1,19 @@
|
||||
gen = decodetree.process('insns.decode')
|
||||
|
||||
hppa_ss = ss.source_set()
|
||||
hppa_ss.add(gen)
|
||||
hppa_ss.add(files(
|
||||
'cpu.c',
|
||||
'gdbstub.c',
|
||||
'helper.c',
|
||||
'int_helper.c',
|
||||
'mem_helper.c',
|
||||
'op_helper.c',
|
||||
'translate.c',
|
||||
))
|
||||
|
||||
hppa_softmmu_ss = ss.source_set()
|
||||
hppa_softmmu_ss.add(files('machine.c'))
|
||||
|
||||
target_arch += {'hppa': hppa_ss}
|
||||
target_softmmu_arch += {'hppa': hppa_softmmu_ss}
|
||||
@@ -334,7 +334,7 @@ static int expand_shl11(DisasContext *ctx, int val)
|
||||
|
||||
|
||||
/* Include the auto-generated decoder. */
|
||||
#include "decode.c.inc"
|
||||
#include "decode-insns.c.inc"
|
||||
|
||||
/* We are not using a goto_tb (for whatever reason), but have updated
|
||||
the iaq (for whatever reason), so don't do it again on exit. */
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
obj-y += helper.o cpu.o gdbstub.o xsave_helper.o
|
||||
obj-$(CONFIG_TCG) += translate.o
|
||||
obj-$(CONFIG_TCG) += bpt_helper.o cc_helper.o excp_helper.o fpu_helper.o
|
||||
obj-$(CONFIG_TCG) += int_helper.o mem_helper.o misc_helper.o mpx_helper.o
|
||||
obj-$(CONFIG_TCG) += seg_helper.o smm_helper.o svm_helper.o
|
||||
obj-$(call lnot,$(CONFIG_TCG)) += tcg-stub.o
|
||||
obj-$(call lnot,$(CONFIG_KVM)) += kvm-stub.o
|
||||
ifeq ($(CONFIG_SOFTMMU),y)
|
||||
obj-y += machine.o arch_memory_mapping.o arch_dump.o monitor.o
|
||||
obj-$(CONFIG_KVM) += kvm.o
|
||||
obj-$(CONFIG_HYPERV) += hyperv.o
|
||||
obj-$(call lnot,$(CONFIG_HYPERV)) += hyperv-stub.o
|
||||
ifeq ($(CONFIG_WIN32),y)
|
||||
obj-$(CONFIG_HAX) += hax-all.o hax-mem.o hax-windows.o
|
||||
endif
|
||||
ifeq ($(CONFIG_POSIX),y)
|
||||
obj-$(CONFIG_HAX) += hax-all.o hax-mem.o hax-posix.o
|
||||
endif
|
||||
obj-$(CONFIG_HVF) += hvf/
|
||||
obj-$(CONFIG_WHPX) += whpx-all.o
|
||||
endif
|
||||
obj-$(CONFIG_SEV) += sev.o
|
||||
obj-$(call lnot,$(CONFIG_SEV)) += sev-stub.o
|
||||
@@ -1,2 +0,0 @@
|
||||
obj-y += hvf.o
|
||||
obj-y += x86.o x86_cpuid.o x86_decode.o x86_descr.o x86_emu.o x86_flags.o x86_mmu.o x86hvf.o x86_task.o
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user