On 10/12/18 10:30 AM, Bastian Koppelmann wrote:
>  static bool trans_slliw(DisasContext *ctx, arg_slliw *a, uint32_t insn)
>  {
> -    gen_arith_imm(ctx, OPC_RISC_SLLIW, a->rd, a->rs1, a->shamt);
> +    TCGv source1;
> +    source1 = tcg_temp_new();
> +    gen_get_gpr(source1, a->rs1);
> +
> +    tcg_gen_shli_tl(source1, source1, a->shamt);
> +    tcg_gen_ext32s_tl(source1, source1);
> +    gen_set_gpr(a->rd, source1);
> +
> +    tcg_temp_free(source1);
>      return true;
>  }

Now missing the TARGET_RISCV64 check.

> +static bool trans_arith_imm(DisasContext *ctx, arg_arith_imm *a,
> +                            void(*func)(TCGv, TCGv, TCGv))

gen_arith_imm.


r~

Reply via email to