mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
RISC-V: Adding XTheadBs ISA extension
This patch adds support for the XTheadBs ISA extension. The patch uses the T-Head specific decoder and translation. Co-developed-by: Philipp Tomsich <philipp.tomsich@vrull.eu> Co-developed-by: LIU Zhiwei <zhiwei_liu@linux.alibaba.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu> Message-Id: <20230131202013.2541053-6-christoph.muellner@vrull.eu> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
This commit is contained in:
parent
426c049196
commit
fa13458546
5 changed files with 23 additions and 1 deletions
|
@ -28,6 +28,12 @@
|
|||
} \
|
||||
} while (0)
|
||||
|
||||
#define REQUIRE_XTHEADBS(ctx) do { \
|
||||
if (!ctx->cfg_ptr->ext_xtheadbs) { \
|
||||
return false; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define REQUIRE_XTHEADCMO(ctx) do { \
|
||||
if (!ctx->cfg_ptr->ext_xtheadcmo) { \
|
||||
return false; \
|
||||
|
@ -191,6 +197,15 @@ static bool trans_th_tstnbz(DisasContext *ctx, arg_th_tstnbz *a)
|
|||
return gen_unary(ctx, a, EXT_ZERO, gen_th_tstnbz);
|
||||
}
|
||||
|
||||
/* XTheadBs */
|
||||
|
||||
/* th.tst is an alternate encoding for bexti (from Zbs) */
|
||||
static bool trans_th_tst(DisasContext *ctx, arg_th_tst *a)
|
||||
{
|
||||
REQUIRE_XTHEADBS(ctx);
|
||||
return gen_shift_imm_tl(ctx, a, EXT_NONE, gen_bext);
|
||||
}
|
||||
|
||||
/* XTheadCmo */
|
||||
|
||||
static inline int priv_level(DisasContext *ctx)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue