Support MIPS64 - write correct PC register width on uc_emu_start (#2111)
* Support mips64 - write correct pc register width on uc_emu_start * Convert to UC_MODE_MIPS64 * Correctly select MIPS64 CPU model * Simple 64-bit test - check it doesn't crash * lint * Comment * Comment * Add offset when indexing cpu model, makes tests work on older python * Move test * add PC check to test * Fix test - add python version check * Use RegressTest method for assert
This commit is contained in:
7
uc.c
7
uc.c
@@ -1020,8 +1020,11 @@ uc_err uc_emu_start(uc_engine *uc, uint64_t begin, uint64_t until,
|
||||
#endif
|
||||
#ifdef UNICORN_HAS_MIPS
|
||||
case UC_ARCH_MIPS:
|
||||
// TODO: MIPS32/MIPS64/BIGENDIAN etc
|
||||
uc_reg_write(uc, UC_MIPS_REG_PC, &begin_pc32);
|
||||
if (uc->mode & UC_MODE_MIPS64) {
|
||||
uc_reg_write(uc, UC_MIPS_REG_PC, &begin);
|
||||
} else {
|
||||
uc_reg_write(uc, UC_MIPS_REG_PC, &begin_pc32);
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
#ifdef UNICORN_HAS_SPARC
|
||||
|
||||
Reference in New Issue
Block a user