diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2024-06-24 20:32:16 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2024-06-24 20:32:16 +0200 |
| commit | aeeb9b719ac586c9b741bb2167bda27960bd002b (patch) | |
| tree | c4f09d231b4e48dc04a6b41502da6663f283c080 /src/core.c | |
| parent | 36f1808615813e85b05c9460d7dd481c4bc20de0 (diff) | |
| download | box64-aeeb9b719ac586c9b741bb2167bda27960bd002b.tar.gz box64-aeeb9b719ac586c9b741bb2167bda27960bd002b.zip | |
[COSIM] Added range handling in BOX64_DYNAREC_TEST ([RCFILE] too)
Diffstat (limited to 'src/core.c')
| -rw-r--r-- | src/core.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/core.c b/src/core.c index 88a14416..3149f0b6 100644 --- a/src/core.c +++ b/src/core.c @@ -87,6 +87,8 @@ int box64_dynarec_missing = 0; int box64_dynarec_aligned_atomics = 0; uintptr_t box64_nodynarec_start = 0; uintptr_t box64_nodynarec_end = 0; +uintptr_t box64_dynarec_test_start = 0; +uintptr_t box64_dynarec_test_end = 0; #ifdef ARM64 int arm64_asimd = 0; int arm64_aes = 0; @@ -832,7 +834,22 @@ void LoadLogEnv() if(strlen(p)==1) { if(p[0]>='0' && p[0]<='2') box64_dynarec_test = p[0]-'0'; + box64_dynarec_test_start = 0x0; + box64_dynarec_test_end = 0x0; + } else if (strchr(p,'-')) { + if(sscanf(p, "%ld-%ld", &box64_dynarec_test_start, &box64_dynarec_test_end)!=2) { + if(sscanf(p, "0x%lX-0x%lX", &box64_dynarec_test_start, &box64_dynarec_test_end)!=2) + sscanf(p, "%lx-%lx", &box64_dynarec_test_start, &box64_dynarec_test_end); + } + if(box64_dynarec_test_end>box64_dynarec_test_start) { + box64_dynarec_test = 1; + printf_log(LOG_INFO, "Dynarec test in the range %p - %p\n", (void*)box64_nodynarec_start, (void*)box64_nodynarec_end); + } else { + box64_dynarec_test = 0; + printf_log(LOG_INFO, "Ignoring BOX64_NODYNAREC=%s (%p-%p)\n", p, (void*)box64_nodynarec_start, (void*)box64_nodynarec_end); + } } + if(box64_dynarec_test) { box64_dynarec_fastnan = 0; box64_dynarec_fastround = 0; |