qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v5 06/21] target/loongarch: Add fixed point bit instruction t


From: Richard Henderson
Subject: Re: [PATCH v5 06/21] target/loongarch: Add fixed point bit instruction translation
Date: Tue, 14 Sep 2021 06:45:16 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0

On 9/14/21 6:00 AM, Song Gao wrote:
+static bool trans_bstrpick_w(DisasContext *ctx, arg_bstrpick_w *a)
+{
+    TCGv dest = gpr_dst(ctx, a->rd, EXT_NONE);
+    TCGv src1 = gpr_src(ctx, a->rj, EXT_NONE);
+
+    if ((a->lsbw > a->msbw) || (a->msbw > 31)) {

FWIW, the > 31 check is impossible, due to the 5-bit extract.

+static bool trans_bstrpick_d(DisasContext *ctx, arg_bstrpick_d *a)
+{
+    TCGv dest = gpr_dst(ctx, a->rd, EXT_NONE);
+    TCGv src1 = gpr_src(ctx, a->rj, EXT_NONE);
+
+    if ((a->lsbd > a->msbd) || (a->msbd > 63)) {

Similarly.

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


r~



reply via email to

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