qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [v2 1/2] cutils: add avx2 instruction optimization


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [v2 1/2] cutils: add avx2 instruction optimization
Date: Fri, 13 Nov 2015 04:30:53 -0500 (EST)

> > ... define buffer_find_nonzero_offset_inner ...
> > ... define can_use_buffer_find_nonzero_offset_inner ...
> 
> > #if defined CONFIG_HAVE_GNU_IFUNC && defined CONFIG_HAVE_AVX2 ...
> > define buffer_find_nonzero_offset_avx2 ...
> > ... define can_use_buffer_find_nonzero_offset_avx2 ...
> > ... define the indirect functions ...
> > #else
> > ... define buffer_find_nonzero_offset that just calls
> > buffer_find_nonzero_offset_inner ...
> > ... define can_use_buffer_find_nonzero_offset that just calls
> > can_use_buffer_find_nonzero_offset_inner ...
> > #endif
> > 
> > Thanks,
> > 
> > Paolo
> 
> The buffer_find_nonzero_offset_inner  & buffer_find_nonzero_offset_avx2
> can't defined in the same .c file.
> Or, if the '-maxv2' is enabled, the " buffer_find_nonzero_offset_inner  ()"
> will be compiled to AVX2 instructions.

You can use __attribute__((__target__("avx2"))) on the avx2 version,
instead of compiling the whole file with -mavx2.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]