summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJerin Jacob <jerinj@marvell.com>2019-06-11 19:45:03 +0530
committerThomas Monjalon <thomas@monjalon.net>2019-06-12 00:07:13 +0900
commit557c5cbde374172c7140bc6a7cef2cc81e5a29dc (patch)
tree70250bf03e11922616cf6e966c347af26ecaa924
parent474b4c1d7cce54d2217d648058ff55d40a92ebd0 (diff)
downloaddpdk-next-eventdev-557c5cbde374172c7140bc6a7cef2cc81e5a29dc.zip
dpdk-next-eventdev-557c5cbde374172c7140bc6a7cef2cc81e5a29dc.tar.gz
dpdk-next-eventdev-557c5cbde374172c7140bc6a7cef2cc81e5a29dc.tar.xz
acl: fix build with some arm64 compiler
Some compilers reporting the following error, though the existing code doesn't have any uninitialized variable case. Just to make compiler happy, initialize the int32x4_t variable one shot using vdupq_n_s32. lib/librte_acl/acl_run_neon.h: In function 'search_neon_4' lib/librte_acl/acl_run_neon.h:230:12: error: 'input' may be used uninitialized in this function int32x4_t input; Fixes: 34fa6c27c156 ("acl: add NEON optimization for ARMv8") Cc: stable@dpdk.org Suggested-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com> Signed-off-by: Jerin Jacob <jerinj@marvell.com> Acked-by: Aaron Conole <aconole@redhat.com>
-rw-r--r--lib/librte_acl/acl_run_neon.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/librte_acl/acl_run_neon.h b/lib/librte_acl/acl_run_neon.h
index 01b9766..b3196cd 100644
--- a/lib/librte_acl/acl_run_neon.h
+++ b/lib/librte_acl/acl_run_neon.h
@@ -181,8 +181,8 @@ search_neon_8(const struct rte_acl_ctx *ctx, const uint8_t **data,
while (flows.started > 0) {
/* Gather 4 bytes of input data for each stream. */
- input0 = vsetq_lane_s32(GET_NEXT_4BYTES(parms, 0), input0, 0);
- input1 = vsetq_lane_s32(GET_NEXT_4BYTES(parms, 4), input1, 0);
+ input0 = vdupq_n_s32(GET_NEXT_4BYTES(parms, 0));
+ input1 = vdupq_n_s32(GET_NEXT_4BYTES(parms, 4));
input0 = vsetq_lane_s32(GET_NEXT_4BYTES(parms, 1), input0, 1);
input1 = vsetq_lane_s32(GET_NEXT_4BYTES(parms, 5), input1, 1);
@@ -242,7 +242,7 @@ search_neon_4(const struct rte_acl_ctx *ctx, const uint8_t **data,
while (flows.started > 0) {
/* Gather 4 bytes of input data for each stream. */
- input = vsetq_lane_s32(GET_NEXT_4BYTES(parms, 0), input, 0);
+ input = vdupq_n_s32(GET_NEXT_4BYTES(parms, 0));
input = vsetq_lane_s32(GET_NEXT_4BYTES(parms, 1), input, 1);
input = vsetq_lane_s32(GET_NEXT_4BYTES(parms, 2), input, 2);
input = vsetq_lane_s32(GET_NEXT_4BYTES(parms, 3), input, 3);