target/ppc: change struct PPC_DFP decimal storage from uint64[2] to ppc_vsr_t
commit64b8574e143f2287009ad77a12b87e64516a0711
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Thu, 26 Sep 2019 18:57:59 +0000 (26 19:57 +0100)
committerDavid Gibson <david@gibson.dropbear.id.au>
Fri, 4 Oct 2019 09:08:21 +0000 (4 19:08 +1000)
treec371b1303d51680ffaffc9b4eb0ed21ad62e29d7
parent474c2e931d51bad00c20c65d6fe478a9391e5e2a
target/ppc: change struct PPC_DFP decimal storage from uint64[2] to ppc_vsr_t

There are several places in dfp_helper.c that access the decimal number
representations in struct PPC_DFP via HI_IDX and LO_IDX defines which are set
at the top of dfp_helper.c according to the host endian.

However we can instead switch to using ppc_vsr_t for decimal numbers and then
make subsequent use of the existing VsrD() macros to access the correct
element regardless of host endian. Note that 64-bit decimals are stored in the
LSB of ppc_vsr_t (equivalent to VsrD(1)).

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20190926185801.11176-6-mark.cave-ayland@ilande.co.uk>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
target/ppc/dfp_helper.c