qemu-riscv
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-riscv] [PATCH v5 24/35] target/riscv: Move gen_arith_imm() dec


From: Richard Henderson
Subject: Re: [Qemu-riscv] [PATCH v5 24/35] target/riscv: Move gen_arith_imm() decoding into trans_* functions
Date: Tue, 22 Jan 2019 13:36:20 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0

On 1/22/19 1:28 AM, Bastian Koppelmann wrote:
> gen_arith_imm() does a lot of decoding manually, which was hard to read
> in case of the shift instructions and is not necessary anymore with
> decodetree.
> 
> Signed-off-by: Bastian Koppelmann <address@hidden>
> Signed-off-by: Peer Adelt <address@hidden>

Reviewed-by: Richard Henderson <address@hidden>

> +    if (a->shamt >= TARGET_LONG_BITS) {
> +            return false;
> +    }

Watch the funky indentation.

> +    if (a->rd != 0) {
> +        TCGv t = tcg_temp_new();
> +        gen_get_gpr(t, a->rs1);
> +
> +           tcg_gen_sari_tl(t, t, a->shamt);
> +        gen_set_gpr(a->rd, t);

Likewise.


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]