[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 36/67] target/arm: Introduce gen_gvec_cls, gen_gvec_clz
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH 36/67] target/arm: Introduce gen_gvec_cls, gen_gvec_clz |
Date: |
Mon, 2 Dec 2024 17:29:14 +0100 |
User-agent: |
Mozilla Thunderbird |
On 1/12/24 16:05, Richard Henderson wrote:
Add gvec interfaces for CLS and CLZ operations.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/arm/tcg/translate.h | 5 +++++
target/arm/tcg/gengvec.c | 35 +++++++++++++++++++++++++++++++++
target/arm/tcg/translate-a64.c | 29 +++++++--------------------
target/arm/tcg/translate-neon.c | 29 ++-------------------------
4 files changed, 49 insertions(+), 49 deletions(-)
+void gen_gvec_cls(unsigned vece, uint32_t rd_ofs, uint32_t rn_ofs,
+ uint32_t opr_sz, uint32_t max_sz)
+{
+ static const GVecGen2 g[] = {
+ { .fni4 = gen_helper_neon_cls_s8,
+ .vece = MO_8 },
+ { .fni4 = gen_helper_neon_cls_s16,
+ .vece = MO_16 },
+ { .fni4 = tcg_gen_clrsb_i32,
Why do we have tcg_gen_clrsb_i32(), ...
+ .vece = MO_32 },
+ };
+ assert(vece <= MO_32);
+ tcg_gen_gvec_2(rd_ofs, rn_ofs, opr_sz, max_sz, &g[vece]);
+}
+
+static void gen_clz32_i32(TCGv_i32 d, TCGv_i32 n)
... but not tcg_gen_clz32_i32()?
+{
+ tcg_gen_clzi_i32(d, n, 32);
+}
Anyhow,
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
- [PATCH 35/67] target/arm: Convert ABS, NEG to decodetree, (continued)
- [PATCH 35/67] target/arm: Convert ABS, NEG to decodetree, Richard Henderson, 2024/12/01
- [PATCH 38/67] target/arm: Introduce gen_gvec_cnt, gen_gvec_rbit, Richard Henderson, 2024/12/01
- [PATCH 39/67] target/arm: Convert CNT, NOT, RBIT (vector) to decodetree, Richard Henderson, 2024/12/01
- [PATCH 37/67] target/arm: Convert CLS, CLZ (vector) to decodetree, Richard Henderson, 2024/12/01
- [PATCH 36/67] target/arm: Introduce gen_gvec_cls, gen_gvec_clz, Richard Henderson, 2024/12/01
- Re: [PATCH 36/67] target/arm: Introduce gen_gvec_cls, gen_gvec_clz,
Philippe Mathieu-Daudé <=
- [PATCH 41/67] target/arm: Introduce gen_gvec_rev{16,32,64}, Richard Henderson, 2024/12/01
- [PATCH 43/67] target/arm: Move helper_neon_addlp_{s8, s16} to neon_helper.c, Richard Henderson, 2024/12/01
- [PATCH 40/67] target/arm: Convert CMGT, CMGE, GMLT, GMLE, CMEQ (zero) to decodetree, Richard Henderson, 2024/12/01
- [PATCH 57/67] target/arm: Convert [US]CVTF (vector, integer) scalar to decodetree, Richard Henderson, 2024/12/01
- [PATCH 44/67] target/arm: Introduce gen_gvec_{s,u}{add,ada}lp, Richard Henderson, 2024/12/01