about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorYang Liu <liuyang22@iscas.ac.cn>2024-08-09 19:31:58 +0800
committerGitHub <noreply@github.com>2024-08-09 13:31:58 +0200
commit4407a1755106e56b7172c418e8cd8c0e4be6bf6e (patch)
tree0ef623e96b334484dffd34ae5813f5d7fb9c7e01 /src
parentc7d6395aa65bece255ac8cfa19e04736baa85085 (diff)
downloadbox64-4407a1755106e56b7172c418e8cd8c0e4be6bf6e.tar.gz
box64-4407a1755106e56b7172c418e8cd8c0e4be6bf6e.zip
[RV64_DYNAREC] Fixed fpu_flags handling and enabled cosim in CI (#1722)
* [RV64_DYNAREC] Fixed fpu_flags handling

* repeat until-pass
Diffstat (limited to 'src')
-rw-r--r--src/dynarec/rv64/dynarec_rv64_helper.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/dynarec/rv64/dynarec_rv64_helper.c b/src/dynarec/rv64/dynarec_rv64_helper.c
index 3461cec0..3d96dbc2 100644
--- a/src/dynarec/rv64/dynarec_rv64_helper.c
+++ b/src/dynarec/rv64/dynarec_rv64_helper.c
@@ -1160,6 +1160,8 @@ static void x87_unreflectcache(dynarec_rv64_t* dyn, int ninst, int s1, int s2, i
         ADDI(s2, s2, a);
         ANDI(s2, s2, 7);
         SW(s2, xEmu, offsetof(x64emu_t, top));
+        // update tags
+        LH(s1, xEmu, offsetof(x64emu_t, fpu_tags));
         if(a>0) {
             SLLI(s3, xMASK, 16);    // 0xffff0000
             OR(s1, s1, s3);
@@ -1167,6 +1169,7 @@ static void x87_unreflectcache(dynarec_rv64_t* dyn, int ninst, int s1, int s2, i
         } else {
             SLLI(s1, s1, -a*2);
         }
+        SH(s1, xEmu, offsetof(x64emu_t, fpu_tags));
     }
 }