about summary refs log tree commit diff stats
path: root/src/main.c
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2023-11-21 18:00:43 +0100
committerptitSeb <sebastien.chev@gmail.com>2023-11-21 18:00:58 +0100
commitafe6fbe3b330929bde1a36712346bda2ffc7d9f9 (patch)
treee79e73f8bf46cf7cee4c667954d53fd0047147fe /src/main.c
parent39568bff2fe3dc8d907d0738ccca4c14501cd808 (diff)
downloadbox64-afe6fbe3b330929bde1a36712346bda2ffc7d9f9.tar.gz
box64-afe6fbe3b330929bde1a36712346bda2ffc7d9f9.zip
Added full support for the SHA cpu extension
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 022b92df..4fae8d7f 100644
--- a/src/main.c
+++ b/src/main.c
@@ -77,6 +77,8 @@ int arm64_aes = 0;
 int arm64_pmull = 0;
 int arm64_crc32 = 0;
 int arm64_atomics = 0;
+int arm64_sha1 = 0;
+int arm64_sha2 = 0;
 int arm64_uscat = 0;
 int arm64_flagm = 0;
 int arm64_flagm2 = 0;
@@ -377,6 +379,14 @@ HWCAP2_ECV
         arm64_aes = 1;
     if(hwcap&HWCAP_ATOMICS)
         arm64_atomics = 1;
+    #ifdef HWCAP_SHA1
+    if(hwcap&HWCAP_SHA1)
+        arm64_sha1 = 1;
+    #endif
+    #ifdef HWCAP_SHA2
+    if(hwcap&HWCAP_SHA2)
+        arm64_sha2 = 1;
+    #endif
     #ifdef HWCAP_USCAT
     if(hwcap&HWCAP_USCAT)
         arm64_uscat = 1;
@@ -407,6 +417,10 @@ HWCAP2_ECV
         printf_log(LOG_INFO, " PMULL");
     if(arm64_atomics)
         printf_log(LOG_INFO, " ATOMICS");
+    if(arm64_sha1)
+        printf_log(LOG_INFO, " SHA1");
+    if(arm64_sha2)
+        printf_log(LOG_INFO, " SHA2");
     if(arm64_uscat)
         printf_log(LOG_INFO, " USCAT");
     if(arm64_flagm)