summaryrefslogtreecommitdiffstats
path: root/target-arm/translate.h
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2015-09-14 14:39:47 +0100
committerPeter Maydell <peter.maydell@linaro.org>2015-09-14 14:39:47 +0100
commit78bcaa3e37afbd0c5316634f917c13487384b6ca (patch)
tree5aafa1f48d4eaf72649480621fdbe52cd04ff76a /target-arm/translate.h
parent24cfc8dc583db57303137fd41f9f42806ea315a0 (diff)
downloadhqemu-78bcaa3e37afbd0c5316634f917c13487384b6ca.zip
hqemu-78bcaa3e37afbd0c5316634f917c13487384b6ca.tar.gz
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>
Diffstat (limited to 'target-arm/translate.h')
-rw-r--r--target-arm/translate.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/target-arm/translate.h b/target-arm/translate.h
index 4b618a4..a30a1db 100644
--- a/target-arm/translate.h
+++ b/target-arm/translate.h
@@ -63,7 +63,15 @@ typedef struct DisasContext {
TCGv_i64 tmp_a64[TMP_A64_MAX];
} DisasContext;
+/* Share the TCG temporaries common between 32 and 64 bit modes. */
extern TCGv_ptr cpu_env;
+extern TCGv_i32 cpu_NF, cpu_ZF, cpu_CF, cpu_VF;
+extern TCGv_i64 cpu_exclusive_addr;
+extern TCGv_i64 cpu_exclusive_val;
+#ifdef CONFIG_USER_ONLY
+extern TCGv_i64 cpu_exclusive_test;
+extern TCGv_i32 cpu_exclusive_info;
+#endif
static inline int arm_dc_feature(DisasContext *dc, int feature)
{
OpenPOWER on IntegriCloud