diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2025-07-14 10:08:47 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2025-07-14 10:08:47 +0200 |
| commit | 0a59321106f13817fa52614a401e18abe11e3f5b (patch) | |
| tree | edd71e419f5afa8dfa6eae63de2fbd3c73e4fc40 /src | |
| parent | 0674e546e1743e2fd47c8477abe685de462f9744 (diff) | |
| download | box64-0a59321106f13817fa52614a401e18abe11e3f5b.tar.gz box64-0a59321106f13817fa52614a401e18abe11e3f5b.zip | |
Improved Volatile Metadata handling
Diffstat (limited to 'src')
| -rw-r--r-- | src/dynarec/dynarec_helper.h | 2 | ||||
| -rw-r--r-- | src/dynarec/dynarec_native_pass.c | 2 | ||||
| -rw-r--r-- | src/os/os_wine.c | 5 |
3 files changed, 7 insertions, 2 deletions
diff --git a/src/dynarec/dynarec_helper.h b/src/dynarec/dynarec_helper.h index f5fbfeee..21c0fb5a 100644 --- a/src/dynarec/dynarec_helper.h +++ b/src/dynarec/dynarec_helper.h @@ -36,7 +36,7 @@ #define STRONGMEM_LAST_WRITE 1 // The level of a barrier before the last guest memory store will be put #define STRONGMEM_SEQ_WRITE 3 // The level of a barrier at every third memory store will be put -#define STRONGMEM_LEVEL() (box64_wine && VolatileRangesContains(ip) ? 0 : BOX64DRENV(dynarec_strongmem)) +#define STRONGMEM_LEVEL() ((box64_wine && VolatileRangesContains(ip)) ? 0 : BOX64DRENV(dynarec_strongmem)) #if STEP == 1 diff --git a/src/dynarec/dynarec_native_pass.c b/src/dynarec/dynarec_native_pass.c index dcf798dd..cb7da3fb 100644 --- a/src/dynarec/dynarec_native_pass.c +++ b/src/dynarec/dynarec_native_pass.c @@ -134,7 +134,7 @@ uintptr_t native_pass(dynarec_native_t* dyn, uintptr_t addr, int alternate, int WILLWRITE(); } - int is_opcode_volatile = box64_wine && VolatileRangesContains(ip); + int is_opcode_volatile = box64_wine && VolatileRangesContains(ip) && VolatileOpcodesHas(ip); if (is_opcode_volatile && !dyn->insts[ninst].lock_prefixed && dyn->insts[ninst].will_write) DMB_ISHST(); #endif diff --git a/src/os/os_wine.c b/src/os/os_wine.c index 7034b8f0..edae6e07 100644 --- a/src/os/os_wine.c +++ b/src/os/os_wine.c @@ -196,6 +196,11 @@ int VolatileRangesContains(uintptr_t addr) return 0; } +int VolatileOpcodesHas(uintptr_t addr) +{ + return 0; +} + void PrintfFtrace(int prefix, const char* fmt, ...) { static char buf[1024] = { 0 }; |