[U-Boot] [PATCH] ppc4xx: Enable support for 64bit printf on all PPC4xx variants
Jerry Van Baren
gvb.uboot at gmail.com
Thu Jul 9 00:18:54 CEST 2009
Scott Wood wrote:
> Wolfgang Denk wrote:
>>>> I hope we don't have any more such #defines hidden in other header
>>>> files?
>>> I vote for completely removing these defines then (or at least
>>> CONFIG_SYS_64BIT_VSPRINTF) and by this enabling the 64bit printf format for
>>> all boards. I myself have hunted problems disguised by incorrect 64bit
>> I don't want this because of the memory footprint.
[snip]
> There could also be some warning from printf() if %ll
> is used when not supported, and/or it could still check for %ll and pop
> a long long from the varargs but discard the high half.
>
> -Scott
Regardless of the in/out debate, we should print a warning if %ll is
used but not supported. I would suggest simply printing the "%lld" (or
whatever the format is) and pop two longs from the varargs. That would
make it clear something is missing and probably wrong.
I don't like printing half and discarding half: it will be erroneous
with no warning if the upper half != 0. It would also have endian
complications since the half you want to discard depends on the
machine's endianness (not insurmountable).
One possible enhancement is to special-case %ll[0-9]*[Xx] and treat it
as as two %08lx formats. Hmmm, this would need correct endian handling
too. :-/
Best regards,
gvb
More information about the U-Boot
mailing list