From a4daad63364dc9e035796ea4f4327efec1ee1b0d Mon Sep 17 00:00:00 2001 From: merry Date: Sun, 20 Mar 2022 00:13:03 +0000 Subject: [PATCH] block_of_code: Add HostFeature SHA --- src/dynarmic/backend/x64/block_of_code.cpp | 2 ++ src/dynarmic/backend/x64/host_feature.h | 13 +++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/dynarmic/backend/x64/block_of_code.cpp b/src/dynarmic/backend/x64/block_of_code.cpp index 42e15fc7..4fe5767d 100644 --- a/src/dynarmic/backend/x64/block_of_code.cpp +++ b/src/dynarmic/backend/x64/block_of_code.cpp @@ -114,6 +114,8 @@ HostFeature GetHostFeatures() { features |= HostFeature::FMA; if (cpu_info.has(Cpu::tAESNI)) features |= HostFeature::AES; + if (cpu_info.has(Cpu::tSHA)) + features |= HostFeature::SHA; if (cpu_info.has(Cpu::tPOPCNT)) features |= HostFeature::POPCNT; if (cpu_info.has(Cpu::tBMI1)) diff --git a/src/dynarmic/backend/x64/host_feature.h b/src/dynarmic/backend/x64/host_feature.h index dc47d7af..baf96a66 100644 --- a/src/dynarmic/backend/x64/host_feature.h +++ b/src/dynarmic/backend/x64/host_feature.h @@ -26,14 +26,15 @@ enum class HostFeature : u64 { F16C = 1ULL << 13, FMA = 1ULL << 14, AES = 1ULL << 15, - POPCNT = 1ULL << 16, - BMI1 = 1ULL << 17, - BMI2 = 1ULL << 18, - LZCNT = 1ULL << 19, - GFNI = 1ULL << 20, + SHA = 1ULL << 16, + POPCNT = 1ULL << 17, + BMI1 = 1ULL << 18, + BMI2 = 1ULL << 19, + LZCNT = 1ULL << 20, + GFNI = 1ULL << 21, // Zen-based BMI2 - FastBMI2 = 1ULL << 21, + FastBMI2 = 1ULL << 22, // Orthographic AVX512 features on 128 and 256 vectors AVX512_Ortho = AVX512F | AVX512VL,