From d8e81e3c18231e4dbab562f53e3e6cf7ad77735f Mon Sep 17 00:00:00 2001 From: Weiwei Li Date: Sat, 23 Apr 2022 10:34:58 +0800 Subject: target/riscv: rvk: add support for zbkb extension - reuse partial instructions of zbb extension, update extension check for them - add brev8, pack, packh, packw, unzip, zip instructions Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Acked-by: Alistair Francis Reviewed-by: Richard Henderson Message-Id: <20220423023510.30794-3-liweiwei@iscas.ac.cn> Signed-off-by: Alistair Francis --- target/riscv/translate.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'target/riscv/translate.c') diff --git a/target/riscv/translate.c b/target/riscv/translate.c index 6495726302..121ead7cfe 100644 --- a/target/riscv/translate.c +++ b/target/riscv/translate.c @@ -688,6 +688,13 @@ EX_SH(12) } \ } while (0) +#define REQUIRE_EITHER_EXT(ctx, A, B) do { \ + if (!ctx->cfg_ptr->ext_##A && \ + !ctx->cfg_ptr->ext_##B) { \ + return false; \ + } \ +} while (0) + static int ex_rvc_register(DisasContext *ctx, int reg) { return 8 + reg; -- cgit v1.2.3-55-g7522