about summary refs log tree commit diff stats
path: root/src/emu
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2021-03-06 10:24:33 +0100
committerptitSeb <sebastien.chev@gmail.com>2021-03-06 10:24:33 +0100
commitaed9ebd7d66fb3c4e9954c5d0759c2446b820ed3 (patch)
tree7a89f8fbcb4222bf80d631fe208fe00d1c4ae930 /src/emu
parentf335df23ec5276ebf67c0a9d59fb504da60839aa (diff)
downloadbox64-aed9ebd7d66fb3c4e9954c5d0759c2446b820ed3.tar.gz
box64-aed9ebd7d66fb3c4e9954c5d0759c2446b820ed3.zip
Added 0F A2 cpuid opcode
Diffstat (limited to 'src/emu')
-rw-r--r--src/emu/x64run0f.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/emu/x64run0f.c b/src/emu/x64run0f.c
index 51496f55..2544580f 100644
--- a/src/emu/x64run0f.c
+++ b/src/emu/x64run0f.c
@@ -18,7 +18,7 @@
 #include "x64trace.h"

 #include "x87emu_private.h"

 #include "box64context.h"

-//#include "my_cpuid.h"

+#include "my_cpuid.h"

 #include "bridge.h"

 //#include "signals.h"

 #ifdef DYNAREC

@@ -32,6 +32,7 @@ int Run0F(x64emu_t *emu, rex_t rex)
     uint8_t opcode;

     uint8_t nextop;

     int32_t tmp32s;

+    uint32_t tmp32u;

     reg64_t *oped, *opgd;

 

     opcode = F8;

@@ -61,6 +62,11 @@ int Run0F(x64emu_t *emu, rex_t rex)
             , R_RIP += tmp32s;

         )                               /* 0x80 -> 0x8F Jxx */

 

+        case 0xA2:                      /* CPUID */

+            tmp32u = R_EAX;

+            my_cpuid(emu, tmp32u);

+            break;

+

         case 0xAF:                      /* IMUL Gd,Ed */

             nextop = F8;

             GETED;