qemu-riscv
[Top][All Lists]
Advanced

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

Re: [PATCH v3 4/6] target/riscv: add support for zdinx


From: Weiwei Li
Subject: Re: [PATCH v3 4/6] target/riscv: add support for zdinx
Date: Sat, 8 Jan 2022 09:14:53 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0

在 2022/1/8 上午4:54, Richard Henderson 写道:
On 1/7/22 3:27 AM, Weiwei Li wrote:
+#define REQUIRE_EVEN(ctx, reg) do { \
+    if (ctx->ext_zdinx && (get_xl(ctx) == MXL_RV32) && \
+        (reg & 0x1)) { \
+        return false; \
+    } \
+} while (0)

Parenthesis around reg.

+    REQUIRE_EVEN(ctx, a->rd);
+    REQUIRE_EVEN(ctx, a->rs1);
+    REQUIRE_EVEN(ctx, a->rs2);
+    REQUIRE_EVEN(ctx, a->rs3);

I think these could all be combined:

    REQUIRE_EVEN(ctx, a->rd | a->rs1 | a->rs2 | a->rs3);
Yeah, That's true. I'll update this.

etc.

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


r~




reply via email to

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