qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 10/21] memory: make section size a 128-bit integ


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 10/21] memory: make section size a 128-bit integer
Date: Sun, 02 Jun 2013 16:03:32 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130514 Thunderbird/17.0.6

Il 01/06/2013 00:18, Richard Henderson ha scritto:
> On 05/30/2013 02:16 PM, Paolo Bonzini wrote:
>> +static inline Int128 int128_rshift(Int128 a, int n)
>> +{
>> +    return (Int128) { (a.lo >> n) | (a.hi << (64 - n)), (a.hi >> n) };
>> +}
> 
> Produces wrong results for n == 0, since (a.hi << 64) is undefined.

Good catch, I'm adding an


    if (!n) {
        return a;
    }

before.

Paolo



reply via email to

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