Message ID | 20181218063911.2112-28-richard.henderson@linaro.org |
---|---|
State | Superseded |
Headers | show |
Series | tcg, target/ppc vector improvements | expand |
On Mon, Dec 17, 2018 at 10:39:04PM -0800, Richard Henderson wrote: > Not setting flush_to_zero from gdb_set_avr_reg was a bug. > > Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Acked-by: David Gibson <david@gibson.dropbear.id.au> > --- > target/ppc/translate_init.inc.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/target/ppc/translate_init.inc.c b/target/ppc/translate_init.inc.c > index b83097141c..292b1df700 100644 > --- a/target/ppc/translate_init.inc.c > +++ b/target/ppc/translate_init.inc.c > @@ -601,10 +601,9 @@ static void spr_write_excp_vector(DisasContext *ctx, int sprn, int gprn) > > static inline void vscr_init(CPUPPCState *env, uint32_t val) > { > - env->vscr = val; > /* Altivec always uses round-to-nearest */ > set_float_rounding_mode(float_round_nearest_even, &env->vec_status); > - set_flush_to_zero(vscr_nj, &env->vec_status); > + helper_mtvscr(env, val); > } > > #ifdef CONFIG_USER_ONLY > @@ -9556,7 +9555,7 @@ static int gdb_set_avr_reg(CPUPPCState *env, uint8_t *mem_buf, int n) > } > if (n == 32) { > ppc_maybe_bswap_register(env, mem_buf, 4); > - env->vscr = ldl_p(mem_buf); > + helper_mtvscr(env, ldl_p(mem_buf)); > return 4; > } > if (n == 33) { -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
diff --git a/target/ppc/translate_init.inc.c b/target/ppc/translate_init.inc.c index b83097141c..292b1df700 100644 --- a/target/ppc/translate_init.inc.c +++ b/target/ppc/translate_init.inc.c @@ -601,10 +601,9 @@ static void spr_write_excp_vector(DisasContext *ctx, int sprn, int gprn) static inline void vscr_init(CPUPPCState *env, uint32_t val) { - env->vscr = val; /* Altivec always uses round-to-nearest */ set_float_rounding_mode(float_round_nearest_even, &env->vec_status); - set_flush_to_zero(vscr_nj, &env->vec_status); + helper_mtvscr(env, val); } #ifdef CONFIG_USER_ONLY @@ -9556,7 +9555,7 @@ static int gdb_set_avr_reg(CPUPPCState *env, uint8_t *mem_buf, int n) } if (n == 32) { ppc_maybe_bswap_register(env, mem_buf, 4); - env->vscr = ldl_p(mem_buf); + helper_mtvscr(env, ldl_p(mem_buf)); return 4; } if (n == 33) {
Not setting flush_to_zero from gdb_set_avr_reg was a bug. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- target/ppc/translate_init.inc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) -- 2.17.2