[Top][All Lists]

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

Re: [Qemu-block] [PATCH v2 1/1] include: Auto-generate the sizes lookup

From: Leonid Bloch
Subject: Re: [Qemu-block] [PATCH v2 1/1] include: Auto-generate the sizes lookup table
Date: Thu, 10 Jan 2019 10:04:59 +0000


On 1/8/19 2:20 PM, Kevin Wolf wrote:
> Am 03.01.2019 um 22:33 hat Leonid Bloch geschrieben:
>> The lookup table for power-of-two sizes is now auto-generated during the
>> build, and not hard-coded into the units.h file.
>> This partially reverts commit 540b8492618eb.
>> Signed-off-by: Leonid Bloch <address@hidden>
> During a downstream review, Max found a problem with the table that we
> could fix while we're touching it:
>      Upstream: All >= S_2GiB are not valid ints.  (qemu assumes that
>      sizeof(int) == 4, right?)  So S_2GiB should be 2147483648u and all
>      above should be ...ull or better UINT64_C().

But the initial reasoning for this table was to have a pure number 
there. If there will be strings like "2147483648u/ull" or 
"UINT64_C(...)" there, they will be stringified, literally, and will 
appear as such inside the binary. If specifying the unit64 type is 
really needed, one can always use, e.g., 2 * GiB, from units.h.


reply via email to

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