Skip to content
Snippets Groups Projects

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

Open Brad Smith requested to merge brad/x264:getauxval_mips into master
2 unresolved threads
+ 12
1
@@ -504,9 +504,20 @@ uint32_t x264_cpu_detect( void )
#elif HAVE_MSA
#define HWCAP_MIPS_MSA (1U << 1)
uint32_t x264_cpu_detect( void )
{
return X264_CPU_MSA;
uint32_t flags = 0;
#if HAVE_GETAUXVAL
unsigned long hwcap = x264_getauxval( AT_HWCAP );
if ( hwcap & HWCAP_MIPS_MSA )
flags |= X264_CPU_MSA;
#endif
return flags;
}
#elif HAVE_LSX
Loading