mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 01:33:56 -06:00
target/ppc: update {get,set}_dfp{64,128}() helper functions to read/write DFP numbers correctly
Since commitef96e3ae96
"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 <mark.cave-ayland@ilande.co.uk> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20190926185801.11176-4-mark.cave-ayland@ilande.co.uk> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
33432d7737
commit
d9acba3130
3 changed files with 44 additions and 39 deletions
|
@ -686,7 +686,7 @@ DEF_HELPER_3(store_601_batu, void, env, i32, tl)
|
|||
#endif
|
||||
|
||||
#define dh_alias_fprp ptr
|
||||
#define dh_ctype_fprp uint64_t *
|
||||
#define dh_ctype_fprp ppc_fprp_t *
|
||||
#define dh_is_signed_fprp dh_is_signed_ptr
|
||||
|
||||
DEF_HELPER_4(dadd, void, env, fprp, fprp, fprp)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue