[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 07/89] target/riscv: redirect XVentanaCondOps to use the Zicond fu
|
From: |
Alistair Francis |
|
Subject: |
[PULL 07/89] target/riscv: redirect XVentanaCondOps to use the Zicond functions |
|
Date: |
Fri, 5 May 2023 11:01:19 +1000 |
From: Philipp Tomsich <philipp.tomsich@vrull.eu>
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>
---
MAINTAINERS | 2 +-
.../insn_trans/trans_xventanacondops.c.inc | 18 +++---------------
2 files changed, 4 insertions(+), 16 deletions(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index b22b85bc3a..431556c217 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -328,7 +328,7 @@ F: target/riscv/xthead*.decode
RISC-V XVentanaCondOps extension
M: Philipp Tomsich <philipp.tomsich@vrull.eu>
L: qemu-riscv@nongnu.org
-S: Supported
+S: Maintained
F: target/riscv/XVentanaCondOps.decode
F: target/riscv/insn_trans/trans_xventanacondops.c.inc
diff --git a/target/riscv/insn_trans/trans_xventanacondops.c.inc
b/target/riscv/insn_trans/trans_xventanacondops.c.inc
index 16849e6d4e..38c15f2825 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);
}
--
2.40.0
- [PULL 00/89] riscv-to-apply queue, Alistair Francis, 2023/05/04
- [PULL 01/89] target/riscv: Avoid env_archcpu() when reading RISCVCPUConfig, Alistair Francis, 2023/05/04
- [PULL 02/89] target/riscv: Fix priv version dependency for vector and zfh, Alistair Francis, 2023/05/04
- [PULL 03/89] target/riscv: Simplify getting RISCVCPU pointer from env, Alistair Francis, 2023/05/04
- [PULL 04/89] target/riscv: Simplify type conversion for CPURISCVState, Alistair Francis, 2023/05/04
- [PULL 05/89] target/riscv: Simplify arguments for riscv_csrrw_check, Alistair Francis, 2023/05/04
- [PULL 06/89] target/riscv: refactor Zicond support, Alistair Francis, 2023/05/04
- [PULL 07/89] target/riscv: redirect XVentanaCondOps to use the Zicond functions,
Alistair Francis <=
- [PULL 08/89] target/riscv: fix invalid riscv, event-to-mhpmcounters entry, Alistair Francis, 2023/05/04
- [PULL 09/89] target/riscv: add cfg properties for Zc* extension, Alistair Francis, 2023/05/04
- [PULL 10/89] target/riscv: add support for Zca extension, Alistair Francis, 2023/05/04
- [PULL 11/89] target/riscv: add support for Zcf extension, Alistair Francis, 2023/05/04
- [PULL 12/89] target/riscv: add support for Zcd extension, Alistair Francis, 2023/05/04
- [PULL 13/89] target/riscv: add support for Zcb extension, Alistair Francis, 2023/05/04
- [PULL 14/89] target/riscv: add support for Zcmp extension, Alistair Francis, 2023/05/04
- [PULL 15/89] target/riscv: add support for Zcmt extension, Alistair Francis, 2023/05/04
- [PULL 16/89] target/riscv: expose properties for Zc* extension, Alistair Francis, 2023/05/04
- [PULL 17/89] disas/riscv.c: add disasm support for Zc*, Alistair Francis, 2023/05/04