about summary refs log tree commit diff stats
path: root/src/emu
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2022-05-03 09:57:47 +0200
committerptitSeb <sebastien.chev@gmail.com>2022-05-03 09:57:47 +0200
commit59e367a88e3569b7bb470cf796df0f86e5207b1a (patch)
treea7167492a1be056cbda2165153ddf5b30892799a /src/emu
parent098317ed29038cf93d891ef74fe43d409e8aef9d (diff)
downloadbox64-59e367a88e3569b7bb470cf796df0f86e5207b1a.tar.gz
box64-59e367a88e3569b7bb470cf796df0f86e5207b1a.zip
Added and fixed opcodes 66 0F 38 38..3F ([DYNAREC] too) (for #299)
Diffstat (limited to 'src/emu')
-rw-r--r--src/emu/x64run660f.c43
1 files changed, 41 insertions, 2 deletions
diff --git a/src/emu/x64run660f.c b/src/emu/x64run660f.c
index ac255a0f..e3b71d4b 100644
--- a/src/emu/x64run660f.c
+++ b/src/emu/x64run660f.c
@@ -477,6 +477,14 @@ int Run660F(x64emu_t *emu, rex_t rex)
                     GX->q[i] = EX->ud[i];

                 break;

 

+            case 0x38:  /* PMINSB Gx, Ex */

+                nextop = F8;

+                GETEX(0);

+                GETGX;

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

+                    if(GX->sb[i]>EX->sb[i])

+                        GX->sb[i] = EX->sb[i];

+                break;

             case 0x39:  /* PMINSD Gx, Ex */

                 nextop = F8;

                 GETEX(0);

@@ -490,10 +498,25 @@ int Run660F(x64emu_t *emu, rex_t rex)
                 GETEX(0);

                 GETGX;

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

-                    if(GX->uw[i]<EX->uw[i])

+                    if(GX->uw[i]>EX->uw[i])

                         GX->uw[i] = EX->uw[i];

                 break;

-

+            case 0x3B:  /* PMINUD Gx, Ex */

+                nextop = F8;

+                GETEX(0);

+                GETGX;

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

+                    if(GX->ud[i]>EX->ud[i])

+                        GX->ud[i] = EX->ud[i];

+                break;

+            case 0x3C:  /* PMAXSB Gx, Ex */

+                nextop = F8;

+                GETEX(0);

+                GETGX;

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

+                    if(GX->sb[i]<EX->sb[i])

+                        GX->sb[i] = EX->sb[i];

+                break;

             case 0x3D:  /* PMAXSD Gx, Ex */

                 nextop = F8;

                 GETEX(0);

@@ -502,6 +525,22 @@ int Run660F(x64emu_t *emu, rex_t rex)
                     if(GX->sd[i]<EX->sd[i])

                         GX->sd[i] = EX->sd[i];

                 break;

+            case 0x3E:  /* PMAXUW Gx, Ex */

+                nextop = F8;

+                GETEX(0);

+                GETGX;

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

+                    if(GX->uw[i]<EX->uw[i])

+                        GX->uw[i] = EX->uw[i];

+                break;

+            case 0x3F:  /* PMAXUD Gx, Ex */

+                nextop = F8;

+                GETEX(0);

+                GETGX;

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

+                    if(GX->ud[i]<EX->ud[i])

+                        GX->ud[i] = EX->ud[i];

+                break;

 

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

                 nextop = F8;