From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id AFB1045E3C; Thu, 5 Dec 2024 21:36:27 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D4E8240E03; Thu, 5 Dec 2024 21:36:14 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 107BE40B91 for ; Thu, 5 Dec 2024 21:36:10 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 3A79A20ACD85; Thu, 5 Dec 2024 12:36:09 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 3A79A20ACD85 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1733430969; bh=NGt0C47e6u1nb/xVzGEu1D8vf9tmCNwG/dqehRSLoQM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=X/uqSiC/ONE9kitSOaYgT9zHL9wyyMCcIA3mz0+7lAJmFEV9rIW8lemIxibS8QTL1 +2EEh+uSwoGOREfrF5q9u7u//iqWUT51mSLhzd9+unL+xZQvW93qJsoCdqSjWt+k6u iwwlU+uCbe290nKbq3rzCnqW4mGiU2Z6YUxIQdfY= From: Andre Muezerie To: dev@dpdk.org Cc: Tyler Retzlaff Subject: [PATCH v2 1/3] eal: provide movdiri for MSVC Date: Thu, 5 Dec 2024 12:35:48 -0800 Message-Id: <1733430950-10412-2-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1733430950-10412-1-git-send-email-andremue@linux.microsoft.com> References: <1710969879-23701-1-git-send-email-roretzla@linux.microsoft.com> <1733430950-10412-1-git-send-email-andremue@linux.microsoft.com> X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Tyler Retzlaff MSVC does not support inline assembly. Instead it provides compiler intrinsics. Provide conditional compile for MSVC for movdiri using the _directstoreu_u32 intrinsic. Signed-off-by: Tyler Retzlaff --- lib/eal/x86/include/rte_io.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/eal/x86/include/rte_io.h b/lib/eal/x86/include/rte_io.h index f92a2e5295..7087e728ce 100644 --- a/lib/eal/x86/include/rte_io.h +++ b/lib/eal/x86/include/rte_io.h @@ -22,11 +22,15 @@ extern "C" { static __rte_always_inline void __rte_x86_movdiri(uint32_t value, volatile void *addr) { +#ifdef RTE_TOOLCHAIN_MSVC + _directstoreu_u32((void *)(uintptr_t)addr, value); +#else asm volatile( /* MOVDIRI */ ".byte 0x0f, 0x38, 0xf9, 0x02" : : "a" (value), "d" (addr)); +#endif } __rte_experimental -- 2.47.0.vfs.0.3