[v2,1/2] eal: include header for MSVC SIMD intrinsics

Message ID 1711642446-6880-2-git-send-email-roretzla@linux.microsoft.com (mailing list archive)
State Accepted
Delegated to: Thomas Monjalon
Headers
Series stop using mmx intrinsics |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Tyler Retzlaff March 28, 2024, 4:14 p.m. UTC
  MSVC documents that you use the monolithic intrin.h for all intrinsics
(including SIMD intrinsics) include intrin.h into rte_vec.h when
building with MSVC so we don't have to duplicate conditionally compile
include it across the DPDK source.

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 lib/eal/include/generic/rte_vect.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
  

Comments

Bruce Richardson March 28, 2024, 5:19 p.m. UTC | #1
On Thu, Mar 28, 2024 at 09:14:05AM -0700, Tyler Retzlaff wrote:
> MSVC documents that you use the monolithic intrin.h for all intrinsics
> (including SIMD intrinsics) include intrin.h into rte_vec.h when
> building with MSVC so we don't have to duplicate conditionally compile
> include it across the DPDK source.
> 
> Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
> ---
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
  

Patch

diff --git a/lib/eal/include/generic/rte_vect.h b/lib/eal/include/generic/rte_vect.h
index 6540419..1f84292 100644
--- a/lib/eal/include/generic/rte_vect.h
+++ b/lib/eal/include/generic/rte_vect.h
@@ -15,7 +15,11 @@ 
 
 #include <stdint.h>
 
-#ifndef RTE_TOOLCHAIN_MSVC
+#ifdef RTE_TOOLCHAIN_MSVC
+
+#include <intrin.h>
+
+#else
 
 /* Unsigned vector types */