From: Bruce Richardson <bruce.richardson@intel.com>
To: Tyler Retzlaff <roretzla@linux.microsoft.com>
Cc: dev@dpdk.org, "Morten Brørup" <mb@smartsharesystems.com>,
"Andrew Rybchenko" <andrew.rybchenko@oktetlabs.ru>
Subject: Re: [PATCH 1/2] eal: provide macro for GCC builtin constant intrinsic
Date: Mon, 27 May 2024 13:00:13 +0100 [thread overview]
Message-ID: <ZlR1zfFhqPJf9rBY@bricha3-mobl1.ger.corp.intel.com> (raw)
In-Reply-To: <1710970416-27841-2-git-send-email-roretzla@linux.microsoft.com>
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 <roretzla@linux.microsoft.com>
> ---
> 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 <bruce.richardson@intel.com>
next prev parent reply other threads:[~2024-05-27 12:00 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-20 21:33 [PATCH 0/2] provide toolchain abstracted __builtin_constant_p Tyler Retzlaff
2024-03-20 21:33 ` [PATCH 1/2] eal: provide macro for GCC builtin constant intrinsic Tyler Retzlaff
2024-03-26 9:57 ` Morten Brørup
2024-03-31 22:03 ` Stephen Hemminger
2024-04-01 8:34 ` Morten Brørup
2024-05-27 11:58 ` Morten Brørup
2024-05-29 11:42 ` Andrew Rybchenko
2024-05-27 12:00 ` Bruce Richardson [this message]
2024-05-29 11:42 ` Andrew Rybchenko
2024-03-20 21:33 ` [PATCH 2/2] mempool: use rte constant macro instead of GCC builtin Tyler Retzlaff
2024-03-26 9:57 ` Morten Brørup
2024-05-29 11:42 ` Andrew Rybchenko
2024-05-29 14:51 ` Thomas Monjalon
2024-06-14 14:32 ` David Marchand
2024-07-03 13:16 ` Thomas Monjalon
2024-07-03 13:49 ` Morten Brørup
2024-07-03 14:22 ` David Marchand
2024-07-03 15:28 ` Patrick Robb
2024-06-27 13:28 ` [PATCH 0/2] provide toolchain abstracted __builtin_constant_p Thomas Monjalon
2024-07-03 14:18 ` David Marchand
2024-07-03 16:13 ` Thomas Monjalon
2024-07-04 16:05 ` Patrick Robb
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=ZlR1zfFhqPJf9rBY@bricha3-mobl1.ger.corp.intel.com \
--to=bruce.richardson@intel.com \
--cc=andrew.rybchenko@oktetlabs.ru \
--cc=dev@dpdk.org \
--cc=mb@smartsharesystems.com \
--cc=roretzla@linux.microsoft.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).