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 16F8B44101; Wed, 29 May 2024 13:42:45 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 44383406B6; Wed, 29 May 2024 13:42:44 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id 7EF58402CD for ; Wed, 29 May 2024 13:42:43 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 9C18E38 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1716982962; bh=gfJlp7CAJRVqwlcjTL43vN0SHCpfM2FbpBnw/DR4oUE=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=Vuei1q2yT8vjy/wycdW/04UJWC0PJ6HfgfRi3LLai8aByqp09IwTbjMhahJQsL5vE 0NY8KYPnGGfEh9DwpglF2jeMMQKGKMEiN01tOX+W7lhzIkvxD8DCW4deUx55EDH0UG tOul6bPyYliATgvjO4APPLTDg0x4QUYs+KWVQl+Y= Received: from [192.168.1.39] (unknown [188.170.73.49]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id 9C18E38; Wed, 29 May 2024 14:42:42 +0300 (MSK) Message-ID: <90a9c2b1-e483-4fc9-a2f0-c429abec8cce@oktetlabs.ru> Date: Wed, 29 May 2024 14:42:42 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/2] eal: provide macro for GCC builtin constant intrinsic To: Bruce Richardson , Tyler Retzlaff Cc: dev@dpdk.org, =?UTF-8?Q?Morten_Br=C3=B8rup?= References: <1710970416-27841-1-git-send-email-roretzla@linux.microsoft.com> <1710970416-27841-2-git-send-email-roretzla@linux.microsoft.com> Content-Language: en-US From: Andrew Rybchenko In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 On 5/27/24 15:00, Bruce Richardson wrote: > On Wed, Mar 20, 2024 at 02:33:35PM -0700, Tyler Retzlaff wrote: >> MSVC does not have a __builtin_constant_p intrinsic so provide >> __rte_constant(e) that expands false for MSVC and to the intrinsic for >> GCC. >> >> Signed-off-by: Tyler Retzlaff >> --- >> lib/eal/include/rte_common.h | 6 ++++++ >> 1 file changed, 6 insertions(+) >> >> diff --git a/lib/eal/include/rte_common.h b/lib/eal/include/rte_common.h >> index 298a5c6..d520be6 100644 >> --- a/lib/eal/include/rte_common.h >> +++ b/lib/eal/include/rte_common.h >> @@ -44,6 +44,12 @@ >> #endif >> #endif >> >> +#ifdef RTE_TOOLCHAIN_MSVC >> +#define __rte_constant(e) 0 >> +#else >> +#define __rte_constant(e) __extension__(__builtin_constant_p(e)) >> +#endif >> + > > Acked-by: Bruce Richardson Reviewed-by: Andrew Rybchenko