mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 17:23:56 -06:00
target/riscv: add support for Zcf extension
Separate c_flw/c_fsw from flw/fsw to add check for Zcf extension. 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-4-liweiwei@iscas.ac.cn> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
This commit is contained in:
parent
b17dd74a54
commit
30b0357902
2 changed files with 22 additions and 4 deletions
|
@ -30,6 +30,12 @@
|
|||
} \
|
||||
} while (0)
|
||||
|
||||
#define REQUIRE_ZCF(ctx) do { \
|
||||
if (!ctx->cfg_ptr->ext_zcf) { \
|
||||
return false; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
static bool trans_flw(DisasContext *ctx, arg_flw *a)
|
||||
{
|
||||
TCGv_i64 dest;
|
||||
|
@ -61,6 +67,18 @@ static bool trans_fsw(DisasContext *ctx, arg_fsw *a)
|
|||
return true;
|
||||
}
|
||||
|
||||
static bool trans_c_flw(DisasContext *ctx, arg_flw *a)
|
||||
{
|
||||
REQUIRE_ZCF(ctx);
|
||||
return trans_flw(ctx, a);
|
||||
}
|
||||
|
||||
static bool trans_c_fsw(DisasContext *ctx, arg_fsw *a)
|
||||
{
|
||||
REQUIRE_ZCF(ctx);
|
||||
return trans_fsw(ctx, a);
|
||||
}
|
||||
|
||||
static bool trans_fmadd_s(DisasContext *ctx, arg_fmadd_s *a)
|
||||
{
|
||||
REQUIRE_FPU;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue