|
From: | Richard Henderson |
Subject: | Re: [PATCH v3 4/6] target/riscv: add support for zdinx |
Date: | Fri, 7 Jan 2022 12:54:42 -0800 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 |
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); etc. Otherwise, Reviewed-by: Richard Henderson <richard.henderson@linaro.org> r~
[Prev in Thread] | Current Thread | [Next in Thread] |