[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 3/7] target/ppc: update {get, set}_dfp{64, 128}() helper func
From: |
Richard Henderson |
Subject: |
Re: [PATCH 3/7] target/ppc: update {get, set}_dfp{64, 128}() helper functions to read/write DFP numbers correctly |
Date: |
Tue, 24 Sep 2019 14:33:14 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 |
On 9/24/19 8:35 AM, Mark Cave-Ayland wrote:
> Since commit ef96e3ae96 "target/ppc: move FP and VMX registers into aligned
> vsr
> register array" FP registers are no longer stored consecutively in memory and
> so
> the current method of combining FP register pairs into DFP numbers is
> incorrect.
>
> Firstly update the definition of the dh_*_fprp defines in helper.h to reflect
> that FP registers are now stored as part of an array of ppc_vsr_t elements
> rather than plain uint64_t elements, and then introduce a new ppc_fprp_t type
> which conceptually represents a DFP even-odd register pair to be consumed by
> the
> DFP helper functions.
>
> Finally update the new DFP {get,set}_dfp{64,128}() helper functions to convert
> between DFP numbers and DFP even-odd register pairs correctly, making use of
> the
> existing VsrD() macro to access the correct elements regardless of host
> endian.
>
> Fixes: ef96e3ae96 "target/ppc: move FP and VMX registers into aligned vsr
> register array"
> Signed-off-by: Mark Cave-Ayland <address@hidden>
> ---
> target/ppc/cpu.h | 1 +
> target/ppc/dfp_helper.c | 80 +++++++++++++++++++++--------------------
> target/ppc/helper.h | 2 +-
> 3 files changed, 44 insertions(+), 39 deletions(-)
Yay! I really was getting ahead of things.
Reviewed-by: Richard Henderson <address@hidden>
r~
- Re: [PATCH 1/7] target/ppc: introduce get_dfp{64,128}() helper functions, (continued)
- [PATCH 2/7] target/ppc: introduce set_dfp{64,128}() helper functions, Mark Cave-Ayland, 2019/09/24
- [PATCH 6/7] target/ppc: use existing VsrD() macro to eliminate HI_IDX and LO_IDX from dfp_helper.c, Mark Cave-Ayland, 2019/09/24
- [PATCH 7/7] target/ppc: remove unnecessary if() around calls to set_dfp{64, 128}() in DFP macros, Mark Cave-Ayland, 2019/09/24
- [PATCH 3/7] target/ppc: update {get, set}_dfp{64, 128}() helper functions to read/write DFP numbers correctly, Mark Cave-Ayland, 2019/09/24
- Re: [PATCH 3/7] target/ppc: update {get, set}_dfp{64, 128}() helper functions to read/write DFP numbers correctly,
Richard Henderson <=
- [PATCH 4/7] target/ppc: introduce dfp_finalize_decimal{64, 128}() helper functions, Mark Cave-Ayland, 2019/09/24
- [PATCH 5/7] target/ppc: change struct PPC_DFP decimal storage from uint64[2] to ppc_vsr_t, Mark Cave-Ayland, 2019/09/24
- Re: [PATCH 0/7] target/ppc: DFP fixes and improvements, Paul Clarke, 2019/09/24