On 4 September 2014 19:01, Chih-Min Chao <cmc...@gmail.com> wrote: > Don't use internal member but availabel wrapper function to > test status > > Signed-off-by: Chih-Min Chao <cmc...@gmail.com> > --- > hw/arm/boot.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/hw/arm/boot.c b/hw/arm/boot.c > index e32f2f4..26bc25f 100644 > --- a/hw/arm/boot.c > +++ b/hw/arm/boot.c > @@ -417,7 +417,7 @@ static void do_cpu_reset(void *opaque) > if (info) { > if (!info->is_linux) { > /* Jump to the entry point. */ > - if (env->aarch64) { > + if (is_a64(env)) { > env->pc = info->entry; > } else { > env->regs[15] = info->entry & 0xfffffffe; > @@ -425,7 +425,7 @@ static void do_cpu_reset(void *opaque) > } > } else { > if (CPU(cpu) == first_cpu) { > - if (env->aarch64) { > + if (is_a64(env)) { > env->pc = info->loader_start; > } else { > env->regs[15] = info->loader_start; > -- > 2.0.4
Maybe we should make the ARM set_pc CPU object methods honour the thumb bit in the PC value; then we could just call the set_pc method rather than having an if() at all. That would change the behaviour of the gdb step and continue protocol commands though, so I need to check what their behaviour is expected to be... thanks -- PMM