summaryrefslogtreecommitdiffstats
path: root/target/arm/translate.c
diff options
context:
space:
mode:
authorRichard Henderson2020-11-02 17:52:12 +0100
committerPeter Maydell2020-11-02 17:52:12 +0100
commit015ee81a4c06b644969f621fd9965cc6372b879e (patch)
treec0d9ebec85f8ba68acdbf0759cc9a0cc5b985894 /target/arm/translate.c
parentMerge remote-tracking branch 'remotes/cschoenebeck/tags/pull-9p-20201102' int... (diff)
downloadqemu-015ee81a4c06b644969f621fd9965cc6372b879e.tar.gz
qemu-015ee81a4c06b644969f621fd9965cc6372b879e.tar.xz
qemu-015ee81a4c06b644969f621fd9965cc6372b879e.zip
target/arm: Introduce neon_full_reg_offset
This function makes it clear that we're talking about the whole register, and not the 32-bit piece at index 0. This fixes a bug when running on a big-endian host. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20201030022618.785675-2-richard.henderson@linaro.org Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target/arm/translate.c')
-rw-r--r--target/arm/translate.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/target/arm/translate.c b/target/arm/translate.c
index 38371db540..1b61e50f9c 100644
--- a/target/arm/translate.c
+++ b/target/arm/translate.c
@@ -1094,6 +1094,14 @@ static inline void gen_hlt(DisasContext *s, int imm)
unallocated_encoding(s);
}
+/*
+ * Return the offset of a "full" NEON Dreg.
+ */
+static long neon_full_reg_offset(unsigned reg)
+{
+ return offsetof(CPUARMState, vfp.zregs[reg >> 1].d[reg & 1]);
+}
+
static inline long vfp_reg_offset(bool dp, unsigned reg)
{
if (dp) {