Re: [Qemu-devel] [v3 1/3] cutils: add avx2 instruction optimization

2015-12-10 Thread Paolo Bonzini
On 10/12/2015 10:22, Li, Liang Z wrote: without the ' -mavx2' option for gcc, there are compiling error: '__m256i undeclared', the __attribute__((target("avx2"))) can't solve this issue. Any idea? >>> >>> You're right that you can't use the normal __m256i, as it doesn't get >>>

Re: [Qemu-devel] [v3 1/3] cutils: add avx2 instruction optimization

2015-12-10 Thread Li, Liang Z
> >> without the ' -mavx2' option for gcc, there are compiling error: > >> '__m256i undeclared', the __attribute__((target("avx2"))) can't solve > >> this issue. Any idea? > > > > You're right that you can't use the normal __m256i, as it doesn't get > > declared. > > It should be declared. *in

Re: [Qemu-devel] [v3 1/3] cutils: add avx2 instruction optimization

2015-12-10 Thread Paolo Bonzini
On 09/12/2015 15:57, Richard Henderson wrote: >> I think you means the ' __attribute__((target("avx2")))', I have tried >> this way, the issue here is: >> without the ' -mavx2' option for gcc, there are compiling error: >> '__m256i undeclared', the __attribute__((target("avx2"))) >> can't solv

Re: [Qemu-devel] [v3 1/3] cutils: add avx2 instruction optimization

2015-12-09 Thread Li, Liang Z
> On 12/09/2015 01:32 AM, Li, Liang Z wrote: > > I think you means the ' __attribute__((target("avx2")))', I have tried this > way, the issue here is: > > without the ' -mavx2' option for gcc, there are compiling error: > > '__m256i undeclared', the __attribute__((target("avx2"))) can't solve thi

Re: [Qemu-devel] [v3 1/3] cutils: add avx2 instruction optimization

2015-12-09 Thread Richard Henderson
On 12/09/2015 01:32 AM, Li, Liang Z wrote: I think you means the ' __attribute__((target("avx2")))', I have tried this way, the issue here is: without the ' -mavx2' option for gcc, there are compiling error: '__m256i undeclared', the __attribute__((target("avx2"))) can't solve this issue. A

Re: [Qemu-devel] [v3 1/3] cutils: add avx2 instruction optimization

2015-12-09 Thread Li, Liang Z
> On 12/08/2015 04:08 AM, Liang Li wrote: > > +++ b/util/buffer-zero-avx2.c > > @@ -0,0 +1,54 @@ > > +#include "qemu-common.h" > > + > > +#if defined CONFIG_IFUNC && defined CONFIG_AVX2 #include > > + > > +#define AVX2_VECTYPE__m256i > > +#define AVX2_SPLAT(p) _mm256_set1_epi8(*(p)) >

Re: [Qemu-devel] [v3 1/3] cutils: add avx2 instruction optimization

2015-12-08 Thread Richard Henderson
On 12/08/2015 04:08 AM, Liang Li wrote: > +++ b/util/buffer-zero-avx2.c > @@ -0,0 +1,54 @@ > +#include "qemu-common.h" > + > +#if defined CONFIG_IFUNC && defined CONFIG_AVX2 > +#include > +#define AVX2_VECTYPE__m256i > +#define AVX2_SPLAT(p) _mm256_set1_epi8(*(p)) > +#define AVX2_ALL