regex/mlx5: fix type of setup constants
[dpdk.git] / lib / librte_eal / x86 / include / rte_memcpy.h
index ba44c4a..79f381d 100644 (file)
 extern "C" {
 #endif
 
+#if defined(RTE_TOOLCHAIN_GCC) && (GCC_VERSION >= 100000)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wstringop-overflow"
+#endif
+
 /**
  * Copy bytes from one location to another. The locations must not overlap.
  *
@@ -40,7 +45,7 @@ extern "C" {
 static __rte_always_inline void *
 rte_memcpy(void *dst, const void *src, size_t n);
 
-#ifdef RTE_MACHINE_CPUFLAG_AVX512F
+#if defined __AVX512F__ && defined RTE_MEMCPY_AVX512
 
 #define ALIGNMENT_MASK 0x3F
 
@@ -281,7 +286,7 @@ COPY_BLOCK_128_BACK63:
        goto COPY_BLOCK_128_BACK63;
 }
 
-#elif defined RTE_MACHINE_CPUFLAG_AVX2
+#elif defined __AVX2__
 
 #define ALIGNMENT_MASK 0x1F
 
@@ -474,7 +479,7 @@ COPY_BLOCK_128_BACK31:
        goto COPY_BLOCK_128_BACK31;
 }
 
-#else /* RTE_MACHINE_CPUFLAG */
+#else /* __AVX512F__ */
 
 #define ALIGNMENT_MASK 0x0F
 
@@ -798,7 +803,7 @@ COPY_BLOCK_64_BACK15:
        goto COPY_BLOCK_64_BACK15;
 }
 
-#endif /* RTE_MACHINE_CPUFLAG */
+#endif /* __AVX512F__ */
 
 static __rte_always_inline void *
 rte_memcpy_aligned(void *dst, const void *src, size_t n)
@@ -869,6 +874,10 @@ rte_memcpy(void *dst, const void *src, size_t n)
                return rte_memcpy_generic(dst, src, n);
 }
 
+#if defined(RTE_TOOLCHAIN_GCC) && (GCC_VERSION >= 100000)
+#pragma GCC diagnostic pop
+#endif
+
 #ifdef __cplusplus
 }
 #endif