diff options
author | Pierrick Bouvier <pierrick.bouvier@linaro.org> | 2025-03-24 21:58:48 -0700 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2025-04-23 15:04:57 -0700 |
commit | 8d535c312ca5944622b3b74177eb12d8f6b7a7fa (patch) | |
tree | ab2ba956c6a28faa3ec6c4b23b1164742bfc4357 | |
parent | 33d2cca32b6822767c1f388f0b05b8a046aa556f (diff) | |
download | qemu-8d535c312ca5944622b3b74177eb12d8f6b7a7fa.zip qemu-8d535c312ca5944622b3b74177eb12d8f6b7a7fa.tar.gz qemu-8d535c312ca5944622b3b74177eb12d8f6b7a7fa.tar.bz2 |
include/exec/cpu-all: move compile time check for CPUArchState to cpu-target.c
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20250325045915.994760-4-pierrick.bouvier@linaro.org>
-rw-r--r-- | cpu-target.c | 5 | ||||
-rw-r--r-- | include/exec/cpu-all.h | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/cpu-target.c b/cpu-target.c index 519b0f8..7f3b244 100644 --- a/cpu-target.c +++ b/cpu-target.c @@ -18,6 +18,7 @@ */ #include "qemu/osdep.h" +#include "cpu.h" #include "qapi/error.h" #include "qemu/error-report.h" #include "qemu/qemu-print.h" @@ -29,6 +30,10 @@ #include "accel/accel-cpu-target.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)); + char *cpu_model_from_type(const char *typename) { const char *suffix = "-" CPU_RESOLVING_TYPE; diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h index 2aaaf05..be462c4 100644 --- a/include/exec/cpu-all.h +++ b/include/exec/cpu-all.h @@ -33,8 +33,4 @@ #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)); - #endif /* CPU_ALL_H */ |