qemu-devel
[Top][All Lists]
Advanced

[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~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]