On 8/30/23 01:48, Song Gao wrote:
This patch includes:
- XVCLO.{B/H/W/D};
- XVCLZ.{B/H/W/D}.

Signed-off-by: Song Gao<gaos...@loongson.cn>
---
  target/loongarch/vec.h                       |  9 +++++++++
  target/loongarch/insns.decode                |  9 +++++++++
  target/loongarch/disas.c                     |  9 +++++++++
  target/loongarch/vec_helper.c                | 13 ++-----------
  target/loongarch/insn_trans/trans_lasx.c.inc |  9 +++++++++
  5 files changed, 38 insertions(+), 11 deletions(-)

diff --git a/target/loongarch/vec.h b/target/loongarch/vec.h
index 67d829f9da..4497cd4a6d 100644
--- a/target/loongarch/vec.h
+++ b/target/loongarch/vec.h
@@ -76,4 +76,13 @@
#define R_SHIFT(a, b) (a >> b) +#define DO_CLO_B(N) (clz32(~N & 0xff) - 24)
+#define DO_CLO_H(N)  (clz32(~N & 0xffff) - 16)
+#define DO_CLO_W(N)  (clz32(~N))
+#define DO_CLO_D(N)  (clz64(~N))
+#define DO_CLZ_B(N)  (clz32(N) - 24)
+#define DO_CLZ_H(N)  (clz32(N) - 16)
+#define DO_CLZ_W(N)  (clz32(N))
+#define DO_CLZ_D(N)  (clz64(N))
+

Aside from this movement,

Reviewed-by: Richard Henderson <richard.hender...@linaro.org>


r~

Reply via email to