about summary refs log tree commit diff stats
path: root/src/emu
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2023-04-08 14:50:39 +0200
committerptitSeb <sebastien.chev@gmail.com>2023-04-08 14:50:39 +0200
commit99948b601b25ff830be84fca0c3da9d605abb061 (patch)
tree3358d2f0683ea691290c51362002d1f6ba8826ef /src/emu
parent24a374500c3f0aa3579949c26fba24702ada74c8 (diff)
downloadbox64-99948b601b25ff830be84fca0c3da9d605abb061.tar.gz
box64-99948b601b25ff830be84fca0c3da9d605abb061.zip
Added 66 0F 38 07 opcode ([ARM64_DYNAREC] too)
Diffstat (limited to 'src/emu')
-rw-r--r--src/emu/x64run660f.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/emu/x64run660f.c b/src/emu/x64run660f.c
index a0f7f6ae..29f36fcd 100644
--- a/src/emu/x64run660f.c
+++ b/src/emu/x64run660f.c
@@ -357,7 +357,23 @@ uintptr_t Run660F(x64emu_t *emu, rex_t rex, uintptr_t addr)
                         GX->sd[2+i] = EX->sd[i*2+0] - EX->sd[i*2+1];

                 }

                 break;

-

+            case 0x07:  /* PHSUBSW Gx, Ex */

+                nextop = F8;

+                GETEX(0);

+                GETGX;

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

+                    tmp32s = GX->sw[i*2+0] - GX->sw[i*2+1];

+                    GX->sw[i] = (tmp32s<-32768)?-32768:((tmp32s>32767)?32767:tmp32s);

+                }

+                if(GX == EX) {

+                    GX->q[1] = GX->q[0];

+                } else {

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

+                        tmp32s = EX->sw[i*2+0] - EX->sw[i*2+1];

+                        GX->sw[4+i] = (tmp32s<-32768)?-32768:((tmp32s>32767)?32767:tmp32s);

+                    }

+                }

+                break;

             case 0x08:  /* PSIGNB Gx, Ex */

                 nextop = F8;

                 GETEX(0);