tcg/tcg-op.c: Fix ld/st of 64 bit values on 32-bit bigendian hosts
commitcf811fff2ae20008f00455d0ab2212a4dea0b56f
authorPeter Maydell <peter.maydell@linaro.org>
Wed, 8 Apr 2015 19:57:09 +0000 (8 20:57 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Thu, 9 Apr 2015 09:51:10 +0000 (9 10:51 +0100)
tree55fb5cb86cd70f7546ddaf6fec5428e73fd4ceb3
parentc8623c0215e18eb4a8ec73eba014d97e51ed707e
tcg/tcg-op.c: Fix ld/st of 64 bit values on 32-bit bigendian hosts

Commit 951c6300f7 out-of-lined the 32-bit-host versions of
tcg_gen_{ld,st}_i64, but in the process it inadvertently changed
an #ifdef HOST_WORDS_BIGENDIAN to #ifdef TCG_TARGET_WORDS_BIGENDIAN.
Since the latter doesn't get defined anywhere this meant we always
took the "LE host" codepath, and stored the two halves of the value
in the wrong order on BE hosts. This typically breaks any 64-bit
guest on a 32-bit BE host completely, and will have possibly more
subtle effects even for 32-bit guests.

Switch the ifdef back to HOST_WORDS_BIGENDIAN.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Tested-by: Andreas Färber <afaerber@suse.de>
Message-id: 1428523029-13620-1-git-send-email-peter.maydell@linaro.org
tcg/tcg-op.c