Re: [RFC v3 08/16] target/riscv: add gen_shifti() and gen_shiftiw() helper functions

2021-01-11 Thread Frank Chang
On Tue, Jan 12, 2021 at 12:54 PM Richard Henderson < richard.hender...@linaro.org> wrote: > On 1/11/21 4:19 PM, frank.ch...@sifive.com wrote: > > static bool trans_slli(DisasContext *ctx, arg_slli *a) > > { > > -if (a->shamt >= TARGET_LONG_BITS) { > > -return false; > > -} > > -

Re: [RFC v3 08/16] target/riscv: add gen_shifti() and gen_shiftiw() helper functions

2021-01-11 Thread Richard Henderson
On 1/11/21 4:19 PM, frank.ch...@sifive.com wrote: > static bool trans_slli(DisasContext *ctx, arg_slli *a) > { > -if (a->shamt >= TARGET_LONG_BITS) { > -return false; > -} > - > if (a->rd != 0) { > -TCGv t = tcg_temp_new(); > -gen_get_gpr(t, a->rs1); > - > -

[RFC v3 08/16] target/riscv: add gen_shifti() and gen_shiftiw() helper functions

2021-01-11 Thread frank . chang
From: Frank Chang Add gen_shifti() and gen_shiftiw() helper functions to reuse the same interfaces for immediate shift instructions. Signed-off-by: Frank Chang --- target/riscv/insn_trans/trans_rvi.c.inc | 45 +++-- target/riscv/translate.c| 43