mirror of
https://github.com/Motorhead1991/qemu.git
synced 2026-01-06 14:37:42 -07:00
target/arm: Assert thumb pc is aligned
Misaligned thumb PC is architecturally impossible. Assert is better than proceeding, in case we've missed something somewhere. Expand a comment about aligning the pc in gdbstub. Fail an incoming migrate if a thumb pc is misaligned. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
ee03027a2c
commit
7055fe4baf
3 changed files with 20 additions and 2 deletions
|
|
@ -794,6 +794,16 @@ static int cpu_post_load(void *opaque, int version_id)
|
|||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Misaligned thumb pc is architecturally impossible.
|
||||
* We have an assert in thumb_tr_translate_insn to verify this.
|
||||
* Fail an incoming migrate to avoid this assert.
|
||||
*/
|
||||
if (!is_a64(env) && env->thumb && (env->regs[15] & 1)) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!kvm_enabled()) {
|
||||
pmu_op_finish(&cpu->env);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue