[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [PATCH 19/70] target/hexagon/idef-parser: Use gen_constant for gen_e
From: |
Taylor Simpson |
Subject: |
RE: [PATCH 19/70] target/hexagon/idef-parser: Use gen_constant for gen_extend_tcg_width_op |
Date: |
Mon, 27 Feb 2023 22:38:53 +0000 |
> -----Original Message-----
> From: Richard Henderson <richard.henderson@linaro.org>
> Sent: Monday, February 27, 2023 3:01 PM
> To: Taylor Simpson <tsimpson@quicinc.com>; qemu-devel@nongnu.org
> Cc: qemu-arm@nongnu.org; qemu-ppc@nongnu.org; qemu-
> riscv@nongnu.org; qemu-s390x@nongnu.org; jcmvbkbc@gmail.com;
> kbastian@mail.uni-paderborn.de; ysato@users.sourceforge.jp;
> gaosong@loongson.cn; jiaxun.yang@flygoat.com; ale@rev.ng;
> mrolnik@gmail.com; edgar.iglesias@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 <tsimpson@quicinc.com>
- [PATCH 16/70] target/hexagon/idef-parser: Use gen_tmp for LPCFG, (continued)
- [PATCH 16/70] target/hexagon/idef-parser: Use gen_tmp for LPCFG, Richard Henderson, 2023/02/27
- [PATCH 17/70] target/hexagon/idef-parser: Use gen_tmp for gen_pred_assign, Richard Henderson, 2023/02/27
- [PATCH 18/70] target/hexagon/idef-parser: Use gen_tmp for gen_rvalue_pred, Richard Henderson, 2023/02/27
- [PATCH 20/70] target/hppa: Avoid tcg_const_i64 in trans_fid_f, Richard Henderson, 2023/02/27
- [PATCH 19/70] target/hexagon/idef-parser: Use gen_constant for gen_extend_tcg_width_op, Richard Henderson, 2023/02/27
- [PATCH 21/70] target/hppa: Avoid use of tcg_const_i32 throughout, Richard Henderson, 2023/02/27
- [PATCH 22/70] target/i386: Simplify POPF, Richard Henderson, 2023/02/27
- [PATCH 25/70] target/m68k: Use tcg_constant_i32 in gen_ea_mode, Richard Henderson, 2023/02/27
- [PATCH 23/70] target/i386: Avoid use of tcg_const_* throughout, Richard Henderson, 2023/02/27
- [PATCH 24/70] target/m68k: Reject immediate as destination in gen_ea_mode, Richard Henderson, 2023/02/27
- [PATCH 26/70] target/m68k: Avoid tcg_const_i32 when modified, Richard Henderson, 2023/02/27
- [PATCH 27/70] target/m68k: Avoid tcg_const_i32 in bfop_reg, Richard Henderson, 2023/02/27
- [PATCH 30/70] target/mips: Split out gen_lxl, Richard Henderson, 2023/02/27
- [PATCH 28/70] target/m68k: Avoid tcg_const_* throughout, Richard Henderson, 2023/02/27