qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v5 15/60] target/riscv: vector integer comparison instruction


From: Richard Henderson
Subject: Re: [PATCH v5 15/60] target/riscv: vector integer comparison instructions
Date: Fri, 13 Mar 2020 23:33:20 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1

On 3/12/20 7:58 AM, LIU Zhiwei wrote:
> +/* Vector Integer Comparison Instructions */
> +#define DO_MSEQ(N, M) ((N == M) ? 1 : 0)
> +#define DO_MSNE(N, M) ((N != M) ? 1 : 0)
> +#define DO_MSLTU(N, M) ((N < M) ? 1 : 0)
> +#define DO_MSLT(N, M) ((N < M) ? 1 : 0)
> +#define DO_MSLEU(N, M) ((N <= M) ? 1 : 0)
> +#define DO_MSLE(N, M) ((N <= M) ? 1 : 0)
> +#define DO_MSGTU(N, M) ((N > M) ? 1 : 0)
> +#define DO_MSGT(N, M) ((N > M) ? 1 : 0)

You can drop the ? 1 : 0.  You can drop the LT/LTU (etc) distinction, since
that comes from the type.

Otherwise,
Reviewed-by: Richard Henderson <address@hidden>


r~



reply via email to

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