[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [Qemu-commits] [COMMIT 968a40f] microblaze: Trap on una
From: |
Blue Swirl |
Subject: |
[Qemu-devel] Re: [Qemu-commits] [COMMIT 968a40f] microblaze: Trap on unaligned data accesses. |
Date: |
Thu, 3 Sep 2009 21:10:40 +0300 |
On Thu, Sep 3, 2009 at 2:11 PM, Anthony Liguori<address@hidden> wrote:
> From: Edgar E. Iglesias <address@hidden>
> +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.
- [Qemu-devel] Re: [Qemu-commits] [COMMIT 968a40f] microblaze: Trap on unaligned data accesses.,
Blue Swirl <=