qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2] exec: Fix non-power-of-2 sized accesses


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH v2] exec: Fix non-power-of-2 sized accesses
Date: Fri, 16 Aug 2013 08:27:06 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8

On 08/16/2013 05:50 AM, Alex Williamson wrote:
> +    /* Size must be a power of 2 */
> +    if (l & (l - 1)) {
> +        while (l & (access_size_max - 1)) {
> +            access_size_max >>= 1;
> +        }
> +    }
> +

Why the loop at all?  x & -x extracts the lsb of x.


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]