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
> >> 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.
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
>>>
> 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))
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.
> 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
buffer_find_nonzero_offset() is a hot function during live migration.
Now it use SSE2 intructions for optimization. For platform supports
AVX2 instructions, use the AVX2 instructions for optimization can help
to improve the performance about 30% comparing to SSE2.
Zero page check can be faster
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