mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 04:08:55 +00:00
Add support for FreeBSD/arm64
This commit is contained in:
parent
c36ae84b96
commit
5981a1929d
3 changed files with 15 additions and 1 deletions
|
@ -9,7 +9,9 @@
|
|||
#include <thread>
|
||||
|
||||
#ifndef _WIN32
|
||||
#ifndef __FreeBSD__
|
||||
#include <asm/hwcap.h>
|
||||
#endif
|
||||
#include <sys/auxv.h>
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
@ -87,7 +89,12 @@ void CPUInfo::Detect()
|
|||
num_cores = sysconf(_SC_NPROCESSORS_CONF);
|
||||
strncpy(cpu_string, GetCPUString().c_str(), sizeof(cpu_string));
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
u_long hwcaps = 0;
|
||||
elf_aux_info(AT_HWCAP, &hwcaps, sizeof(u_long));
|
||||
#else
|
||||
unsigned long hwcaps = getauxval(AT_HWCAP);
|
||||
#endif
|
||||
bFP = hwcaps & HWCAP_FP;
|
||||
bASIMD = hwcaps & HWCAP_ASIMD;
|
||||
bAES = hwcaps & HWCAP_AES;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue