aboutsummaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorPhilipp Tomsich <philipp.tomsich@vrull.eu>2023-03-07 19:07:08 +0100
committerAlistair Francis <alistair.francis@wdc.com>2023-05-05 10:49:50 +1000
commit4f2493146d783d71c5dc6e72452f80b86641ba7f (patch)
tree70f9544c0c0c310bcab8c25a8591cceb35efb7e4 /target
parent378e43fa722a501fbf94f81fa89a87a7a78dddcb (diff)
downloadqemu-4f2493146d783d71c5dc6e72452f80b86641ba7f.zip
qemu-4f2493146d783d71c5dc6e72452f80b86641ba7f.tar.gz
qemu-4f2493146d783d71c5dc6e72452f80b86641ba7f.tar.bz2
target/riscv: redirect XVentanaCondOps to use the Zicond functions
The Zicond standard extension implements the same instruction semantics as XVentanaCondOps, although using different mnemonics and opcodes. Point XVentanaCondOps to the (newly implemented) Zicond implementation to reduce the future maintenance burden. Also updating MAINTAINERS as trans_xventanacondops.c.inc. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Philipp Tomsich <philipp.tomsich@vrull.eu> Acked-by: Alistair Francis <alistair.francis@wdc.com> Message-Id: <20230307180708.302867-3-philipp.tomsich@vrull.eu> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'target')
-rw-r--r--target/riscv/insn_trans/trans_xventanacondops.c.inc18
1 files changed, 3 insertions, 15 deletions
diff --git a/target/riscv/insn_trans/trans_xventanacondops.c.inc b/target/riscv/insn_trans/trans_xventanacondops.c.inc
index 16849e6..38c15f2 100644
--- a/target/riscv/insn_trans/trans_xventanacondops.c.inc
+++ b/target/riscv/insn_trans/trans_xventanacondops.c.inc
@@ -1,7 +1,7 @@
/*
* RISC-V translation routines for the XVentanaCondOps extension.
*
- * Copyright (c) 2021-2022 VRULL GmbH.
+ * Copyright (c) 2021-2023 VRULL GmbH.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
@@ -16,24 +16,12 @@
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
-static bool gen_vt_condmask(DisasContext *ctx, arg_r *a, TCGCond cond)
-{
- TCGv dest = dest_gpr(ctx, a->rd);
- TCGv src1 = get_gpr(ctx, a->rs1, EXT_NONE);
- TCGv src2 = get_gpr(ctx, a->rs2, EXT_NONE);
-
- tcg_gen_movcond_tl(cond, dest, src2, ctx->zero, src1, ctx->zero);
-
- gen_set_gpr(ctx, a->rd, dest);
- return true;
-}
-
static bool trans_vt_maskc(DisasContext *ctx, arg_r *a)
{
- return gen_vt_condmask(ctx, a, TCG_COND_NE);
+ return gen_logic(ctx, a, gen_czero_eqz);
}
static bool trans_vt_maskcn(DisasContext *ctx, arg_r *a)
{
- return gen_vt_condmask(ctx, a, TCG_COND_EQ);
+ return gen_logic(ctx, a, gen_czero_nez);
}