20 #include <sys/sysctl.h> 21 #elif defined(__OpenBSD__) 22 #include <sys/param.h> 23 #include <sys/sysctl.h> 24 #include <machine/cpu.h> 25 #elif defined(__AMIGAOS4__) 26 #include <exec/exec.h> 27 #include <interfaces/exec.h> 28 #include <proto/exec.h> 43 extern struct ExecIFace *IExec;
45 IExec->GetCPUInfoTags(GCIT_VectorUnit, &result, TAG_DONE);
46 if (result == VECTORTYPE_ALTIVEC)
49 #elif defined(__APPLE__) || defined(__OpenBSD__) 51 int sels[2] = {CTL_MACHDEP, CPU_ALTIVEC};
53 int sels[2] = {CTL_HW, HW_VECTORUNIT};
56 size_t len =
sizeof(has_vu);
59 err = sysctl(sels, 2, &has_vu, &len,
NULL, 0);
64 #elif CONFIG_RUNTIME_CPUDETECT && defined(__linux__) && !ARCH_PPC64 67 __asm__
volatile(
"mfspr %0, 287" :
"=r" (proc_ver));
69 if (proc_ver & 0x8000 ||
71 proc_ver == 0x0039 || proc_ver == 0x003c ||
72 proc_ver == 0x0044 || proc_ver == 0x0045 ||
#define AV_CPU_FLAG_ALTIVEC
standard
int ff_get_cpu_flags_ppc(void)
This function MAY rely on signal() or fork() in order to make sure AltiVec is present.