Message ID | 20230307183503.2512684-17-richard.henderson@linaro.org |
---|---|
State | Superseded |
Headers | show |
Series | tcg: Remove tcg_const_* | expand |
On 3/7/23 15:34, Richard Henderson wrote: > Initialize a new temp instead of tcg_const_*. > Fix a pasto in a comment. > > Signed-off-by: Richard Henderson <richard.henderson@linaro.org> > --- Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com> > Cc: Daniel Henrique Barboza <danielhb413@gmail.com> > Cc: Cédric Le Goater <clg@kaod.org> > Cc: David Gibson <david@gibson.dropbear.id.au> > Cc: Greg Kurz <groug@kaod.org> > Cc: qemu-ppc@nongnu.org > --- > target/ppc/translate/vsx-impl.c.inc | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > diff --git a/target/ppc/translate/vsx-impl.c.inc b/target/ppc/translate/vsx-impl.c.inc > index 6e63403727..9916784e64 100644 > --- a/target/ppc/translate/vsx-impl.c.inc > +++ b/target/ppc/translate/vsx-impl.c.inc > @@ -2449,7 +2449,8 @@ static void gen_xxeval_i64(TCGv_i64 t, TCGv_i64 a, TCGv_i64 b, TCGv_i64 c, > TCGv_i64 conj, disj; > > conj = tcg_temp_new_i64(); > - disj = tcg_const_i64(0); > + disj = tcg_temp_new_i64(); > + tcg_gen_movi_i64(disj, 0); > > /* Iterate over set bits from the least to the most significant bit */ > while (imm) { > @@ -2492,8 +2493,9 @@ static void gen_xxeval_vec(unsigned vece, TCGv_vec t, TCGv_vec a, TCGv_vec b, > int bit; > TCGv_vec disj, conj; > > - disj = tcg_const_zeros_vec_matching(t); > conj = tcg_temp_new_vec_matching(t); > + disj = tcg_temp_new_vec_matching(t); > + tcg_gen_dupi_vec(vece, disj, 0); > > /* Iterate over set bits from the least to the most significant bit */ > while (imm) { > @@ -2546,7 +2548,7 @@ static bool trans_XXEVAL(DisasContext *ctx, arg_8RR_XX4_imm *a) > > /* Equivalent functions that can be implemented with a single gen_gvec */ > switch (a->imm) { > - case 0b00000000: /* true */ > + case 0b00000000: /* false */ > set_cpu_vsr(a->xt, tcg_constant_i64(0), true); > set_cpu_vsr(a->xt, tcg_constant_i64(0), false); > break;
On 7/3/23 19:34, Richard Henderson wrote: > Initialize a new temp instead of tcg_const_*. > Fix a pasto in a comment. > > Signed-off-by: Richard Henderson <richard.henderson@linaro.org> > --- > Cc: Daniel Henrique Barboza <danielhb413@gmail.com> > Cc: Cédric Le Goater <clg@kaod.org> > Cc: David Gibson <david@gibson.dropbear.id.au> > Cc: Greg Kurz <groug@kaod.org> > Cc: qemu-ppc@nongnu.org > --- > target/ppc/translate/vsx-impl.c.inc | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
diff --git a/target/ppc/translate/vsx-impl.c.inc b/target/ppc/translate/vsx-impl.c.inc index 6e63403727..9916784e64 100644 --- a/target/ppc/translate/vsx-impl.c.inc +++ b/target/ppc/translate/vsx-impl.c.inc @@ -2449,7 +2449,8 @@ static void gen_xxeval_i64(TCGv_i64 t, TCGv_i64 a, TCGv_i64 b, TCGv_i64 c, TCGv_i64 conj, disj; conj = tcg_temp_new_i64(); - disj = tcg_const_i64(0); + disj = tcg_temp_new_i64(); + tcg_gen_movi_i64(disj, 0); /* Iterate over set bits from the least to the most significant bit */ while (imm) { @@ -2492,8 +2493,9 @@ static void gen_xxeval_vec(unsigned vece, TCGv_vec t, TCGv_vec a, TCGv_vec b, int bit; TCGv_vec disj, conj; - disj = tcg_const_zeros_vec_matching(t); conj = tcg_temp_new_vec_matching(t); + disj = tcg_temp_new_vec_matching(t); + tcg_gen_dupi_vec(vece, disj, 0); /* Iterate over set bits from the least to the most significant bit */ while (imm) { @@ -2546,7 +2548,7 @@ static bool trans_XXEVAL(DisasContext *ctx, arg_8RR_XX4_imm *a) /* Equivalent functions that can be implemented with a single gen_gvec */ switch (a->imm) { - case 0b00000000: /* true */ + case 0b00000000: /* false */ set_cpu_vsr(a->xt, tcg_constant_i64(0), true); set_cpu_vsr(a->xt, tcg_constant_i64(0), false); break;
Initialize a new temp instead of tcg_const_*. Fix a pasto in a comment. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- Cc: Daniel Henrique Barboza <danielhb413@gmail.com> Cc: Cédric Le Goater <clg@kaod.org> Cc: David Gibson <david@gibson.dropbear.id.au> Cc: Greg Kurz <groug@kaod.org> Cc: qemu-ppc@nongnu.org --- target/ppc/translate/vsx-impl.c.inc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)