about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2023-03-31 20:58:15 +0200
committerptitSeb <sebastien.chev@gmail.com>2023-03-31 20:59:38 +0200
commit9464cbcf875c3d3644dcb745bdc6e9687fa620cd (patch)
treeea152b695520fe4721ec03bbb6bf170256c54056 /src
parent4334a1985b49fcff714c7a023197d1594abeb200 (diff)
downloadbox64-9464cbcf875c3d3644dcb745bdc6e9687fa620cd.tar.gz
box64-9464cbcf875c3d3644dcb745bdc6e9687fa620cd.zip
[ARM64_DYNAREC] Fixed rounding of 66 0F 38 08/09/0A/0B opcodes
Diffstat (limited to 'src')
-rwxr-xr-xsrc/dynarec/arm64/dynarec_arm64_660f.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/dynarec/arm64/dynarec_arm64_660f.c b/src/dynarec/arm64/dynarec_arm64_660f.c
index 71ee97f2..eea7519c 100755
--- a/src/dynarec/arm64/dynarec_arm64_660f.c
+++ b/src/dynarec/arm64/dynarec_arm64_660f.c
@@ -682,9 +682,7 @@ uintptr_t dynarec64_660F(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int n
                         VFRINTISQ(q0, q1);

                         x87_restoreround(dyn, ninst, u8);

                     } else {

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

-                        MAYUSE(rounds);

-                        VFRINTRSQ(q0, q1, rounds[u8&3]);

+                        VFRINTRSQ(q0, q1, u8&3);

                     }

                     break;

                 case 0x09:

@@ -699,9 +697,7 @@ uintptr_t dynarec64_660F(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int n
                         VFRINTIDQ(q0, q1);

                         x87_restoreround(dyn, ninst, u8);

                     } else {

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

-                        MAYUSE(rounds);

-                        VFRINTRDQ(q0, q1, rounds[u8&3]);

+                        VFRINTRDQ(q0, q1, u8&3);

                     }

                     break;

                 case 0x0A:

@@ -716,9 +712,7 @@ uintptr_t dynarec64_660F(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int n
                         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]);

+                        FRINTRRS(v1, q1, u8&3);

                     }

                     VMOVeS(q0, 0, v1, 0);

                     break;

@@ -734,9 +728,7 @@ uintptr_t dynarec64_660F(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int n
                         FRINTXD(v1, q1);

                         x87_restoreround(dyn, ninst, u8);

                     } else {

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

-                        MAYUSE(rounds);

-                        FRINTRRD(v1, q1, rounds[u8&3]);

+                        FRINTRRD(v1, q1, u8&3);

                     }

                     VMOVeD(q0, 0, v1, 0);

                     break;