mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-29 20:07:30 +09:00
Merge remote-tracking branch 'origin/tracking' into custom
This commit is contained in:
commit
687f52e183
9 changed files with 82 additions and 12 deletions
|
|
@ -245,7 +245,7 @@ elif CONFIG['CPU_ARCH'].startswith('ppc'):
|
|||
'simd/powerpc/jsimd.c',
|
||||
]
|
||||
for srcfile in ppc_vmx_sources:
|
||||
SOURCES[srcfile].flags += CONFIG['PPC_VMX_FLAGS']
|
||||
SOURCES[srcfile].flags += ['-maltivec']
|
||||
else: # No SIMD support?
|
||||
SOURCES += [
|
||||
'jsimd_none.c',
|
||||
|
|
|
|||
|
|
@ -38,6 +38,9 @@
|
|||
#elif defined(__FreeBSD__)
|
||||
#include <machine/cpu.h>
|
||||
#include <sys/auxv.h>
|
||||
#elif defined(__NetBSD__)
|
||||
#include <sys/param.h>
|
||||
#include <sys/sysctl.h>
|
||||
#endif
|
||||
|
||||
static unsigned int simd_support = ~0;
|
||||
|
|
@ -127,6 +130,9 @@ init_simd(void)
|
|||
size_t len = sizeof(altivec);
|
||||
#elif defined(__FreeBSD__)
|
||||
unsigned long cpufeatures = 0;
|
||||
#elif defined(__NetBSD__)
|
||||
int ret, av;
|
||||
size_t len;
|
||||
#endif
|
||||
|
||||
if (simd_support != ~0U)
|
||||
|
|
@ -149,6 +155,11 @@ init_simd(void)
|
|||
#elif defined(__OpenBSD__)
|
||||
if (sysctl(mib, 2, &altivec, &len, NULL, 0) == 0 && altivec != 0)
|
||||
simd_support |= JSIMD_ALTIVEC;
|
||||
#elif defined(__NetBSD__)
|
||||
len = sizeof(av);
|
||||
ret = sysctlbyname("machdep.altivec", &av, &len, NULL, 0);
|
||||
if (!ret && av)
|
||||
simd_support |= JSIMD_ALTIVEC;
|
||||
#elif defined(__FreeBSD__)
|
||||
elf_aux_info(AT_HWCAP, &cpufeatures, sizeof(cpufeatures));
|
||||
if (cpufeatures & PPC_FEATURE_HAS_ALTIVEC)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue