[U-Boot] [PATCH v2] Use do_div from div64.h for vsprintf

Stefan Roese sr at denx.de
Thu Jul 23 10:23:44 CEST 2009


On Wednesday 22 July 2009 17:51:56 Dirk Behme wrote:
> Use do_div from div64.h for vsprintf in case of 64bit division.
> For 32bit division, do_div from div64.h can't be used as it
> needs a 64bit parameter.
>
> Signed-off-by: Dirk Behme <dirk.behme at googlemail.com>
> CC: Simon Kagstrom <simon.kagstrom at netinsight.net>

I just did some testing on the image size effect of this patch. All this is 
done on Canyonlands (PPC4xx):

a) Without 64bit printf support, without this patch
b) With 64bit printf support, without this patch
c) With 64bit printf support, with this patch

Image-type      Image-size
---------------------------
a               351028
b               352536
c               351400

So without this patch the 64bit printf support increases the image size by 
5390 bytes and with this patch by "only" 984 bytes.

So ack from me for this patch:

Acked-by: Stefan Roese <sr at denx.de>

Thanks.

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================


More information about the U-Boot mailing list