Skip to content
Snippets Groups Projects
Commit 868171c3 authored by Brad Smith's avatar Brad Smith
Browse files

Use getauxval() on Linux and elf_aux_info() on OpenBSD on mips

parent da14df55
Branches android/3.5
No related tags found
1 merge request!162Use getauxval() on Linux and elf_aux_info() on OpenBSD on mips
......@@ -504,9 +504,22 @@ uint32_t x264_cpu_detect( void )
#elif HAVE_MSA
#define HWCAP_MIPS_MSA (1U << 1)
uint32_t x264_cpu_detect( void )
{
uint32_t flags = 0;
#if HAVE_GETAUXVAL || HAVE_ELF_AUX_INFO
unsigned long hwcap = x264_getauxval( AT_HWCAP );
if ( hwcap & HWCAP_MIPS_MSA )
flags |= X264_CPU_MSA;
#else
return X264_CPU_MSA;
#endif
return flags;
}
#elif HAVE_LSX
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment