target/ppc: move FP and VMX registers into aligned vsr register array
commitef96e3ae9698d6726a8113f448c82985a9f31ff5
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Wed, 2 Jan 2019 09:14:22 +0000 (2 09:14 +0000)
committerDavid Gibson <david@gibson.dropbear.id.au>
Tue, 8 Jan 2019 22:28:14 +0000 (9 09:28 +1100)
treed1dbc567f2fbab371978de9f3d6095e8e0ab7bef
parent05ee3e8aa0c0178e98c9a05755359e382f56ce87
target/ppc: move FP and VMX registers into aligned vsr register array

The VSX register array is a block of 64 128-bit registers where the first 32
registers consist of the existing 64-bit FP registers extended to 128-bit
using new VSR registers, and the last 32 registers are the VMX 128-bit
registers as show below:

            64-bit               64-bit
    +--------------------+--------------------+
    |        FP0         |                    |  VSR0
    +--------------------+--------------------+
    |        FP1         |                    |  VSR1
    +--------------------+--------------------+
    |        ...         |        ...         |  ...
    +--------------------+--------------------+
    |        FP30        |                    |  VSR30
    +--------------------+--------------------+
    |        FP31        |                    |  VSR31
    +--------------------+--------------------+
    |                  VMX0                   |  VSR32
    +-----------------------------------------+
    |                  VMX1                   |  VSR33
    +-----------------------------------------+
    |                  ...                    |  ...
    +-----------------------------------------+
    |                  VMX30                  |  VSR62
    +-----------------------------------------+
    |                  VMX31                  |  VSR63
    +-----------------------------------------+

In order to allow for future conversion of VSX instructions to use TCG vector
operations, recreate the same layout using an aligned version of the existing
vsr register array.

Since the old fpr and avr register arrays are removed, the existing callers
must also be updated to use the correct offset in the vsr register array. This
also includes switching the relevant VMState fields over to using subarrays
to make sure that migration is preserved.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
13 files changed:
linux-user/ppc/signal.c
target/ppc/arch_dump.c
target/ppc/cpu.h
target/ppc/gdbstub.c
target/ppc/internal.h
target/ppc/kvm.c
target/ppc/machine.c
target/ppc/monitor.c
target/ppc/translate.c
target/ppc/translate/dfp-impl.inc.c
target/ppc/translate/vmx-impl.inc.c
target/ppc/translate/vsx-impl.inc.c
target/ppc/translate_init.inc.c