target/ppc: introduce avr_full_offset() function
commitc82a8a8542bee54824ea83856d33ad7656570a06
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Thu, 7 Mar 2019 18:05:17 +0000 (7 18:05 +0000)
committerDavid Gibson <david@gibson.dropbear.id.au>
Tue, 12 Mar 2019 03:33:04 +0000 (12 14:33 +1100)
tree3cbf9e2038b536eb50e4ff6c47ca05b18b5266bd
parentda7815ef31ff371427991cc90a3beef2ce0cc861
target/ppc: introduce avr_full_offset() function

All TCG vector operations require pointers to the base address of the vector
rather than separate access to the top and bottom 64-bits. Convert the VMX TCG
instructions to use a new avr_full_offset() function instead of avr64_offset()
which can then itself be written as a simple wrapper onto vsr_full_offset().

This same function can also reused in cpu_avr_ptr() to avoid having more than
one copy of the offset calculation logic.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-Id: <20190307180520.13868-5-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
target/ppc/cpu.h
target/ppc/translate/vmx-impl.inc.c
target/ppc/translate/vsx-impl.inc.c