Common: Add CPU feature detection for ARM64

This commit is contained in:
SachinVin 2022-04-04 23:43:39 +05:30
parent f1c2f63aa1
commit 0af8406e44
3 changed files with 149 additions and 0 deletions

View 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