about summary refs log tree commit diff stats
path: root/src/tools
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/tools
parent39568bff2fe3dc8d907d0738ccca4c14501cd808 (diff)
downloadbox64-afe6fbe3b330929bde1a36712346bda2ffc7d9f9.tar.gz
box64-afe6fbe3b330929bde1a36712346bda2ffc7d9f9.zip
Added full support for the SHA cpu extension
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/my_cpuid.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/tools/my_cpuid.c b/src/tools/my_cpuid.c
index 81399633..b4bcbcbb 100644
--- a/src/tools/my_cpuid.c
+++ b/src/tools/my_cpuid.c
@@ -270,10 +270,11 @@ void my_cpuid(x64emu_t* emu, uint32_t tmp32u)
             R_EDX = 0;
             break;
         case 0x7:   // extended bits...
-            if(R_ECX==1) {
-                R_EAX = 0; // Bit 5 is avx512_bf16
-            } else 
-                R_EAX = R_ECX = R_EBX = R_EDX = 0; // TODO
+            if(R_ECX==0) {
+                R_EAX = 0;
+                R_EBX = 0 |
+                        1<<29;  // SHA extension
+            } else {R_EAX = R_ECX = R_EBX = R_EDX = 0;}
             break;
         case 0xB:   // Extended Topology Enumeration Leaf
             //TODO!