On 8/30/23 01:48, Song Gao wrote:
This patch includes:
- XVBITCLR[I].{B/H/W/D};
- XVBITSET[I].{B/H/W/D};
- XVBITREV[I].{B/H/W/D}.
Signed-off-by: Song Gao<gaos...@loongson.cn>
---
target/loongarch/vec.h | 4 ++
target/loongarch/insns.decode | 27 +++++++++++
target/loongarch/disas.c | 25 ++++++++++
target/loongarch/vec_helper.c | 48 ++++++++++----------
target/loongarch/insn_trans/trans_lasx.c.inc | 27 +++++++++++
5 files changed, 106 insertions(+), 25 deletions(-)
diff --git a/target/loongarch/vec.h b/target/loongarch/vec.h
index 4497cd4a6d..aae70f9de9 100644
--- a/target/loongarch/vec.h
+++ b/target/loongarch/vec.h
@@ -85,4 +85,8 @@
#define DO_CLZ_W(N) (clz32(N))
#define DO_CLZ_D(N) (clz64(N))
+#define DO_BITCLR(a, bit) (a & ~(1ull << bit))
+#define DO_BITSET(a, bit) (a | 1ull << bit)
+#define DO_BITREV(a, bit) (a ^ (1ull << bit))
+
Aside from this movement,
Reviewed-by: Richard Henderson <richard.hender...@linaro.org>
r~