diff options
Diffstat (limited to 'target/ppc/cpu.h')
-rw-r--r-- | target/ppc/cpu.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h index eaf4297616..fb0f021bf4 100644 --- a/target/ppc/cpu.h +++ b/target/ppc/cpu.h @@ -2573,9 +2573,14 @@ static inline uint64_t *cpu_fpr_ptr(CPUPPCState *env, int i) return (uint64_t *)((uintptr_t)env + fpr_offset(i)); } +static inline int vsrl_offset(int i) +{ + return offsetof(CPUPPCState, vsr[i].u64[1]); +} + static inline uint64_t *cpu_vsrl_ptr(CPUPPCState *env, int i) { - return &env->vsr[i].u64[1]; + return (uint64_t *)((uintptr_t)env + vsrl_offset(i)); } static inline ppc_avr_t *cpu_avr_ptr(CPUPPCState *env, int i) |