* [Qemu-devel] Re: [Qemu-commits] [COMMIT 968a40f] microblaze: Trap on unaligned data accesses.
[not found] <200909031110.n83BAwuM023891@d03av03.boulder.ibm.com>
@ 2009-09-03 18:10 ` Blue Swirl
2009-09-03 20:01 ` Edgar E. Iglesias
0 siblings, 1 reply; 2+ messages in thread
From: Blue Swirl @ 2009-09-03 18:10 UTC (permalink / raw)
To: Edgar E. Iglesias; +Cc: qemu-devel
On Thu, Sep 3, 2009 at 2:11 PM, Anthony Liguori<aliguori@us.ibm.com> wrote:
> From: Edgar E. Iglesias <edgar.iglesias@gmail.com>
> +void helper_memalign(uint32_t addr, uint32_t dr, uint32_t wr, uint32_t size)
> +{
> + uint32_t mask;
> +
> + switch (size) {
> + case 4: mask = 3; break;
> + case 2: mask = 1; break;
> + default:
> + case 1: mask = 0; break;
> + }
For additional performance (and to avoid the check for mask == 0 case
;-)), you could perform most of the math above during translation.
Sparc32 actually avoids most of these explicit tests, but I still
can't understand Fabrice's magic that made it possible.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Qemu-devel] Re: [Qemu-commits] [COMMIT 968a40f] microblaze: Trap on unaligned data accesses.
2009-09-03 18:10 ` [Qemu-devel] Re: [Qemu-commits] [COMMIT 968a40f] microblaze: Trap on unaligned data accesses Blue Swirl
@ 2009-09-03 20:01 ` Edgar E. Iglesias
0 siblings, 0 replies; 2+ messages in thread
From: Edgar E. Iglesias @ 2009-09-03 20:01 UTC (permalink / raw)
To: Blue Swirl; +Cc: Edgar E. Iglesias, qemu-devel
On Thu, Sep 03, 2009 at 09:10:40PM +0300, Blue Swirl wrote:
> On Thu, Sep 3, 2009 at 2:11 PM, Anthony Liguori<aliguori@us.ibm.com> wrote:
> > From: Edgar E. Iglesias <edgar.iglesias@gmail.com>
>
> > +void helper_memalign(uint32_t addr, uint32_t dr, uint32_t wr, uint32_t size)
> > +{
> > + uint32_t mask;
> > +
> > + switch (size) {
> > + case 4: mask = 3; break;
> > + case 2: mask = 1; break;
> > + default:
> > + case 1: mask = 0; break;
> > + }
>
> For additional performance (and to avoid the check for mask == 0 case
> ;-)), you could perform most of the math above during translation.
Thanks, I beleive part of what you say is already done. The case 1
is there for completeness but translate.c doesn't call the helper for
size 1.
I'll move the computing of the mask into translate.c.
Thanks,
Edgar
>
> Sparc32 actually avoids most of these explicit tests, but I still
> can't understand Fabrice's magic that made it possible.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-09-03 20:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <200909031110.n83BAwuM023891@d03av03.boulder.ibm.com>
2009-09-03 18:10 ` [Qemu-devel] Re: [Qemu-commits] [COMMIT 968a40f] microblaze: Trap on unaligned data accesses Blue Swirl
2009-09-03 20:01 ` Edgar E. Iglesias
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.