Browse Source

cpu-target: build compilation unit once for user/system

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20250730220519.1140447-2-pierrick.bouvier@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
pull/300/head
Pierrick Bouvier 8 months ago
committed by Philippe Mathieu-Daudé
parent
commit
38838f0837
  1. 5
      cpu-target.c
  2. 3
      meson.build
  3. 4
      target-info-stub.c

5
cpu-target.c

@ -18,7 +18,6 @@
*/ */
#include "qemu/osdep.h" #include "qemu/osdep.h"
#include "cpu.h"
#include "accel/accel-cpu-ops.h" #include "accel/accel-cpu-ops.h"
#include "system/cpus.h" #include "system/cpus.h"
#include "exec/cpu-common.h" #include "exec/cpu-common.h"
@ -27,10 +26,6 @@
#include "hw/core/cpu.h" #include "hw/core/cpu.h"
#include "trace/trace-root.h" #include "trace/trace-root.h"
/* Validate correct placement of CPUArchState. */
QEMU_BUILD_BUG_ON(offsetof(ArchCPU, parent_obj) != 0);
QEMU_BUILD_BUG_ON(offsetof(ArchCPU, env) != sizeof(CPUState));
/* enable or disable single step mode. EXCP_DEBUG is returned by the /* enable or disable single step mode. EXCP_DEBUG is returned by the
CPU loop after each instruction */ CPU loop after each instruction */
void cpu_single_step(CPUState *cpu, int enabled) void cpu_single_step(CPUState *cpu, int enabled)

3
meson.build

@ -3876,7 +3876,8 @@ if have_block
endif endif
common_ss.add(files('cpu-common.c')) common_ss.add(files('cpu-common.c'))
specific_ss.add(files('cpu-target.c')) user_ss.add(files('cpu-target.c'))
system_ss.add(files('cpu-target.c'))
subdir('system') subdir('system')

4
target-info-stub.c

@ -12,6 +12,10 @@
#include "hw/boards.h" #include "hw/boards.h"
#include "cpu.h" #include "cpu.h"
/* Validate correct placement of CPUArchState. */
QEMU_BUILD_BUG_ON(offsetof(ArchCPU, parent_obj) != 0);
QEMU_BUILD_BUG_ON(offsetof(ArchCPU, env) != sizeof(CPUState));
static const TargetInfo target_info_stub = { static const TargetInfo target_info_stub = {
.target_name = TARGET_NAME, .target_name = TARGET_NAME,
.target_arch = SYS_EMU_TARGET__MAX, .target_arch = SYS_EMU_TARGET__MAX,

Loading…
Cancel
Save