target-arm: A64: Fix vector register access on bigendian hosts
commit76afb0d5967ebee59efbf3bfc6a2a042f3cb06f6
authorPeter Maydell <peter.maydell@linaro.org>
Sat, 4 Jan 2014 22:15:49 +0000 (4 22:15 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 7 Jan 2014 19:18:06 +0000 (7 19:18 +0000)
tree5b94b2a96ee597b3a67ca9b98bf59d90053c4b0f
parent83d210fb670862e9df5ca19d260fd7628cd67843
target-arm: A64: Fix vector register access on bigendian hosts

The A64 128 bit vector registers are stored as a pair of
uint64_t values in the register array. This means that if
we're directly loading or storing a value of size less than
64 bits we must adjust the offset appropriately to account
for whether the host is bigendian or not. Provide utility
functions to abstract away the offsetof() calculations for
the FP registers.

For do_fp_st() we can sidestep most of the issues for 64 bit
and smaller reg-to-mem transfers by always doing a 64 bit
load from the register and writing just the piece we need
to memory.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <rth@twiddle.net>
target-arm/translate-a64.c