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