x86: add detection for FMA3 instruction set
Based on x264 code Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
committed by
Janne Grunau
parent
10b0161d78
commit
1b932eb150
@@ -131,8 +131,11 @@ int ff_get_cpu_flags_x86(void)
|
||||
if ((ecx & 0x18000000) == 0x18000000) {
|
||||
/* Check for OS support */
|
||||
xgetbv(0, eax, edx);
|
||||
if ((eax & 0x6) == 0x6)
|
||||
if ((eax & 0x6) == 0x6) {
|
||||
rval |= AV_CPU_FLAG_AVX;
|
||||
if (ecx & 0x00001000)
|
||||
rval |= AV_CPU_FLAG_FMA3;
|
||||
}
|
||||
}
|
||||
#if HAVE_AVX2
|
||||
if (max_std_level >= 7) {
|
||||
|
||||
Reference in New Issue
Block a user