about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2021-09-04 13:06:16 +0200
committerptitSeb <sebastien.chev@gmail.com>2021-09-04 13:06:16 +0200
commit1b8d952d8869dac83aa69beb01fb136b2cdb5b4d (patch)
treee4b15f979fc8bf7b29d878a56e2369f638ce2be5 /src
parente8e966cd802f94f6b4012c820ad590bbd78b4a55 (diff)
downloadbox64-1b8d952d8869dac83aa69beb01fb136b2cdb5b4d.tar.gz
box64-1b8d952d8869dac83aa69beb01fb136b2cdb5b4d.zip
Added 66 0F 3A 40 SSE4x opcode (for #108)
Diffstat (limited to 'src')
-rw-r--r--src/emu/x64run660f.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/emu/x64run660f.c b/src/emu/x64run660f.c
index 6d92cd5e..21256c3d 100644
--- a/src/emu/x64run660f.c
+++ b/src/emu/x64run660f.c
@@ -54,6 +54,7 @@ int Run660F(x64emu_t *emu, rex_t rex)
     int32_t tmp32s;

     uint32_t tmp32u;

     uint64_t tmp64u;

+    float tmpf;

     reg64_t *oped, *opgd;

     sse_regs_t *opex, *opgx, eax1, *opex2;

     mmx87_regs_t *opem, *opgm;

@@ -429,6 +430,19 @@ int Run660F(x64emu_t *emu, rex_t rex)
                     GX->sq[i] = EX->sd[i];

                 break;

 

+            case 0x40:  /* DPPS Gx, Ex, Ib */

+                nextop = F8;

+                GETEX(1);

+                GETGX;

+                tmp8u = F8;

+                tmpf = 0.0f;

+                for(int i=0; i<4; ++i)

+                    if(tmp8u&(1<<(i+4)))

+                        tmpf += GX->f[i]*EX->f[i];

+                for(int i=0; i<4; ++i)

+                    GX->f[i] = (tmp8u&(1<<i))?tmpf:0.0f;

+                break;

+

             case 0xDB:  /* AESIMC Gx, Ex */

                 nextop = F8;

                 GETEX(0);