[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [ARM] add with PC in argument

From: Laurent Desnogues
Subject: Re: [Qemu-devel] [ARM] add with PC in argument
Date: Mon, 25 Feb 2008 18:53:07 +0100

On 2/24/08, claude vittoria <address@hidden> wrote:
>  So in qemu I don't get the same comportement. The add of lr = pc + 4
>  gives lr = pc + 8 into qemu.
>  I think that s->pc += 4 at start of disas_arm_insn alters the result.
>  Could you confirm ?
>  0x7c    add    lr, pc, #4
>  0x80    ldr    pc, =SystemInterrupt
>  0x84    ldr    r3, [sp, #PSR_OFF]  <= never executed in Qemu
>  0x88    msr    spsr_cxsf, r3        @ put cpsr in SPSR
>  0x8c    ldmia    sp, {r0-r15}^        @ restore Context

The add lr,pc,  #4 will put 0x88 into lr. As Daniel wrote, in ARM
mode, when an instruction which address is addr reads the
PC, it will read addr + 8.

Given the mutekh link you provide has no source code for ARM
(at least I couldn't find it), we can't guess where the ldr pc
jumps to.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]