]> Git Repo - qemu.git/commit
atomics: Set ATOMIC_REG_SIZE=8 for MIPS n32
authorPaul Burton <[email protected]>
Thu, 27 Dec 2018 15:32:11 +0000 (16:32 +0100)
committerAleksandar Markovic <[email protected]>
Thu, 3 Jan 2019 16:52:52 +0000 (17:52 +0100)
commitc5b00c1684f3317e887c7401b58dde54c2b05354
tree0df3e623d1f1771c3b313fc9e621972d313699f1
parent215943b812779a6af3d105ef59bec22d57198db2
atomics: Set ATOMIC_REG_SIZE=8 for MIPS n32

ATOMIC_REG_SIZE is currently defined as the default sizeof(void *) for
all MIPS host builds, including those using the n32 ABI. n32 is the
MIPS64 ILP32 ABI and as such tcg/mips/tcg-target.h defines
TCG_TARGET_REG_BITS as 64 for n32 builds. If we attempt to build QEMU
for an n32 host with support for a 64b target architecture then
TCG_OVERSIZED_GUEST is 0 and accel/tcg/cputlb.c attempts to use
atomic_* functions. This fails because ATOMIC_REG_SIZE is 4, causing
the calls to QEMU_BUILD_BUG_ON(sizeof(*ptr) > ATOMIC_REG_SIZE) in the
various atomic_* functions to generate errors.

Fix this by defining ATOMIC_REG_SIZE as 8 for all MIPS64 builds, which
will cover both n32 (ILP32) & n64 (LP64) ABIs in much the same was as
we already do for x86_64/x32.

Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
Signed-off-by: Aleksandar Markovic <[email protected]>
Signed-off-by: Paul Burton <[email protected]>
include/qemu/atomic.h
This page took 0.028149 seconds and 4 git commands to generate.