qemu-riscv
[Top][All Lists]
Advanced

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

Re: [RFC v2 11/15] target/riscv: rvb: generalized reverse


From: Richard Henderson
Subject: Re: [RFC v2 11/15] target/riscv: rvb: generalized reverse
Date: Wed, 16 Dec 2020 10:52:28 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

On 12/15/20 8:01 PM, frank.chang@sifive.com wrote:
> +target_ulong HELPER(grevw)(target_ulong rs1, target_ulong rs2)
> +{
> +    return do_grev(rs1, rs2, 32);
> +}
> +
> +#endif
> +
> diff --git a/target/riscv/helper.h b/target/riscv/helper.h

Stray whitespace at the end of the file.
checkpatch or git should have complained about this.

> +static bool gen_grevi(DisasContext *ctx, arg_grevi *a)
> +{
> +    TCGv source1 = tcg_temp_new();
> +    TCGv source2;
> +
> +    gen_get_gpr(source1, a->rs1);
> +
> +    if (a->shamt == (TARGET_LONG_BITS - 8)) {
> +        /* rev8, byte swaps */
> +#ifdef TARGET_RISCV32
> +        tcg_gen_bswap32_tl(source1, source1);
> +#else
> +        tcg_gen_bswap64_tl(source1, source1);
> +#endif

I should add a tcg_gen_bswap_tl define so that this ifdef is not necessary.
For the to-do list...

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~



reply via email to

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