On 3/12/20 7:58 AM, LIU Zhiwei wrote: > +static bool trans_vsetvl(DisasContext *ctx, arg_vsetvl * a) > +{ > + TCGv s1, s2, dst; > + s2 = tcg_temp_new(); > + dst = tcg_temp_new(); > + > + /* Using x0 as the rs1 register specifier, encodes an infinite AVL */ > + if (a->rs1 == 0) { > + /* As the mask is at least one bit, RV_VLEN_MAX is >= VLMAX */ > + s1 = tcg_const_tl(RV_VLEN_MAX); > + } else { > + s1 = tcg_temp_new(); > + gen_get_gpr(s1, a->rs1); > + } > + gen_get_gpr(s2, a->rs2); > + gen_helper_vsetvl(dst, cpu_env, s1, s2); > + gen_set_gpr(a->rd, dst); > + tcg_gen_movi_tl(cpu_pc, ctx->pc_succ_insn); > + exit_tb(ctx);
You can use lookup_and_goto_ptr here. But either way, Reviewed-by: Richard Henderson <richard.hender...@linaro.org> r~