All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andre Muezerie <andremue@linux.microsoft.com>
To: Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>
Cc: dev@dpdk.org, Andre Muezerie <andremue@linux.microsoft.com>
Subject: [PATCH 5/6] acl: make compatible with instruction set updates for MSVC
Date: Mon, 24 Feb 2025 13:01:18 -0800	[thread overview]
Message-ID: <1740430879-17874-6-git-send-email-andremue@linux.microsoft.com> (raw)
In-Reply-To: <1740430879-17874-1-git-send-email-andremue@linux.microsoft.com>

Top level 'cc_avx2_flags' was created and holds the correct flags
depending on the compiler used.

File meson.build was updated to handle the correct AVX512 flags
depending on compiler used.

Signed-off-by: Andre Muezerie <andremue@linux.microsoft.com>
---
 lib/acl/meson.build | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/lib/acl/meson.build b/lib/acl/meson.build
index fefe131a48..24e47b6cc1 100644
--- a/lib/acl/meson.build
+++ b/lib/acl/meson.build
@@ -19,7 +19,7 @@ if dpdk_conf.has('RTE_ARCH_X86')
     avx2_tmplib = static_library('avx2_tmp',
             'acl_run_avx2.c',
             dependencies: static_rte_eal,
-            c_args: cflags + ['-mavx2'])
+            c_args: [cflags, cc_avx2_flags])
     objs += avx2_tmplib.extract_objects('acl_run_avx2.c')
 
     # compile AVX512 version if:
@@ -38,6 +38,12 @@ if dpdk_conf.has('RTE_ARCH_X86')
         # compiler flags, and then have the .o file from static lib
         # linked into main lib.
 
+        if is_ms_compiler
+            acl_avx512_args = cc_avx512_flags
+        else
+            acl_avx512_args = ['-mavx512f', '-mavx512vl', '-mavx512cd', '-mavx512bw']
+        endif
+
         # check if all required flags already enabled (variant a).
         acl_avx512_flags = ['__AVX512F__', '__AVX512VL__',
             '__AVX512CD__', '__AVX512BW__']
@@ -55,15 +61,11 @@ if dpdk_conf.has('RTE_ARCH_X86')
             sources += files('acl_run_avx512.c')
             cflags += '-DCC_AVX512_SUPPORT'
 
-        elif cc.has_multi_arguments('-mavx512f', '-mavx512vl',
-                    '-mavx512cd', '-mavx512bw')
-
+        elif cc.has_multi_arguments(acl_avx512_args)
             avx512_tmplib = static_library('avx512_tmp',
                 'acl_run_avx512.c',
                 dependencies: static_rte_eal,
-                c_args: cflags +
-                    ['-mavx512f', '-mavx512vl',
-                     '-mavx512cd', '-mavx512bw'])
+                c_args: cflags + acl_avx512_args)
             objs += avx512_tmplib.extract_objects(
                     'acl_run_avx512.c')
             cflags += '-DCC_AVX512_SUPPORT'
-- 
2.48.1.vfs.0.0


  parent reply	other threads:[~2025-02-24 21:02 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-24 21:01 [PATCH 0/6] allow faster instruction sets to be used with MSVC Andre Muezerie
2025-02-24 21:01 ` [PATCH 1/6] eal: make compatible with instruction set updates for MSVC Andre Muezerie
2025-02-24 21:01 ` [PATCH 2/6] eal: only use numbers as align parameters " Andre Muezerie
2025-02-24 21:01 ` [PATCH 3/6] config: allow faster instruction sets to be used with MSVC Andre Muezerie
2025-02-25 14:28   ` Bruce Richardson
2025-02-26  2:01     ` Andre Muezerie
2025-02-26  9:44       ` Bruce Richardson
2025-02-24 21:01 ` [PATCH 4/6] drivers/net: make compatible with instruction set updates for MSVC Andre Muezerie
2025-02-25  9:06   ` Bruce Richardson
2025-02-25 16:44     ` Andre Muezerie
2025-02-24 21:01 ` Andre Muezerie [this message]
2025-02-25  9:03   ` [PATCH 5/6] acl: " Bruce Richardson
2025-02-25 16:37     ` Andre Muezerie
2025-02-25 17:21       ` Bruce Richardson
2025-02-25 17:23         ` Andre Muezerie
2025-02-24 21:01 ` [PATCH 6/6] member: " Andre Muezerie
2025-02-26  1:06 ` [PATCH v2 0/5] allow faster instruction sets to be used with MSVC Andre Muezerie
2025-02-26  1:06   ` [PATCH v2 1/5] eal: make compatible with instruction set updates for MSVC Andre Muezerie
2025-02-26  9:50     ` Bruce Richardson
2025-02-26  1:06   ` [PATCH v2 2/5] eal: only use numbers as align parameters " Andre Muezerie
2025-02-26  9:51     ` Bruce Richardson
2025-02-26 10:15     ` Konstantin Ananyev
2025-02-26  1:06   ` [PATCH v2 3/5] config: create top level variable cc_avx2_flags Andre Muezerie
2025-02-26  9:52     ` Bruce Richardson
2025-02-26  1:06   ` [PATCH v2 4/5] drivers/net: make compatible with instruction set updates for MSVC Andre Muezerie
2025-02-26  9:53     ` Bruce Richardson
2025-02-26  1:06   ` [PATCH v2 5/5] acl: " Andre Muezerie
2025-02-26  9:54     ` Bruce Richardson
2025-02-26 21:21 ` [PATCH v3 0/3] allow faster instruction sets to be used with MSVC Andre Muezerie
2025-02-26 21:21   ` [PATCH v3 1/3] eal: make compatible with instruction set updates for MSVC Andre Muezerie
2025-02-26 21:21   ` [PATCH v3 2/3] eal: only use numbers as align parameters " Andre Muezerie
2025-02-27  8:39     ` Konstantin Ananyev
2025-02-26 21:21   ` [PATCH v3 3/3] config: create top level variable cc_avx2_flags Andre Muezerie
2025-03-06 13:57   ` [PATCH v3 0/3] allow faster instruction sets to be used with MSVC David Marchand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1740430879-17874-6-git-send-email-andremue@linux.microsoft.com \
    --to=andremue@linux.microsoft.com \
    --cc=dev@dpdk.org \
    --cc=konstantin.v.ananyev@yandex.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.