From: claude vittoria <vittoric@wanadoo.fr>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [ARM] add with PC in argument
Date: Tue, 26 Feb 2008 08:55:35 +0100 (CET) [thread overview]
Message-ID: <29936457.619721204012535292.JavaMail.www@wwinf2231> (raw)
>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.
Thanks for answer.
You are right :
cited of ARM Architecture Reference Manual
"Reading the program counter
When an instruction reads the PC, the value read depends on which instruction set it comes from:
• For an ARM instruction, the value read is the address of the instruction plus 8 bytes. Bits [1:0] of this
value are always zero, because ARM instructions are always word-aligned."
Yes MutekH is the new release, I didn't take care of the release. To find the version that I m testing (porting), http://www-asim.lip6.fr/recherche/disydent/, take disydent source and you find a directory oes where are the kernel source.
I taken a short way, I was starting of http://www.ens-lyon.fr/LIP/Pub/Rapports/RR/RR2006/RR2006-12.pdf, source http://perso.ens-lyon.fr/nicolas.fournel/projects/ARM/mutek.html.
The port has been tested with skyeyes, it seems that a bug in source or in skyeyes, I should have read the RM before to post... as often :o)
Thanks a lot again,
Claude
next reply other threads:[~2008-02-26 7:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-26 7:55 claude vittoria [this message]
-- strict thread matches above, loose matches on Subject: below --
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
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=29936457.619721204012535292.JavaMail.www@wwinf2231 \
--to=vittoric@wanadoo.fr \
--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).