mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
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>
This commit is contained in:
parent
47345e7124
commit
9ef0c6d6a7
6 changed files with 20 additions and 8 deletions
|
@ -82,7 +82,7 @@ static abi_ulong hppa_lws(CPUHPPAState *env)
|
|||
o64 = *(uint64_t *)g2h(cs, old);
|
||||
n64 = *(uint64_t *)g2h(cs, new);
|
||||
#ifdef CONFIG_ATOMIC64
|
||||
r64 = qatomic_cmpxchg__nocheck((uint64_t *)g2h(cs, addr),
|
||||
r64 = qatomic_cmpxchg__nocheck((aligned_uint64_t *)g2h(cs, addr),
|
||||
o64, n64);
|
||||
ret = r64 != o64;
|
||||
#else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue