From: Riihimaki Juha <juha.riihimaki@nokia.com>
To: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] fix ARMv7 MOV R15, xxx operation
Date: Fri, 13 Mar 2009 20:26:19 +0200 [thread overview]
Message-ID: <C6109860-5484-4A16-8CFE-13AA5E463145@nokia.com> (raw)
In-Reply-To: <761ea48b0903130813p38c369b2pedf564e7500ec04f@mail.gmail.com>
On Mar 13, 2009, at 17:13, ext Laurent Desnogues wrote:
> On Fri, Mar 13, 2009 at 3:18 PM, Riihimaki Juha
> <Juha.Riihimaki@nokia.com> wrote:
>> I suppose
>> changing the store_reg and gen_movl_reg_TN functions in
>> target-arm/translate.c to include an extra check when destination
>> is R15
>> like "if in ARM state and arch >= 7 then bx else..." might do the
>> trick more
>> generally but do you think it introduces the change in a too wide
>> scope?
>
> I'm afraid that'd be too wide as it would effect ld/st exclusive,
> gen_exception_return and gen_lookup_tb (plus iwmmxt code).
>
Thanks, that is what I thought as well. It would also have slowed down
thumb processing due to the extra check introduced in all stores to
r15 even though the changed functionality only affects arm state. I
guess then that there is no generic place where this could be easily
fixed but instead the handling of all affected commands would need to
be changed similarly to the patch that I sent for the mov command?
Seems a little bit clumsy approach to duplicate the same piece of code
in several places imho so if you have any better suggestions...
On a sidenote, I also noticed that the arm emulation currently allows
jumping to unaligned memory addresses in arm mode since it only clears
the least significant bit when storing to r15. However, since armv6
the two least significant bits should be automatically ignored. This
hasn't caused me any problems (yet) since I guess programs rarely rely
on this feature.
Juha
next prev parent reply other threads:[~2009-03-13 18:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-13 8:10 [Qemu-devel] [PATCH] fix ARMv7 MOV R15, xxx operation Riihimaki Juha
2009-03-13 11:52 ` Paul Brook
2009-03-13 14:18 ` Riihimaki Juha
2009-03-13 15:13 ` Laurent Desnogues
2009-03-13 18:26 ` Riihimaki Juha [this message]
2009-03-13 18:29 ` Paul Brook
2009-03-13 18:57 ` Riihimaki Juha
2009-03-14 13:22 ` Paul Brook
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=C6109860-5484-4A16-8CFE-13AA5E463145@nokia.com \
--to=juha.riihimaki@nokia.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).