about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/emu/x64run66f30f.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/emu/x64run66f30f.c b/src/emu/x64run66f30f.c
index 00cd6cca..f8dc5de9 100644
--- a/src/emu/x64run66f30f.c
+++ b/src/emu/x64run66f30f.c
@@ -55,7 +55,24 @@ uintptr_t Run66F30F(x64emu_t *emu, rex_t rex, uintptr_t addr)
 
     switch(opcode) {
 
-    case 0xBC:  /* TZCNT Ed,Gd */
+    case 0xB8:  /* POPCNT Gw,Ew */
+        nextop = F8;
+        GETEW(0);
+        GETGW;
+        if(rex.w)
+            GD->q[0] = __builtin_popcountl(ED->q[0]);
+        else
+            GD->word[0] = __builtin_popcount(ED->word[0]);
+        RESET_FLAGS(emu);
+        CLEAR_FLAG(F_OF);
+        CLEAR_FLAG(F_SF);
+        CLEAR_FLAG(F_AF);
+        CLEAR_FLAG(F_CF);
+        CLEAR_FLAG(F_PF);
+        CONDITIONAL_SET_FLAG(GD->word[0]==0, F_ZF);
+        break;
+
+    case 0xBC:  /* TZCNT Ew,Gw */
         CHECK_FLAGS(emu);
         nextop = F8;
         GETEW(0);
@@ -93,7 +110,7 @@ uintptr_t Run66F30F(x64emu_t *emu, rex_t rex, uintptr_t addr)
         if(!BOX64ENV(cputype))
             CLEAR_FLAG(F_OF);
         break;
-    case 0xBD:  /* LZCNT Ed,Gd */
+    case 0xBD:  /* LZCNT Ew,Gw */
         CHECK_FLAGS(emu);
         nextop = F8;
         GETEW(0);
@@ -118,23 +135,6 @@ uintptr_t Run66F30F(x64emu_t *emu, rex_t rex, uintptr_t addr)
             CLEAR_FLAG(F_OF);
         break;
 
-    case 0xB8:  /* POPCNT Gd,Ed */
-        nextop = F8;
-        GETEW(0);
-        GETGW;
-        if(rex.w)
-            GD->q[0] = __builtin_popcountl(ED->q[0]);
-        else
-            GD->q[0] = __builtin_popcount(ED->word[0]);
-        RESET_FLAGS(emu);
-        CLEAR_FLAG(F_OF);
-        CLEAR_FLAG(F_SF);
-        CLEAR_FLAG(F_AF);
-        CLEAR_FLAG(F_CF);
-        CLEAR_FLAG(F_PF);
-        CONDITIONAL_SET_FLAG(GD->q[0]==0, F_ZF);
-        break;
-
     default:
         return 0;
     }