From: Jerry Van Baren <gvb.uboot@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] ppc4xx: Enable support for 64bit printf on all PPC4xx variants
Date: Wed, 08 Jul 2009 18:18:54 -0400 [thread overview]
Message-ID: <4A551B4E.6010102@gmail.com> (raw)
In-Reply-To: <4A550B66.1090506@freescale.com>
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
next prev parent reply other threads:[~2009-07-08 22:18 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-06 9:48 [U-Boot] [PATCH] ppc4xx: Enable support for 64bit printf on all PPC4xx variants Stefan Roese
2009-07-06 11:17 ` Wolfgang Denk
2009-07-06 15:39 ` Stefan Roese
2009-07-08 20:01 ` Wolfgang Denk
2009-07-08 21:11 ` Scott Wood
2009-07-08 21:24 ` Wolfgang Denk
2009-07-08 21:29 ` Scott Wood
2009-07-08 21:57 ` Wolfgang Denk
2009-07-08 22:27 ` Scott Wood
2009-07-09 4:57 ` Stefan Roese
2009-07-09 7:41 ` Wolfgang Denk
2009-07-08 22:18 ` Jerry Van Baren [this message]
2009-07-08 22:27 ` Scott Wood
2009-07-09 5:00 ` Stefan Roese
2009-07-09 12:24 ` Jerry Van Baren
2009-07-09 12:48 ` Stefan Roese
2009-07-09 13:02 ` Jerry Van Baren
2009-07-09 4:54 ` Stefan Roese
2009-07-17 18:44 ` Wolfgang Denk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A551B4E.6010102@gmail.com \
--to=gvb.uboot@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox