diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2021-07-16 08:17:18 -0700 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2021-07-21 07:45:38 -1000 |
commit | 9ef0c6d6a7d81992a2326416a9ce12eef2824861 (patch) | |
tree | dc4c99d93f6823e1cca48772a23cd8926bce3ee8 /accel/tcg/atomic_template.h | |
parent | 47345e7124709d280f14551113a20fd81ad2bf20 (diff) |
qemu/atomic: Add aligned_{int64,uint64}_t types
Use it to avoid some clang-12 -Watomic-alignment errors,
forcing some structures to be aligned and as a pointer when
we have ensured that the address is aligned.
Tested-by: Cole Robinson <crobinso@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'accel/tcg/atomic_template.h')
-rw-r--r-- | accel/tcg/atomic_template.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/accel/tcg/atomic_template.h b/accel/tcg/atomic_template.h index afa8a9daf3..d347462af5 100644 --- a/accel/tcg/atomic_template.h +++ b/accel/tcg/atomic_template.h @@ -28,8 +28,8 @@ # define SHIFT 4 #elif DATA_SIZE == 8 # define SUFFIX q -# define DATA_TYPE uint64_t -# define SDATA_TYPE int64_t +# define DATA_TYPE aligned_uint64_t +# define SDATA_TYPE aligned_int64_t # define BSWAP bswap64 # define SHIFT 3 #elif DATA_SIZE == 4 |