diff options
| author | Mark Cave-Ayland | 2019-01-02 10:14:21 +0100 |
|---|---|---|
| committer | David Gibson | 2019-01-08 23:28:14 +0100 |
| commit | 05ee3e8aa0c0178e98c9a05755359e382f56ce87 (patch) | |
| tree | a5fae6f659b598758d051f259b0673c5b436328b /target/ppc/cpu.h | |
| parent | target/ppc: switch FPR, VMX and VSX helpers to access data directly from cpu_env (diff) | |
| download | qemu-05ee3e8aa0c0178e98c9a05755359e382f56ce87.tar.gz qemu-05ee3e8aa0c0178e98c9a05755359e382f56ce87.tar.xz qemu-05ee3e8aa0c0178e98c9a05755359e382f56ce87.zip | |
target/ppc: merge ppc_vsr_t and ppc_avr_t union types
Since the VSX registers are actually a superset of the VMX registers then they
can be represented by the same type. Merge ppc_avr_t into ppc_vsr_t and change
ppc_avr_t to be a simple typedef alias.
Note that due to a difference in the naming of the float32 member between
ppc_avr_t and ppc_vsr_t, references to the ppc_avr_t f member must be replaced
with f32 instead.
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>
Diffstat (limited to 'target/ppc/cpu.h')
| -rw-r--r-- | target/ppc/cpu.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h index d5f99f1fc7..578641ac20 100644 --- a/target/ppc/cpu.h +++ b/target/ppc/cpu.h @@ -218,7 +218,6 @@ typedef struct opc_handler_t opc_handler_t; /* Types used to describe some PowerPC registers etc. */ typedef struct DisasContext DisasContext; typedef struct ppc_spr_t ppc_spr_t; -typedef union ppc_avr_t ppc_avr_t; typedef union ppc_tlb_t ppc_tlb_t; typedef struct ppc_hash_pte64 ppc_hash_pte64_t; @@ -242,22 +241,26 @@ struct ppc_spr_t { #endif }; -/* Altivec registers (128 bits) */ -union ppc_avr_t { - float32 f[4]; +/* VSX/Altivec registers (128 bits) */ +typedef union _ppc_vsr_t { uint8_t u8[16]; uint16_t u16[8]; uint32_t u32[4]; + uint64_t u64[2]; int8_t s8[16]; int16_t s16[8]; int32_t s32[4]; - uint64_t u64[2]; int64_t s64[2]; + float32 f32[4]; + float64 f64[2]; + float128 f128; #ifdef CONFIG_INT128 __uint128_t u128; #endif - Int128 s128; -}; + Int128 s128; +} ppc_vsr_t; + +typedef ppc_vsr_t ppc_avr_t; #if !defined(CONFIG_USER_ONLY) /* Software TLB cache */ |
