Re: [PATCH 1/2] eal: provide macro for GCC builtin constant intrinsic

2024-05-29 Thread Andrew Rybchenko
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/inclu

Re: [PATCH 1/2] eal: provide macro for GCC builtin constant intrinsic

2024-05-29 Thread Andrew Rybchenko
On 4/1/24 11:34, Morten Brørup wrote: From: Stephen Hemminger [mailto:step...@networkplumber.org] Sent: Monday, 1 April 2024 00.03 On Wed, 20 Mar 2024 14:33:35 -0700 Tyler Retzlaff wrote: +#ifdef RTE_TOOLCHAIN_MSVC +#define __rte_constant(e) 0 +#else +#define __rte_constant(e) __extension__(_

Re: [PATCH 1/2] eal: provide macro for GCC builtin constant intrinsic

2024-05-27 Thread Bruce Richardson
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

RE: [PATCH 1/2] eal: provide macro for GCC builtin constant intrinsic

2024-05-27 Thread Morten Brørup
PING for Review/ACK. Come on fellow reviewers, it's only 5 lines of code! The mempool library cannot build with MSVC without this patch series. Other patches are also being held back, waiting for this MSVC compatible DPDK macro for __builtin_constant_p(). The macro for MSVC can be improved as

RE: [PATCH 1/2] eal: provide macro for GCC builtin constant intrinsic

2024-04-01 Thread Morten Brørup
> From: Stephen Hemminger [mailto:step...@networkplumber.org] > Sent: Monday, 1 April 2024 00.03 > > On Wed, 20 Mar 2024 14:33:35 -0700 > Tyler Retzlaff wrote: > > > +#ifdef RTE_TOOLCHAIN_MSVC > > +#define __rte_constant(e) 0 > > +#else > > +#define __rte_constant(e) __extension__(__builtin_cons

Re: [PATCH 1/2] eal: provide macro for GCC builtin constant intrinsic

2024-03-31 Thread Stephen Hemminger
On Wed, 20 Mar 2024 14:33:35 -0700 Tyler Retzlaff wrote: > +#ifdef RTE_TOOLCHAIN_MSVC > +#define __rte_constant(e) 0 > +#else > +#define __rte_constant(e) __extension__(__builtin_constant_p(e)) > +#endif > + I did some looking around and some other project have macros for expressing constant ex

RE: [PATCH 1/2] eal: provide macro for GCC builtin constant intrinsic

2024-03-26 Thread Morten Brørup
> From: Tyler Retzlaff [mailto:roret...@linux.microsoft.com] > Sent: Wednesday, 20 March 2024 22.34 > > 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 > --- Reviewed

[PATCH 1/2] eal: provide macro for GCC builtin constant intrinsic

2024-03-20 Thread Tyler Retzlaff
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/e