Common: Add CPU feature detection for ARM64
This commit is contained in:
parent
f1c2f63aa1
commit
0af8406e44
3 changed files with 149 additions and 0 deletions
31
src/common/aarch64/cpu_detect.h
Normal file
31
src/common/aarch64/cpu_detect.h
Normal file
|
@ -0,0 +1,31 @@
|
|||
// Copyright 2013 Dolphin Emulator Project / 2021 Citra Emulator Project
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace Common {
|
||||
|
||||
/// Arm64 CPU capabilities that may be detected by this module
|
||||
struct CPUCaps {
|
||||
std::string cpu_string;
|
||||
|
||||
bool aes;
|
||||
bool afp; // Alternate floating-point behavior
|
||||
bool asimd;
|
||||
bool crc32;
|
||||
bool fma;
|
||||
bool fp;
|
||||
bool sha1;
|
||||
bool sha2;
|
||||
};
|
||||
|
||||
/**
|
||||
* Gets the supported capabilities of the host CPU
|
||||
* @return Reference to a CPUCaps struct with the detected host CPU capabilities
|
||||
*/
|
||||
const CPUCaps& GetCPUCaps();
|
||||
|
||||
} // namespace Common
|
Loading…
Add table
Add a link
Reference in a new issue