Hi Kito,

Thanks for review. This is because the P extension includes pseudo-instructions for |pack|,

while the trans function for |pack|checks for a dependency on |zbkb|.

Perhaps the dependency check in the |pack|function should first be adjusted to depend on either |zbkb|or |zbb|.

static bool trans_pack(DisasContext *ctx, arg_pack *a)
{
    REQUIRE_ZBKB(ctx);
    return gen_arith(ctx, a, EXT_NONE, gen_pack, NULL);
}

Best regards,
Molly

在 2026/5/7 15:43, Kito Cheng 写道:
Hi Molly:

+    if (riscv_has_ext(env, RVP) &&
+        !(cpu->cfg.ext_zba && cpu->cfg.ext_zbb && cpu->cfg.ext_zbkb)) {
+        error_setg(errp, "P extension requires zba, zbb and zbkb extensions");
+        return;
+    }
+
zbkb should not in required extension according spec:

https://github.com/riscv/riscv-p-spec/blob/master/P-ext-proposal.adoc#p-extension-for-packed-single-instruction-multiple-data

Reply via email to