qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] memory: use 128 bit in info mtree


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH] memory: use 128 bit in info mtree
Date: Tue, 14 Mar 2017 11:26:02 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0


On 12/03/2017 20:35, Peter Maydell wrote:
>> +
>> +static inline uint64_t int128_printf1(Int128 a)
>> +{
>> +    /* We assume 4 highest bits are clear and safe to ignore */
>> +    return (int128_gethi(a) << 4) | (int128_getlo(a) >> 60);
>> +}
>> +
>> +static inline uint64_t int128_printf2(Int128 a)
>> +{
>> +    return (int128_getlo(a) << 4) >> 4;
>> +}
> I'm confused -- I was expecting these to just
> be the two halves of the 128 bit integer to be
> printed, but they seem to be doing something
> more complicated...

Yeah, it tries to make a 16 hex-digit output unless the value doesn't
fit in 64 bits.  I'll merge peterx's patch instead.

Paolo



reply via email to

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