target-arm: Share all common TCG temporaries
commit052677b2c87779a6da6181b848825b29e65c0f54
authorRichard Henderson <rth@twiddle.net>
Mon, 14 Sep 2015 13:39:47 +0000 (14 14:39 +0100)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Wed, 21 Oct 2015 01:12:11 +0000 (20 20:12 -0500)
treee80330ffd47cc96594a2eb59b54f30c4f8231bb9
parent0fdf9f756fff60ec1c02dbd59698ba3dbb30eabe
target-arm: Share all common TCG temporaries

This is a bug fix for aarch64.  At present, we have branches using
the 32-bit (translate.c) versions of cpu_[NZCV]F, but we set the flags
using the 64-bit (translate-a64.c) versions of cpu_[NZCV]F.  From
the view of the TCG code generator, these are unrelated variables.

The bug is hard to see because we currently only read these variables
from branches, and upon reaching a branch TCG will first spill live
variables and then reload the arguments of the branch.  Since the
32-bit versions were never live until reaching the branch, we'd re-read
the data that had just been spilled from the 64-bit versions.

There is currently no such problem with the cpu_exclusive_* variables,
but there's no point in tempting fate.

Cc: qemu-stable@nongnu.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Message-id: 1441909103-24666-2-git-send-email-rth@twiddle.net
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
(cherry picked from commit 78bcaa3e37afbd0c5316634f917c13487384b6ca)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
target-arm/translate-a64.c
target-arm/translate.c
target-arm/translate.h