> -----Original Message----- > From: Richard Henderson <richard.hender...@linaro.org> > Sent: Monday, February 27, 2023 3:01 PM > To: Taylor Simpson <tsimp...@quicinc.com>; qemu-devel@nongnu.org > Cc: qemu-...@nongnu.org; qemu-...@nongnu.org; qemu- > ri...@nongnu.org; qemu-s3...@nongnu.org; jcmvb...@gmail.com; > kbast...@mail.uni-paderborn.de; ys...@users.sourceforge.jp; > gaos...@loongson.cn; jiaxun.y...@flygoat.com; a...@rev.ng; > mrol...@gmail.com; edgar.igles...@gmail.com > Subject: Re: [PATCH 19/70] target/hexagon/idef-parser: Use gen_constant > for gen_extend_tcg_width_op > > On 2/27/23 11:55, Taylor Simpson wrote: > >> - HexValue mask = gen_tmp_value(c, locp, mask_str, > >> - dst_width, UNSIGNED); > >> + HexValue mask = gen_constant(c, locp, "-1", dst_width, > >> + UNSIGNED); > >> OUT(c, locp, "tcg_gen_shr_i", &dst_width, "(", > >> - &mask, ", ", &mask, ", ", &shift, ");\n"); > >> + &res, ", ", &mask, ", ", &shift, ");\n"); > >> OUT(c, locp, "tcg_gen_and_i", &dst_width, "(", > >> - &res, ", ", value, ", ", &mask, ");\n"); > >> + &res, ", ", &res, ", ", value, ");\n"); > > > > What's the advantage of putting the result of the tcg_gen_shr into res > instead of mask? Is there something in TCG code generation that takes > advantage? > > With this patch, mask is read-only, so a write to it is illegal.
I see. Reviewed-by: Taylor Simpson <tsimp...@quicinc.com>