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: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH 10/21] memory: make section size a 128-bit integer
Date: Sun, 2 Jun 2013 15:18:32 +0100

On 31 May 2013 23:18, Richard Henderson <address@hidden> wrote:
> 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.

It produces wrong results for shifts by more than 64,
for that matter.

thanks
-- PMM



reply via email to

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