[U-Boot] [PATCH] ppc4xx: Enable support for 64bit printf on all PPC4xx variants
Scott Wood
scottwood at freescale.com
Thu Jul 9 00:27:04 CEST 2009
Jerry Van Baren wrote:
> 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.
Better to pop a long long -- two longs will pop too much if we ever have
a 64-bit u-boot. It would be perverse to not have 64-bit printf in such
a case, but if it has to be manually selected, and only affects long
long so as to not be immediately noticed, it could easily happen.
> I don't like printing half and discarding half: it will be erroneous
> with no warning if the upper half != 0.
Yes, but it'd be less erroneous than what we have now.
> It would also have endian
> complications since the half you want to discard depends on the
> machine's endianness (not insurmountable).
Popping a long long and then casting should take care of that.
-Scott
More information about the U-Boot
mailing list