about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2021-06-14 11:09:10 +0200
committerptitSeb <sebastien.chev@gmail.com>2021-06-14 11:09:10 +0200
commit1d31bf699f6af3e8fdc214dad7d94f9bc3708781 (patch)
tree76697314030cab668bfff2b74c899f60adc18be3 /src
parentc62728f44f1bc698bb41c0c7f9dad5c8bbc40a23 (diff)
downloadbox64-1d31bf699f6af3e8fdc214dad7d94f9bc3708781.tar.gz
box64-1d31bf699f6af3e8fdc214dad7d94f9bc3708781.zip
Added 66 0F 38 20..25 SSE4 opcodes ([DYNAREC] too)
Diffstat (limited to 'src')
-rwxr-xr-xsrc/dynarec/dynarec_arm64_660f.c47
-rw-r--r--src/emu/x64run660f.c45
2 files changed, 91 insertions, 1 deletions
diff --git a/src/dynarec/dynarec_arm64_660f.c b/src/dynarec/dynarec_arm64_660f.c
index 25d8e6ee..45610ab0 100755
--- a/src/dynarec/dynarec_arm64_660f.c
+++ b/src/dynarec/dynarec_arm64_660f.c
@@ -264,6 +264,53 @@ uintptr_t dynarec64_660F(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int n
                     SQRDMULHQ_16(q0, q0, q1);

                     break;

 

+                case 0x20:

+                    INST_NAME("PMOVSXBW Gx, Ex");  // SSE4 opcode!

+                    nextop = F8;

+                    GETEX(q1, 0);

+                    GETGX_empty(q0);

+                    SXTL_8(q0, q1);     // 8bits->16bits

+                    break;

+                case 0x21:

+                    INST_NAME("PMOVSXBD Gx, Ex");  // SSE4 opcode!

+                    nextop = F8;

+                    GETEX(q1, 0);

+                    GETGX_empty(q0);

+                    SXTL_8(q0, q1);     // 8bits->16bits

+                    SXTL_16(q0, q0);    //16bits->32bits

+                    break;

+                case 0x22:

+                    INST_NAME("PMOVSXBQ Gx, Ex");  // SSE4 opcode!

+                    nextop = F8;

+                    GETEX(q1, 0);

+                    GETGX_empty(q0);

+                    SXTL_8(q0, q1);     // 8bits->16bits

+                    SXTL_16(q0, q0);    //16bits->32bits

+                    SXTL_32(q0, q0);    //32bits->64bits

+                    break;

+                case 0x23:

+                    INST_NAME("PMOVSXWD Gx, Ex");  // SSE4 opcode!

+                    nextop = F8;

+                    GETEX(q1, 0);

+                    GETGX_empty(q0);

+                    SXTL_16(q0, q1);     // 16bits->32bits

+                    break;

+                case 0x24:

+                    INST_NAME("PMOVSXWQ Gx, Ex");  // SSE4 opcode!

+                    nextop = F8;

+                    GETEX(q1, 0);

+                    GETGX_empty(q0);

+                    SXTL_16(q0, q1);     // 16bits->32bits

+                    SXTL_32(q0, q1);     // 32bits->64bits

+                    break;

+                case 0x25:

+                    INST_NAME("PMOVSXDQ Gx, Ex");  // SSE4 opcode!

+                    nextop = F8;

+                    GETEX(q1, 0);

+                    GETGX_empty(q0);

+                    SXTL_32(q0, q1);     // 32bits->64bits

+                    break;

+

                 default:

                     DEFAULT;

             }

diff --git a/src/emu/x64run660f.c b/src/emu/x64run660f.c
index be9b29ca..3b2ad0cf 100644
--- a/src/emu/x64run660f.c
+++ b/src/emu/x64run660f.c
@@ -256,7 +256,50 @@ int Run660F(x64emu_t *emu, rex_t rex)
                     tmp32s = ((((int32_t)(GX->sw[i])*(int32_t)(EX->sw[i]))>>14) + 1)>>1;

                     GX->uw[i] = tmp32s&0xffff;

                 }

-            break;

+                break;

+

+            case 0x20:  /* PMOVSXBW Gx, Ex */

+                nextop = F8;

+                GETEX(0);

+                GETGX;

+                for(int i=7; i>=0; --i)

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

+                break;

+            case 0x21:  /* PMOVSXBD Gx, Ex */

+                nextop = F8;

+                GETEX(0);

+                GETGX;

+                for(int i=3; i>=0; --i)

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

+                break;

+            case 0x22:  /* PMOVSXBQ Gx, Ex */

+                nextop = F8;

+                GETEX(0);

+                GETGX;

+                for(int i=1; i>=0; --i)

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

+                break;

+            case 0x23:  /* PMOVSXWD Gx, Ex */

+                nextop = F8;

+                GETEX(0);

+                GETGX;

+                for(int i=3; i>=0; --i)

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

+                break;

+            case 0x24:  /* PMOVSXWQ Gx, Ex */

+                nextop = F8;

+                GETEX(0);

+                GETGX;

+                for(int i=1; i>=0; --i)

+                    GX->sq[i] = EX->sw[i];

+                break;

+            case 0x25:  /* PMOVSXDQ Gx, Ex */

+                nextop = F8;

+                GETEX(0);

+                GETGX;

+                for(int i=1; i>=0; --i)

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

+                break;

 

             default:

                 return 1;