qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Blue Swirl <blauwirbel@gmail.com>
To: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: [Qemu-devel] Re: [Qemu-commits] [COMMIT 968a40f] microblaze: Trap on unaligned data accesses.
Date: Thu, 3 Sep 2009 21:10:40 +0300	[thread overview]
Message-ID: <f43fc5580909031110r183dc85flff0c4ca4038b760d@mail.gmail.com> (raw)
In-Reply-To: <200909031110.n83BAwuM023891@d03av03.boulder.ibm.com>

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.

       reply	other threads:[~2009-09-03 18:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200909031110.n83BAwuM023891@d03av03.boulder.ibm.com>
2009-09-03 18:10 ` Blue Swirl [this message]
2009-09-03 20:01   ` [Qemu-devel] Re: [Qemu-commits] [COMMIT 968a40f] microblaze: Trap on unaligned data accesses Edgar E. Iglesias

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=f43fc5580909031110r183dc85flff0c4ca4038b760d@mail.gmail.com \
    --to=blauwirbel@gmail.com \
    --cc=edgar.iglesias@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).