[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 12/22] target/arm/tcg: Move neon_tbl() from op_helper.c to neon_h
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 12/22] target/arm/tcg: Move neon_tbl() from op_helper.c to neon_helper.c |
Date: |
Fri, 9 Jun 2023 12:47:07 +0200 |
neon_tbl() helper is only called by NEON files. No need
to have it in the generic op_helper.c, move it with the
rest of the NEON helpers.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
target/arm/tcg/neon_helper.c | 22 ++++++++++++++++++++++
target/arm/tcg/op_helper.c | 22 ----------------------
2 files changed, 22 insertions(+), 22 deletions(-)
diff --git a/target/arm/tcg/neon_helper.c b/target/arm/tcg/neon_helper.c
index bc6c4a54e9..0a4ab3e42c 100644
--- a/target/arm/tcg/neon_helper.c
+++ b/target/arm/tcg/neon_helper.c
@@ -1738,3 +1738,25 @@ void HELPER(neon_zip16)(void *vd, void *vm)
rm[0] = m0;
rd[0] = d0;
}
+
+uint64_t HELPER(neon_tbl)(CPUARMState *env, uint32_t desc,
+ uint64_t ireg, uint64_t def)
+{
+ uint64_t tmp, val = 0;
+ uint32_t maxindex = ((desc & 3) + 1) * 8;
+ uint32_t base_reg = desc >> 2;
+ uint32_t shift, index, reg;
+
+ for (shift = 0; shift < 64; shift += 8) {
+ index = (ireg >> shift) & 0xff;
+ if (index < maxindex) {
+ reg = base_reg + (index >> 3);
+ tmp = *aa32_vfp_dreg(env, reg);
+ tmp = ((tmp >> ((index & 7) << 3)) & 0xff) << shift;
+ } else {
+ tmp = def & (0xffull << shift);
+ }
+ val |= tmp;
+ }
+ return val;
+}
diff --git a/target/arm/tcg/op_helper.c b/target/arm/tcg/op_helper.c
index 3baf8004f6..70a9c37b74 100644
--- a/target/arm/tcg/op_helper.c
+++ b/target/arm/tcg/op_helper.c
@@ -82,28 +82,6 @@ void raise_exception_ra(CPUARMState *env, uint32_t excp,
uint32_t syndrome,
raise_exception(env, excp, syndrome, target_el);
}
-uint64_t HELPER(neon_tbl)(CPUARMState *env, uint32_t desc,
- uint64_t ireg, uint64_t def)
-{
- uint64_t tmp, val = 0;
- uint32_t maxindex = ((desc & 3) + 1) * 8;
- uint32_t base_reg = desc >> 2;
- uint32_t shift, index, reg;
-
- for (shift = 0; shift < 64; shift += 8) {
- index = (ireg >> shift) & 0xff;
- if (index < maxindex) {
- reg = base_reg + (index >> 3);
- tmp = *aa32_vfp_dreg(env, reg);
- tmp = ((tmp >> ((index & 7) << 3)) & 0xff) << shift;
- } else {
- tmp = def & (0xffull << shift);
- }
- val |= tmp;
- }
- return val;
-}
-
void HELPER(v8m_stackcheck)(CPUARMState *env, uint32_t newvalue)
{
/*
--
2.38.1
- Re: [PATCH 06/22] target/arm/tcg: Fix iwmmxt-related code style, (continued)
- [PATCH 07/22] target/arm/tcg: Expose some iwmmxt methods in 'translate.h', Philippe Mathieu-Daudé, 2023/06/09
- [PATCH 09/22] target/arm/tcg: Reduce 'helper-iwmmxt.h.inc' inclusion, Philippe Mathieu-Daudé, 2023/06/09
- [PATCH 10/22] target/arm/tcg: Extract VFP definitions to 'helper-vfp.h.inc', Philippe Mathieu-Daudé, 2023/06/09
- [PATCH 11/22] target/arm/tcg: Reduce 'helper-vfp.h.inc' inclusion, Philippe Mathieu-Daudé, 2023/06/09
- [PATCH 12/22] target/arm/tcg: Move neon_tbl() from op_helper.c to neon_helper.c,
Philippe Mathieu-Daudé <=
- [PATCH 13/22] target/arm/tcg: Extract NEON definitions to 'helper-neon.h.inc', Philippe Mathieu-Daudé, 2023/06/09
- [PATCH 14/22] target/arm/tcg: Reduce 'helper-neon.h.inc' inclusion, Philippe Mathieu-Daudé, 2023/06/09
- [PATCH 15/22] target/arm/tcg: Extract SVE2 definitions to 'helper-sve.h.inc', Philippe Mathieu-Daudé, 2023/06/09
- [PATCH 16/22] target/arm/tcg: Reduce 'helper-sve.h.inc' inclusion, Philippe Mathieu-Daudé, 2023/06/09
- [PATCH 17/22] target/arm/tcg: Reduce 'helper-mve.h.inc' inclusion, Philippe Mathieu-Daudé, 2023/06/09
- [PATCH 18/22] target/arm/tcg: Define SME set_svcr() helper in common 'helper.h', Philippe Mathieu-Daudé, 2023/06/09