I was referring to gcc multiversion https://gcc.gnu.org/wiki/FunctionMultiVersioning
On Aug 30, 2017 6:24 PM, "Lu, Wenzhuo" <wenzhuo...@intel.com> wrote: > Hi Stephen, > > > > -----Original Message----- > > From: Stephen Hemminger [mailto:step...@networkplumber.org] > > Sent: Thursday, August 31, 2017 2:01 AM > > To: Li, Xiaoyun <xiaoyun...@intel.com> > > Cc: Richardson, Bruce <bruce.richard...@intel.com>; dev@dpdk.org; Lu, > > Wenzhuo <wenzhuo...@intel.com>; Wang, Zhihong > > <zhihong.w...@intel.com>; Zhang, Qi Z <qi.z.zh...@intel.com> > > Subject: Re: [dpdk-dev] [PATCH 1/3] eal/x86: run-time dispatch over > memcpy > > > > On Fri, 25 Aug 2017 10:06:11 +0800 > > Xiaoyun Li <xiaoyun...@intel.com> wrote: > > > > > This patch dynamically selects functions of memcpy at run-time based > > > on CPU flags that current machine supports. This patch uses function > > > pointers which are bind to the relative functions at constrctor time. > > > To make AVX512 instructions pass compilation, enable the switch in > > > makefile. > > > > > > Signed-off-by: Xiaoyun Li <xiaoyun...@intel.com> > > > > Recent versions of GCC also have better ways to handle this. > I think the assumption of using the instructions is that we believe we can > do better than the compiler. If it turns out not, maybe we need to change > the instructions back to C. But it's another story. > >