about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2021-03-05 14:20:35 +0100
committerptitSeb <sebastien.chev@gmail.com>2021-03-05 14:20:35 +0100
commit9991c213c1685667d11982c60d28e791edf3e54d (patch)
tree0040b7118e0caf5787c80b8820e1a18c62791c02 /src
parent8044aa44fed24da92356f5f625e896cb9cde32a1 (diff)
downloadbox64-9991c213c1685667d11982c60d28e791edf3e54d.tar.gz
box64-9991c213c1685667d11982c60d28e791edf3e54d.zip
Added REX 69 IMUL opcode
Diffstat (limited to 'src')
-rwxr-xr-xsrc/emu/x64run.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/emu/x64run.c b/src/emu/x64run.c
index 18e8027d..2a6c3585 100755
--- a/src/emu/x64run.c
+++ b/src/emu/x64run.c
@@ -36,14 +36,9 @@ int Run(x64emu_t *emu, int step)
     reg64_t *oped, *opgd;
     uint8_t tmp8u, tmp8u2;
     int8_t tmp8s;
-    uint16_t tmp16u, tmp16u2;
-    int16_t tmp16s;
-    uint32_t tmp32u, tmp32u2, tmp32u3;
-    uint64_t tmp64u, tmp64u2, tmp64u3;
-    int32_t tmp32s, tmp32s2;
-    int64_t tmp64s, tmp64s2;
-    double d;
-    float f;
+    uint32_t tmp32u;
+    uint64_t tmp64u;
+    int32_t tmp32s;
     rex_t rex;
     int unimp = 0;
 
@@ -243,6 +238,16 @@ x64emurun:
         case 0x68:                      /* Push Id */
             Push(emu, F32S64);
             break;
+        case 0x69:                      /* IMUL Gd,Ed,Id */
+            nextop = F8;
+            GETED;
+            GETGD;
+            tmp64u = F32S64;
+            if(rex.w)
+                GD->q[0] = imul64(emu, ED->q[0], tmp64u);
+            else
+                GD->dword[0] = imul32(emu, ED->dword[0], tmp64u);
+            break;
 
         GOCOND(0x70
             ,   tmp8s = F8S; CHECK_FLAGS(emu);