aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierrick Bouvier <pierrick.bouvier@linaro.org>2025-07-30 15:05:17 -0700
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2025-09-02 17:57:05 +0200
commit38838f0837a3fcfadf000d885329216195a5f9ae (patch)
tree32c8b49e39cd55e8177d76386365cf85a6960584
parent01b6fb37056bf5c6a734e77b386f4e9c830b2ce0 (diff)
downloadqemu-38838f0837a3fcfadf000d885329216195a5f9ae.zip
qemu-38838f0837a3fcfadf000d885329216195a5f9ae.tar.gz
qemu-38838f0837a3fcfadf000d885329216195a5f9ae.tar.bz2
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>
-rw-r--r--cpu-target.c5
-rw-r--r--meson.build3
-rw-r--r--target-info-stub.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/cpu-target.c b/cpu-target.c
index 772e354..f030e2c 100644
--- a/cpu-target.c
+++ b/cpu-target.c
@@ -18,7 +18,6 @@
*/
#include "qemu/osdep.h"
-#include "cpu.h"
#include "accel/accel-cpu-ops.h"
#include "system/cpus.h"
#include "exec/cpu-common.h"
@@ -27,10 +26,6 @@
#include "hw/core/cpu.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
CPU loop after each instruction */
void cpu_single_step(CPUState *cpu, int enabled)
diff --git a/meson.build b/meson.build
index 0d42de6..7ff8478 100644
--- a/meson.build
+++ b/meson.build
@@ -3876,7 +3876,8 @@ if have_block
endif
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')
diff --git a/target-info-stub.c b/target-info-stub.c
index ca0caa3..d96d824 100644
--- a/target-info-stub.c
+++ b/target-info-stub.c
@@ -12,6 +12,10 @@
#include "hw/boards.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 = {
.target_name = TARGET_NAME,
.target_arch = SYS_EMU_TARGET__MAX,