about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2023-03-12 17:17:24 +0100
committerptitSeb <sebastien.chev@gmail.com>2023-03-12 17:17:24 +0100
commit089e3816a8355e082109d14867962dae0debf490 (patch)
tree0488c6e04e244ca1769d9cff754543fbc553a954 /src
parentae155324774bebe797893a0cd759306ef95c3f49 (diff)
downloadbox64-089e3816a8355e082109d14867962dae0debf490.tar.gz
box64-089e3816a8355e082109d14867962dae0debf490.zip
[ARM64_DYNAREC] Added 66 0F 3A 0A opcode
Diffstat (limited to 'src')
-rwxr-xr-xsrc/dynarec/arm64/dynarec_arm64_660f.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/dynarec/arm64/dynarec_arm64_660f.c b/src/dynarec/arm64/dynarec_arm64_660f.c
index d994f865..8119c6a3 100755
--- a/src/dynarec/arm64/dynarec_arm64_660f.c
+++ b/src/dynarec/arm64/dynarec_arm64_660f.c
@@ -631,11 +631,29 @@ uintptr_t dynarec64_660F(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int n
         case 0x3A:  // these are some more SSSE3 opcodes

             opcode = F8;

             switch(opcode) {

+                case 0x0A:

+                    INST_NAME("ROUNDSS Gx, Ex, Ib");

+                    nextop = F8;

+                    GETGX(q0, 1);

+                    GETEXSS(q1, 0, 1);

+                    u8 = F8;

+                    v1 = fpu_get_scratch(dyn);

+                    if(u8&4) {

+                        u8 = sse_setround(dyn, ninst, x1, x2, x3);

+                        FRINTXS(v1, q1);

+                        x87_restoreround(dyn, ninst, u8);

+                    } else {

+                        const uint8_t rounds[] = {0, 2, 1, 3};

+                        MAYUSE(rounds);

+                        FRINTRRS(v1, q1, rounds[u8&3]);

+                    }

+                    VMOVeS(q0, 0, v1, 0);

+                    break;

                 case 0x0B:

                     INST_NAME("ROUNDSD Gx, Ex, Ib");

                     nextop = F8;

                     GETGX(q0, 1);

-                    GETEX(q1, 0, 1);

+                    GETEXSD(q1, 0, 1);

                     u8 = F8;

                     v1 = fpu_get_scratch(dyn);

                     if(u8&4) {