mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-27 11:24:05 +00:00
Require BMI and ABM instruction sets for AVX2 build
AVX2 support on a processor should always imply BMI and ABM support. The lzcnt and tzcnt instructions have more suitable semantics in the corner case that source word is 0, and allow us to even handle that scenario without a branch. Apparently Visual Studio will already include this support when building with AVX2 enabled, so only the automake files need to be tweaked.
This commit is contained in:
parent
a5a10a33c3
commit
c5cd03497e
|
@ -49,9 +49,11 @@ AX_CHECK_COMPILE_FLAG([-maltivec],[flag_altivec="true"])
|
|||
AX_CHECK_COMPILE_FLAG([-mavx2], [flag_avx2="true"])
|
||||
AX_CHECK_COMPILE_FLAG([-msse4.1], [flag_sse4_1="true"])
|
||||
AX_CHECK_COMPILE_FLAG([-msse2], [flag_sse2="true"])
|
||||
AX_CHECK_COMPILE_FLAG([-mbmi], [flag_bmi="true"])
|
||||
AX_CHECK_COMPILE_FLAG([-mabm], [flag_abm="true"])
|
||||
|
||||
AM_CONDITIONAL([HAVE_ALTIVEC], [test x"$flag_altivec" = x"true"])
|
||||
AM_CONDITIONAL([HAVE_AVX2], [test x"$flag_avx2" = x"true"])
|
||||
AM_CONDITIONAL([HAVE_AVX2], [test x"$flag_avx2" = x"true" -a x"$flag_bmi" = x"true" -a x"$flag_abm" = x"true"])
|
||||
AM_CONDITIONAL([HAVE_SSE4_1], [test x"$flag_sse4_1" = x"true"])
|
||||
AM_CONDITIONAL([HAVE_SSE2], [test x"$flag_sse2" = x"true"])
|
||||
|
||||
|
|
|
@ -207,7 +207,7 @@ endif #HAVE_PPC
|
|||
if HAVE_X86
|
||||
|
||||
if HAVE_AVX2
|
||||
libavx2_la_CFLAGS = -mavx2
|
||||
libavx2_la_CFLAGS = -mavx2 -mbmi -mabm
|
||||
endif
|
||||
if HAVE_SSE4_1
|
||||
libsse41_la_CFLAGS = -msse4.1
|
||||
|
|
Loading…
Reference in a new issue