about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2024-01-30 18:59:03 +0100
committerptitSeb <sebastien.chev@gmail.com>2024-01-30 18:59:03 +0100
commitd3b5553433f1ddec2978d201a2046e6a7bd33813 (patch)
treec0c5520f646eafabeb81d9252dd5d985680b4c87 /src
parentb8856af18c6e9a3589c620b52020f2e93043b3ee (diff)
downloadbox64-d3b5553433f1ddec2978d201a2046e6a7bd33813.tar.gz
box64-d3b5553433f1ddec2978d201a2046e6a7bd33813.zip
[RV64_DYNAREC] Fixed 0F AF 32bits (for #1210)
Diffstat (limited to 'src')
-rw-r--r--src/dynarec/rv64/dynarec_rv64_0f.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/dynarec/rv64/dynarec_rv64_0f.c b/src/dynarec/rv64/dynarec_rv64_0f.c
index ec2b7ae9..e09e5347 100644
--- a/src/dynarec/rv64/dynarec_rv64_0f.c
+++ b/src/dynarec/rv64/dynarec_rv64_0f.c
@@ -1360,6 +1360,15 @@ uintptr_t dynarec64_0F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni
                 // 32bits imul
                 UFLAG_IF
                 {
+                    SLLI(gd, gd, 32);
+                    SRAI(gd, gd, 32);
+                    if(MODREG) {
+                        SLLI(x1, ed, 32);
+                        ed = x1;
+                    } else {
+                        SLLI(ed, ed, 32);
+                    }
+                    SRAI(ed, ed, 32);
                     MUL(gd, gd, ed);
                     UFLAG_RES(gd);
                     SRLI(x3, gd, 32);