[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC 09/10] target/riscv: rvb: fixed an issue about clzw instruction
From: |
Eric Tang |
Subject: |
[RFC 09/10] target/riscv: rvb: fixed an issue about clzw instruction |
Date: |
Sat, 18 Sep 2021 14:28:15 +0800 |
Signed-off-by: Eric Tang <tangxingxin1008@gmail.com>
diff --git a/target/riscv/insn_trans/trans_rvb.c.inc
b/target/riscv/insn_trans/trans_rvb.c.inc
index 39ca5a573f..4523a5cd4c 100644
--- a/target/riscv/insn_trans/trans_rvb.c.inc
+++ b/target/riscv/insn_trans/trans_rvb.c.inc
@@ -456,7 +456,7 @@ GEN_TRANS_SHADD(3)
static void gen_clzw(TCGv ret, TCGv arg1)
{
- tcg_gen_clzi_tl(ret, ret, 64);
+ tcg_gen_clzi_tl(ret, arg1, 64);
tcg_gen_subi_tl(ret, ret, 32);
}
@@ -464,6 +464,7 @@ static bool trans_clzw(DisasContext *ctx, arg_clzw *a)
{
REQUIRE_64BIT(ctx);
REQUIRE_EXT(ctx, RVB);
+ ctx->w = true;
return gen_unary(ctx, a, EXT_ZERO, gen_clzw);
}
--
2.17.1
- [RFC 00/10] add the rest of riscv bitmapip-0.93 instructions, Eric Tang, 2021/09/18
- [RFC 01/10] target/riscv: rvb: fixed an error about srow/sroiw instructions, Eric Tang, 2021/09/18
- [RFC 02/10] target/riscv: rvb: add carry-less multiply instructions, Eric Tang, 2021/09/18
- [RFC 03/10] target/riscv: rvb: add cmix/cmov instructions, Eric Tang, 2021/09/18
- [RFC 04/10] target/riscv: rvb: add generalized shuffle instructions, Eric Tang, 2021/09/18
- [RFC 05/10] target/riscv: rvb: add crossbar permutation instructions, Eric Tang, 2021/09/18
- [RFC 06/10] target/riscv: rvb: add bfp/bfpw instructions, Eric Tang, 2021/09/18
- [RFC 07/10] target/riscv: rvb: add CRC instructions, Eric Tang, 2021/09/18
- [RFC 08/10] target/riscv: rvb: add bit-matrix instructions, Eric Tang, 2021/09/18
- [RFC 09/10] target/riscv: rvb: fixed an issue about clzw instruction,
Eric Tang <=
- [RFC 10/10] target/riscv: rvb: add funnel shfit instructions, Eric Tang, 2021/09/18
- Re: [RFC 00/10] add the rest of riscv bitmapip-0.93 instructions, Alistair Francis, 2021/09/24