> -----Original Message----- > From: Anton Johansson <a...@rev.ng> > Sent: Friday, December 17, 2021 2:01 AM > To: qemu-devel@nongnu.org > Cc: a...@rev.ng; Taylor Simpson <tsimp...@quicinc.com>; Brian Cain > <bc...@quicinc.com>; bab...@rev.ng; ni...@rev.ng; > richard.hender...@linaro.org > Subject: [PATCH v7 05/13] target/hexagon: introduce new helper functions > > From: Niccolò Izzo <ni...@rev.ng> > > These helpers will be employed by the idef-parser generated code. > "Helper" can here mean two things, a helper in the QEMU sense added to > `helper.h` and `op_helper.c`, but also helper functions providing a manual > TCG implementation of a certain features. > > Signed-off-by: Alessandro Di Federico <a...@rev.ng> > Signed-off-by: Niccolò Izzo <ni...@rev.ng> > Signed-off-by: Anton Johansson <a...@rev.ng> > --- > target/hexagon/genptr.c | 166 > +++++++++++++++++++++++++++++++++++-- > target/hexagon/genptr.h | 16 +++- > target/hexagon/helper.h | 2 + > target/hexagon/macros.h | 9 ++ > target/hexagon/op_helper.c | 10 +++ > 5 files changed, 195 insertions(+), 8 deletions(-) > > diff --git a/target/hexagon/genptr.c b/target/hexagon/genptr.c index > ae798e921e..44a1ec9ccf 100644 > +void gen_satu_i64_ovfl(TCGv ovfl, TCGv_i64 dest, TCGv_i64 source, int > +width) { > + gen_sat_i64(dest, source, width);
Should be gen_satu_i64 (unsigned) > + TCGv_i64 ovfl_64 = tcg_temp_new_i64(); > + tcg_gen_setcond_i64(TCG_COND_NE, ovfl_64, dest, source); > + tcg_gen_trunc_i64_tl(ovfl, ovfl_64); > + tcg_temp_free_i64(ovfl_64); > +}