From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerry Van Baren Date: Wed, 08 Jul 2009 18:18:54 -0400 Subject: [U-Boot] [PATCH] ppc4xx: Enable support for 64bit printf on all PPC4xx variants In-Reply-To: <4A550B66.1090506@freescale.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> Message-ID: <4A551B4E.6010102@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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