[2/2] configure: add missing avx2 support check

Message ID 1453612244-2156-2-git-send-email-jamrial@gmail.com
State New
Headers show

Commit Message

James Almer Jan. 24, 2016, 5:10 a.m.
AVX2 support was introduced in Yasm 1.2.0 and NASM 2.10, and the
oldest versions currently supported are Yasm 0.8.0 and NASM 2.03

Signed-off-by: James Almer <jamrial@gmail.com>
---
 configure | 1 +
 1 file changed, 1 insertion(+)

Comments

Luca Barbato Jan. 24, 2016, 5:17 a.m. | #1
On 24/01/16 06:10, James Almer wrote:
> AVX2 support was introduced in Yasm 1.2.0 and NASM 2.10, and the
> oldest versions currently supported are Yasm 0.8.0 and NASM 2.03
> 
> Signed-off-by: James Almer <jamrial@gmail.com>
> ---
>  configure | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/configure b/configure
> index c5bcb78..8af0dcc 100755
> --- a/configure
> +++ b/configure
> @@ -4313,6 +4313,7 @@ EOF
>  
>          check_yasm "movbe ecx, [5]" && enable yasm ||
>              die "yasm/nasm not found or too old. Use --disable-yasm for a crippled build."
> +        check_yasm "vextracti128 xmm0, ymm0, 0"      || disable avx2_external
>          check_yasm "vpmacsdd xmm0, xmm1, xmm2, xmm3" || disable xop_external
>          check_yasm "vfmadd132ps ymm0, ymm1, ymm2"    || disable fma3_external
>          check_yasm "vfmaddps ymm0, ymm1, ymm2, ymm3" || disable fma4_external
> 

I was about to write it, patch ok =)

lu
Luca Barbato Jan. 24, 2016, 7:15 a.m. | #2
On 24/01/16 06:17, Luca Barbato wrote:
> On 24/01/16 06:10, James Almer wrote:
>> AVX2 support was introduced in Yasm 1.2.0 and NASM 2.10, and the
>> oldest versions currently supported are Yasm 0.8.0 and NASM 2.03
>>
>> Signed-off-by: James Almer <jamrial@gmail.com>
>> ---
>>  configure | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/configure b/configure
>> index c5bcb78..8af0dcc 100755
>> --- a/configure
>> +++ b/configure
>> @@ -4313,6 +4313,7 @@ EOF
>>  
>>          check_yasm "movbe ecx, [5]" && enable yasm ||
>>              die "yasm/nasm not found or too old. Use --disable-yasm for a crippled build."
>> +        check_yasm "vextracti128 xmm0, ymm0, 0"      || disable avx2_external
>>          check_yasm "vpmacsdd xmm0, xmm1, xmm2, xmm3" || disable xop_external
>>          check_yasm "vfmadd132ps ymm0, ymm1, ymm2"    || disable fma3_external
>>          check_yasm "vfmaddps ymm0, ymm1, ymm2, ymm3" || disable fma4_external
>>
> 
> I was about to write it, patch ok =)
> 

Travis seems still unhappy, does it ring any bell?

libavcodec/x86/v210enc.asm:95: error: undefined symbol
`vinserti128.loop' (first use)

lu
Timothy Gu Jan. 24, 2016, 3:17 p.m. | #3
Hi,

On Sun, Jan 24, 2016 at 08:15:27AM +0100, Luca Barbato wrote:
> 
> Travis seems still unhappy, does it ring any bell?
> 
> libavcodec/x86/v210enc.asm:95: error: undefined symbol
> `vinserti128.loop' (first use)

It's probably because the v210 patch doesn't use the guards yet.

Timothy
Diego Biurrun Jan. 25, 2016, 9:45 a.m. | #4
On Sun, Jan 24, 2016 at 02:10:44AM -0300, James Almer wrote:
> AVX2 support was introduced in Yasm 1.2.0 and NASM 2.10, and the
> oldest versions currently supported are Yasm 0.8.0 and NASM 2.03

Those are 4-5 years old; bump requirements instead?

Diego
Luca Barbato Jan. 25, 2016, 10:08 a.m. | #5
On 25/01/16 10:45, Diego Biurrun wrote:
> Those are 4-5 years old; bump requirements instead?

I already added the guards, it is more consistent with the rest of the
codebase and I guess whoever wants to build w/out a specific optional
component might like not having stray code even if he could build it =)

lu

Patch

diff --git a/configure b/configure
index c5bcb78..8af0dcc 100755
--- a/configure
+++ b/configure
@@ -4313,6 +4313,7 @@  EOF
 
         check_yasm "movbe ecx, [5]" && enable yasm ||
             die "yasm/nasm not found or too old. Use --disable-yasm for a crippled build."
+        check_yasm "vextracti128 xmm0, ymm0, 0"      || disable avx2_external
         check_yasm "vpmacsdd xmm0, xmm1, xmm2, xmm3" || disable xop_external
         check_yasm "vfmadd132ps ymm0, ymm1, ymm2"    || disable fma3_external
         check_yasm "vfmaddps ymm0, ymm1, ymm2, ymm3" || disable fma4_external