mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
target/riscv: add support for Zcd extension
Separate c_fld/c_fsd from fld/fsd to add additional check for c.fld{sp}/c.fsd{sp} which is useful for zcmp/zcmt to reuse their encodings. Signed-off-by: Weiwei Li <liweiwei@iscas.ac.cn> Signed-off-by: Junqiang Wang <wangjunqiang@iscas.ac.cn> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-Id: <20230307081403.61950-5-liweiwei@iscas.ac.cn> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
This commit is contained in:
parent
30b0357902
commit
c4935b5842
2 changed files with 22 additions and 4 deletions
|
@ -31,6 +31,12 @@
|
|||
} \
|
||||
} while (0)
|
||||
|
||||
#define REQUIRE_ZCD(ctx) do { \
|
||||
if (!ctx->cfg_ptr->ext_zcd) { \
|
||||
return false; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
static bool trans_fld(DisasContext *ctx, arg_fld *a)
|
||||
{
|
||||
TCGv addr;
|
||||
|
@ -59,6 +65,18 @@ static bool trans_fsd(DisasContext *ctx, arg_fsd *a)
|
|||
return true;
|
||||
}
|
||||
|
||||
static bool trans_c_fld(DisasContext *ctx, arg_fld *a)
|
||||
{
|
||||
REQUIRE_ZCD(ctx);
|
||||
return trans_fld(ctx, a);
|
||||
}
|
||||
|
||||
static bool trans_c_fsd(DisasContext *ctx, arg_fsd *a)
|
||||
{
|
||||
REQUIRE_ZCD(ctx);
|
||||
return trans_fsd(ctx, a);
|
||||
}
|
||||
|
||||
static bool trans_fmadd_d(DisasContext *ctx, arg_fmadd_d *a)
|
||||
{
|
||||
REQUIRE_FPU;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue