aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSirshak Das <sirshak.das@arm.com>2018-08-22 12:02:04 +0800
committerDamjan Marion <dmarion@me.com>2018-09-11 08:40:46 +0000
commit6da42decd4e0d1ef978af9ea8f3850da375a45b1 (patch)
treec14b5edf6db0508d204a6925479d06e296484b94
parent8e5d5db24ed72da265cda75bb3f23d35530109e8 (diff)
Replacing vtbl NEON intrinsic with rev NEON intrinsic for byte_swap.
Using rev16 vector intrinsic to reverse byteorder in each word independently. Change-Id: I071c40780baffe0bda614ec5d9dd92858f574b0d Signed-off-by: Sirshak Das <sirshak.das@arm.com> Reviewed-by: Steve Capper <steve.capper@arm.com> Reviewed-by: Brian Brooks <brian.brooks@arm.com> Reviewed-by: Yi He <yi.he@arm.com> Verified-by: Lijian Zhang <lijian.zhang@arm.com>
-rw-r--r--src/vppinfra/vector_neon.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/vppinfra/vector_neon.h b/src/vppinfra/vector_neon.h
index 2c3578c1f35..40e062eb94b 100644
--- a/src/vppinfra/vector_neon.h
+++ b/src/vppinfra/vector_neon.h
@@ -121,11 +121,7 @@ foreach_neon_vec128i foreach_neon_vec128u
static_always_inline u16x8
u16x8_byte_swap (u16x8 v)
{
- const u8 swap_pattern[] = {
- 1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14,
- };
- u8x16 swap = vld1q_u8 (swap_pattern);
- return (u16x8) vqtbl1q_u8 ((u8x16) v, swap);
+ return (u16x8) vrev16q_u8 ((u8x16) v);
}
static_always_inline u8x16