Skip to content
Snippets Groups Projects
Commit 4251202d authored by pkubaj's avatar pkubaj Committed by Adam Jackson
Browse files

Fix AltiVec detection on FreeBSD.

parent e93eaff5
No related branches found
No related tags found
No related merge requests found
......@@ -68,6 +68,24 @@ pixman_have_vmx (void)
return have_vmx;
}
#elif defined (__FreeBSD__)
#include <machine/cpu.h>
#include <sys/auxv.h>
static pixman_bool_t
pixman_have_vmx (void)
{
unsigned long cpufeatures;
int have_vmx;
if (elf_aux_info(AT_HWCAP, &cpufeatures, sizeof(cpufeatures)))
return FALSE;
have_vmx = cpufeatures & PPC_FEATURE_HAS_ALTIVEC;
return have_vmx;
}
#elif defined (__linux__)
#include <sys/types.h>
......
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