]> git.proxmox.com Git - mirror_qemu.git/commit
target/arm: Add compile time asserts to load/store_cpu_field macros
authorPeter Maydell <peter.maydell@linaro.org>
Mon, 24 Apr 2023 15:39:09 +0000 (16:39 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 2 May 2023 14:47:41 +0000 (15:47 +0100)
commit2b67d0ff971cb232c6d3cbb2cc44d9e2b7a7aac2
treed6715df48e1aa12ef4cc7dc5c92cedbb66eac23b
parent7f3a3d3dc433dc06c0adb480729af80f9c8e3739
target/arm: Add compile time asserts to load/store_cpu_field macros

Add some compile-time asserts to the load_cpu_field() and store_cpu_field()
macros that the struct field being accessed is the expected size. This
lets us catch cases where we incorrectly tried to do a 32-bit load
from a 64-bit struct field.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20230424153909.1419369-3-peter.maydell@linaro.org
target/arm/translate-a32.h