diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2023-03-27 23:21:36 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2023-03-27 23:21:36 +0200 |
| commit | 9f75f28e7a464734bab8e719c1a60178280b224d (patch) | |
| tree | 6c7d9c2d1e1c4d307e7acfbcbf92b04c7e83dea1 /src/include | |
| parent | feb4a394577ea152b60393875860c551a7573adf (diff) | |
| download | box64-9f75f28e7a464734bab8e719c1a60178280b224d.tar.gz box64-9f75f28e7a464734bab8e719c1a60178280b224d.zip | |
[DYNAREC] Added BOX64_DYNAREC_TEST to run interpeter and dynarec at the same time and compare states
Diffstat (limited to 'src/include')
| -rwxr-xr-x | src/include/box64context.h | 1 | ||||
| -rwxr-xr-x | src/include/debug.h | 1 | ||||
| -rwxr-xr-x | src/include/dynarec.h | 3 | ||||
| -rwxr-xr-x | src/include/x64emu.h | 1 | ||||
| -rwxr-xr-x | src/include/x64run.h | 2 |
5 files changed, 8 insertions, 0 deletions
diff --git a/src/include/box64context.h b/src/include/box64context.h index 1920bb8a..62e4bad5 100755 --- a/src/include/box64context.h +++ b/src/include/box64context.h @@ -136,6 +136,7 @@ typedef struct box64context_s { uint32_t mutex_bridge; uintptr_t max_db_size; // the biggest (in x86_64 instructions bytes) built dynablock int trace_dynarec; + pthread_mutex_t mutex_lock; // this is for the Test interpreter #endif library_t *libclib; // shortcut to libc library (if loaded, so probably yes) diff --git a/src/include/debug.h b/src/include/debug.h index e13de642..37146e02 100755 --- a/src/include/debug.h +++ b/src/include/debug.h @@ -26,6 +26,7 @@ extern int box64_dynarec_bleeding_edge; extern int box64_dynarec_hotpage; extern int box64_dynarec_fastpage; extern int box64_dynarec_wait; +extern int box64_dynarec_test; #ifdef ARM64 extern int arm64_asimd; extern int arm64_aes; diff --git a/src/include/dynarec.h b/src/include/dynarec.h index a68c6d6a..c304cf1e 100755 --- a/src/include/dynarec.h +++ b/src/include/dynarec.h @@ -5,4 +5,7 @@ typedef struct x64emu_s x64emu_t; void DynaCall(x64emu_t* emu, uintptr_t addr); // try to use DynaRec... Fallback to EmuCall if no dynarec available +void x64test_init(x64emu_t* ref); +void x64test_check(x64emu_t* ref); + #endif // __DYNAREC_H_ \ No newline at end of file diff --git a/src/include/x64emu.h b/src/include/x64emu.h index e7efbb07..17252b68 100755 --- a/src/include/x64emu.h +++ b/src/include/x64emu.h @@ -10,6 +10,7 @@ void SetupX64Emu(x64emu_t *emu); void FreeX64Emu(x64emu_t **x64emu); void FreeX64EmuFromStack(x64emu_t **emu); void CloneEmu(x64emu_t *newemu, const x64emu_t* emu); +void CopyEmu(x64emu_t *newemu, const x64emu_t* emu); void SetTraceEmu(uintptr_t trace_start, uintptr_t trace_end); box64context_t* GetEmuContext(x64emu_t* emu); diff --git a/src/include/x64run.h b/src/include/x64run.h index 78903bbc..0e156341 100755 --- a/src/include/x64run.h +++ b/src/include/x64run.h @@ -3,7 +3,9 @@ #include <stdint.h> typedef struct x64emu_s x64emu_t; +typedef struct x64test_s x64test_t; int Run(x64emu_t *emu, int step); // 0 if run was successfull, 1 if error in x86 world +int RunTest(x64test_t *test); int DynaRun(x64emu_t *emu); uint32_t LibSyscall(x64emu_t *emu); |