mirror of https://gitee.com/openkylin/qemu.git
tcg/ppc: disable atomic write check on ppc32
This fixes building for ppc64 on ppc32 (changed in 5964fca8a1
):
tcg/ppc/tcg-target.inc.c: In function 'tb_target_set_jmp_target':
include/qemu/compiler.h:86:30: error: static assertion failed: \
"not expecting: sizeof(*(uint64_t *)jmp_addr) > ATOMIC_REG_SIZE"
QEMU_BUILD_BUG_ON(sizeof(*ptr) > ATOMIC_REG_SIZE); \
^
tcg/ppc/tcg-target.inc.c:1377:9: note: in expansion of macro 'atomic_set'
atomic_set((uint64_t *)jmp_addr, pair);
^
Suggested-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20170911204936.5020-1-f4bug@amsat.org>
[rth: Added commentary requested by pmm.]
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
5ee53d1593
commit
ba026602a6
|
@ -1374,7 +1374,9 @@ void tb_target_set_jmp_target(uintptr_t tc_ptr, uintptr_t jmp_addr,
|
|||
pair = (uint64_t)i2 << 32 | i1;
|
||||
#endif
|
||||
|
||||
atomic_set((uint64_t *)jmp_addr, pair);
|
||||
/* As per the enclosing if, this is ppc64. Avoid the _Static_assert
|
||||
within atomic_set that would fail to build a ppc32 host. */
|
||||
atomic_set__nocheck((uint64_t *)jmp_addr, pair);
|
||||
flush_icache_range(jmp_addr, jmp_addr + 8);
|
||||
} else {
|
||||
intptr_t diff = addr - jmp_addr;
|
||||
|
|
Loading…
Reference in New Issue