From: "Laurent Desnogues" <laurent.desnogues@gmail.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [ARM] add with PC in argument
Date: Mon, 25 Feb 2008 18:53:07 +0100 [thread overview]
Message-ID: <761ea48b0802250953r4304df24m7528ecd4e30d7dea@mail.gmail.com> (raw)
In-Reply-To: <47C169A0.1020705@wanadoo.fr>
On 2/24/08, claude vittoria <vittoric@wanadoo.fr> 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.
Laurent
next prev parent reply other threads:[~2008-02-25 17:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-24 12:57 [Qemu-devel] [ARM] add with PC in argument claude vittoria
2008-02-25 17:34 ` Daniel Jacobowitz
2008-02-25 17:53 ` Laurent Desnogues [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-02-26 7:55 claude vittoria
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=761ea48b0802250953r4304df24m7528ecd4e30d7dea@mail.gmail.com \
--to=laurent.desnogues@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).