From: Aurelien Jarno <aurelien@aurel32.net>
To: Blue Swirl <blueswir1@hotmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH][SPARC] mem_address_not_aligned trap for unaligned PC
Date: Sun, 01 Apr 2007 19:30:40 +0200 [thread overview]
Message-ID: <460FEC40.60001@aurel32.net> (raw)
In-Reply-To: <BAY143-F172AA4126068E223E5E034FF610@phx.gbl>
Blue Swirl a écrit :
>> According to the SPARCv8 and SPARCv9 manuals, the jmpl, rett and return
>> instructions should generate a mem_address_not_aligned trap if either
>> of the low-order two bits of the target address is nonzero.
>
> This is true, but in that case alignment should be enforced for loads ands
> stores as well. The checks also incur a performance penalty for little
> advantage. Maybe the checks should be enabled only with a compile/run-time
> option.
>
I also have a patch for load/store, but openbios is doing a few
unaligned memory accesses, so the patch can't be used until openbios is
fixed.
I haven't made any benchmark, but the performance penality is probably
very small. If you look at softmmu_template.h, you will see that it only
adds a if test, while the whole function is already a few dozen of lines
long.
I would really like to see the QEMU having the same behaviour as real
hardware, this allow for example debugging SIGBUS problems in a program
without having real hardware.
--
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73
: :' : Debian developer | Electrical Engineer
`. `' aurel32@debian.org | aurelien@aurel32.net
`- people.debian.org/~aurel32 | www.aurel32.net
next prev parent reply other threads:[~2007-04-01 17:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-01 17:02 [Qemu-devel] [PATCH][SPARC] mem_address_not_aligned trap for unaligned PC Aurelien Jarno
2007-04-01 17:15 ` [Qemu-devel] [PATCH][SPARC] mem_address_not_aligned trap forunaligned PC Blue Swirl
2007-04-01 17:30 ` Aurelien Jarno [this message]
2007-04-01 20:26 ` [Qemu-devel] [PATCH][SPARC] mem_address_not_aligned trap for unaligned PC and load/store Aurelien Jarno
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=460FEC40.60001@aurel32.net \
--to=aurelien@aurel32.net \
--cc=blueswir1@hotmail.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).