On 3/3/19 9:23 AM, Mark Cave-Ayland wrote: > All TCG vector operations require pointers to the base address of the vector > rather than separate access to the top and bottom 64-bits. Convert > the VMX TCG instructions to use a new avr_offset() function instead of > avr64_offset(), which can itself be written as a simple wrapper onto > vsr_full_offset(). > > After the conversion is complete then avr64_offset() can be removed since its > functionality is now completely within get_avr64()/set_avr64(). > > Signed-off-by: Mark Cave-Ayland <mark.cave-ayl...@ilande.co.uk> > --- > target/ppc/cpu.h | 12 +++++++++++- > target/ppc/translate/vmx-impl.inc.c | 27 +++++++++++---------------- > target/ppc/translate/vsx-impl.inc.c | 5 ----- > 3 files changed, 22 insertions(+), 22 deletions(-) > > diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h > index 326593e0e7..89651988ab 100644 > --- a/target/ppc/cpu.h > +++ b/target/ppc/cpu.h > @@ -2598,6 +2598,11 @@ static inline int vsrl_offset(int i) > return offsetof(CPUPPCState, vsr[i].u64[1]); > } > > +static inline int vsr_full_offset(int i) > +{ > + return offsetof(CPUPPCState, vsr[i].u64[0]); > +} > + > static inline uint64_t *cpu_vsrl_ptr(CPUPPCState *env, int i) > { > return (uint64_t *)((uintptr_t)env + vsrl_offset(i)); > @@ -2613,9 +2618,14 @@ static inline int avrl_offset(int i) > return offsetof(CPUPPCState, vsr[32 + i].VsrD(1)); > } > > +static inline int avr_offset(int i) > +{ > + return vsr_full_offset(i + 32); > +}
avr_full_offset? r~