about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorYang Liu <liuyang22@iscas.ac.cn>2024-08-25 02:24:57 +0800
committerYang Liu <liuyang22@iscas.ac.cn>2024-08-25 02:24:57 +0800
commitc7b2a5f2df98f0914c6536cda02c7b6c158492d7 (patch)
tree2cc2c271c17b3cdbb8a25bba4a41fbbd84bd24d5 /src
parentb9cbd29bc4edeab190c71ab1ebc4b3592e3dbd53 (diff)
downloadbox64-c7b2a5f2df98f0914c6536cda02c7b6c158492d7.tar.gz
box64-c7b2a5f2df98f0914c6536cda02c7b6c158492d7.zip
More fixes
Diffstat (limited to 'src')
-rw-r--r--src/dynarec/rv64/dynarec_rv64_functions.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dynarec/rv64/dynarec_rv64_functions.c b/src/dynarec/rv64/dynarec_rv64_functions.c
index cc2d2ea7..37b81c09 100644
--- a/src/dynarec/rv64/dynarec_rv64_functions.c
+++ b/src/dynarec/rv64/dynarec_rv64_functions.c
@@ -415,7 +415,7 @@ void extcacheUnwind(extcache_t* cache)
     if(cache->news) {
         // remove the newly created extcache
         for(int i=0; i<24; ++i)
-            if(cache->news&(1<<i))
+            if((cache->news&(1<<i)) && !cache->olds[i].changed)
                 cache->extcache[i].v = 0;
         cache->news = 0;
     }
@@ -432,7 +432,7 @@ void extcacheUnwind(extcache_t* cache)
                 cache->extcache[i].t = EXT_CACHE_SD;
 
             if (cache->olds[i].purged)
-                cache->extcache[i].n = cache->olds[i].reg;
+                cache->extcache[i].n = i;
         }
     }