aarch64: Add Windows runtime detection of the dotprod instructions

For Windows, there's no publicly defined constant for checking for
the i8mm extension yet.

Signed-off-by: Martin Storsjö <martin@martin.st>
pull/389/head
Martin Storsjö 2 years ago
parent 9b0052200a
commit c76643021e
  1. 12
      libavutil/aarch64/cpu.c

@ -83,6 +83,18 @@ static int detect_flags(void)
return flags;
}
#elif defined(_WIN32)
#include <windows.h>
static int detect_flags(void)
{
int flags = 0;
#ifdef PF_ARM_V82_DP_INSTRUCTIONS_AVAILABLE
if (IsProcessorFeaturePresent(PF_ARM_V82_DP_INSTRUCTIONS_AVAILABLE))
flags |= AV_CPU_FLAG_DOTPROD;
#endif
return flags;
}
#else
static int detect_flags(void)

Loading…
Cancel
Save