aboutsummaryrefslogtreecommitdiffstats
path: root/src/vppinfra
diff options
context:
space:
mode:
authorBenoît Ganne <bganne@cisco.com>2020-04-24 10:44:40 +0200
committerDave Barach <openvpp@barachs.net>2020-04-27 14:20:52 +0000
commita66971f980187efd03a84d340b80a7d3cf39deac (patch)
tree2bd3df841d5f6842634eb8771f2c343b73a934af /src/vppinfra
parent9165e0365cc21575fd3e4a98be59317a839553f4 (diff)
vppinfra: selectively disable false-positive GCC-10 warnings
GCC-10 increase overflows-related warnings but is confused by SIMD operations. Type: fix Change-Id: Iafde754c2fbec60e2d0a328f295b1f5c156d8234 Signed-off-by: Benoît Ganne <bganne@cisco.com>
Diffstat (limited to 'src/vppinfra')
-rw-r--r--src/vppinfra/memcpy_avx2.h8
-rw-r--r--src/vppinfra/memcpy_avx512.h8
-rw-r--r--src/vppinfra/memcpy_sse3.h8
3 files changed, 24 insertions, 0 deletions
diff --git a/src/vppinfra/memcpy_avx2.h b/src/vppinfra/memcpy_avx2.h
index caff4f6afde..f3f0d3f1943 100644
--- a/src/vppinfra/memcpy_avx2.h
+++ b/src/vppinfra/memcpy_avx2.h
@@ -50,6 +50,11 @@
#include <stdint.h>
#include <x86intrin.h>
+#include <vppinfra/warnings.h>
+
+/* *INDENT-OFF* */
+WARN_OFF (stringop-overflow)
+/* *INDENT-ON* */
static inline void
clib_mov16 (u8 * dst, const u8 * src)
@@ -228,6 +233,9 @@ clib_memcpy_fast (void *dst, const void *src, size_t n)
goto COPY_BLOCK_128_BACK31;
}
+/* *INDENT-OFF* */
+WARN_ON (stringop-overflow)
+/* *INDENT-ON* */
#endif /* included_clib_memcpy_avx2_h */
diff --git a/src/vppinfra/memcpy_avx512.h b/src/vppinfra/memcpy_avx512.h
index 9032b5436a3..1444c271ff1 100644
--- a/src/vppinfra/memcpy_avx512.h
+++ b/src/vppinfra/memcpy_avx512.h
@@ -50,6 +50,11 @@
#include <stdint.h>
#include <x86intrin.h>
+#include <vppinfra/warnings.h>
+
+/* *INDENT-OFF* */
+WARN_OFF (stringop-overflow)
+/* *INDENT-ON* */
static inline void
clib_mov16 (u8 * dst, const u8 * src)
@@ -264,6 +269,9 @@ clib_memcpy_fast (void *dst, const void *src, size_t n)
goto COPY_BLOCK_128_BACK63;
}
+/* *INDENT-OFF* */
+WARN_ON (stringop-overflow)
+/* *INDENT-ON* */
#endif /* included_clib_memcpy_avx512_h */
diff --git a/src/vppinfra/memcpy_sse3.h b/src/vppinfra/memcpy_sse3.h
index 5346e913817..d9e4ac668e9 100644
--- a/src/vppinfra/memcpy_sse3.h
+++ b/src/vppinfra/memcpy_sse3.h
@@ -50,6 +50,11 @@
#include <stdint.h>
#include <x86intrin.h>
+#include <vppinfra/warnings.h>
+
+/* *INDENT-OFF* */
+WARN_OFF (stringop-overflow)
+/* *INDENT-ON* */
static inline void
clib_mov16 (u8 * dst, const u8 * src)
@@ -344,6 +349,9 @@ clib_memcpy_fast (void *dst, const void *src, size_t n)
goto COPY_BLOCK_64_BACK15;
}
+/* *INDENT-OFF* */
+WARN_ON (stringop-overflow)
+/* *INDENT-ON* */
#undef CLIB_MVUNALIGN_LEFT47_IMM
#undef CLIB_MVUNALIGN_LEFT47