Skip to content
Snippets Groups Projects
Verified Commit 74b2508f authored by Recolic Keghart's avatar Recolic Keghart
Browse files

> Manual commit: Finished diff test

U201614531
recolic
Linux RECOLICPC 5.4.6-arch3-1 #1 SMP PREEMPT Tue, 24 Dec 2019 04:36:53 +0000 x86_64 GNU/Linux
 18:01:25 up 23:35,  1 user,  load average: 3.32, 3.11, 2.01
fea1bdde59a33e51ea8aace1826b8351a56a154
parent ee84cf0d
No related branches found
No related tags found
No related merge requests found
......@@ -69,7 +69,22 @@ void difftest_step(uint32_t eip) {
ref_difftest_exec(1);
ref_difftest_getregs(&ref_r);
// TODO: Check the registers state with the reference design.
// Check the registers state with the reference design.
// Set `nemu_state` to `NEMU_ABORT` if they are not the same.
TODO();
#define RLIB_IMPL_REG_DIFF(which) (ref_r.which xor cpu.which)
if(
RLIB_IMPL_REG_DIFF(eax) or
RLIB_IMPL_REG_DIFF(ecx) or
RLIB_IMPL_REG_DIFF(edx) or
RLIB_IMPL_REG_DIFF(ebx) or
RLIB_IMPL_REG_DIFF(esp) or
RLIB_IMPL_REG_DIFF(ebp) or
RLIB_IMPL_REG_DIFF(esi) or
RLIB_IMPL_REG_DIFF(edi) or
RLIB_IMPL_REG_DIFF(eip) or
true
) {
nemu_state = NEMU_ABORT;
}
#undef RLIB_IMPL_REG_DIFF
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment