From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Date: Wed, 08 Jul 2009 17:27:04 -0500 Subject: [U-Boot] [PATCH] ppc4xx: Enable support for 64bit printf on all PPC4xx variants In-Reply-To: <4A551B4E.6010102@gmail.com> References: <1246873688-25113-1-git-send-email-sr@denx.de> <20090706111759.47700832E416@gemini.denx.de> <200907061739.33498.sr@denx.de> <20090708200123.BBAB3832E416@gemini.denx.de> <4A550B66.1090506@freescale.com> <4A551B4E.6010102@gmail.com> Message-ID: <4A551D38.4020600@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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