diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2025-06-19 11:07:21 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2025-06-19 11:07:30 +0200 |
| commit | 725316a5386eb713438625220b561bcd3710c8bc (patch) | |
| tree | 3535222fdd3ec0c8b601df98006fa1736e9fb047 /src/core.c | |
| parent | cc9ed708379b9b03e7a9b86f040f06f178606aef (diff) | |
| download | box64-725316a5386eb713438625220b561bcd3710c8bc.tar.gz box64-725316a5386eb713438625220b561bcd3710c8bc.zip | |
[DYNACACHE] Introduced DynaCache for ARM64 (disabled by default)
Diffstat (limited to 'src/core.c')
| -rw-r--r-- | src/core.c | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/src/core.c b/src/core.c index 362ffab1..82eb20cd 100644 --- a/src/core.c +++ b/src/core.c @@ -235,11 +235,6 @@ static void displayMiscInfo() char* p; - // grab pagesize - box64_pagesize = sysconf(_SC_PAGESIZE); - if(!box64_pagesize) - box64_pagesize = 4096; - #ifdef DYNAREC if (DetectHostCpuFeatures()) PrintHostCpuFeatures(); @@ -356,6 +351,8 @@ void PrintHelp() { PrintfFtrace(0, " '-v'|'--version' to print box64 version and quit\n"); PrintfFtrace(0, " '-h'|'--help' to print this and quit\n"); PrintfFtrace(0, " '-k'|'--kill-all' to kill all box64 instances\n"); + PrintfFtrace(0, " '--dynacache-list' to list of DynaCache file and their validity\n"); + PrintfFtrace(0, " '--dynacache-clean' to remove invalide DynaCache files\n"); } void KillAllInstances() @@ -660,6 +657,7 @@ void endBox64() if(!my_context || box64_quit) return; + SerializeAllMapping(); // just to be safe // then call all the fini dynarec_log(LOG_DEBUG, "endBox64() called\n"); box64_quit = 1; @@ -683,6 +681,7 @@ void endBox64() #ifndef STATICBUILD endMallocHook(); #endif + SerializeAllMapping(); // to be safe FreeBox64Context(&my_context); #ifdef DYNAREC // disable dynarec now @@ -763,6 +762,11 @@ int initialize(int argc, const char **argv, char** env, x64emu_t** emulator, elf LoadEnvVariables(); InitializeEnvFiles(); + // grab pagesize + box64_pagesize = sysconf(_SC_PAGESIZE); + if(!box64_pagesize) + box64_pagesize = 4096; + const char* prog = argv[1]; int nextarg = 1; // check if some options are passed @@ -779,6 +783,14 @@ int initialize(int argc, const char **argv, char** env, x64emu_t** emulator, elf KillAllInstances(); exit(0); } + if(!strcmp(prog, "--dynacache-list")) { + DynaCacheList(argv[nextarg+1]); + exit(0); + } + if(!strcmp(prog, "--dynacache-clean")) { + DynaCacheClean(); + exit(0); + } // other options? if(!strcmp(prog, "--")) { prog = argv[++nextarg]; |