This is the mail archive of the
newlib@sources.redhat.com
mailing list for the newlib project.
Re: vfprintf.c patch
- To: Doug Evans <dje at transmeta dot com>
- Subject: Re: vfprintf.c patch
- From: Joel Sherrill <joel dot sherrill at OARcorp dot com>
- Date: Fri, 01 Dec 2000 11:20:25 -0600
- CC: newlib at sources dot redhat dot com
- Organization: OAR Corporation
- References: <3A27ADE9.8AC663D9@OARcorp.com> <14887.56466.497221.622279@casey.transmeta.com>
- Reply-To: joel dot sherrill at OARcorp dot com
Doug Evans wrote:
>
> Joel Sherrill writes:
> >
> > Minor modification to trick gcc into avoiding referencing
> > a floating point register unless someone really tries
> > to print a floating point number. On the PowerPC gcc
> > will save a FP register all the time without this patch.
> >
> > The ideal solution would be to break out the FP printing
> > into a separate function but that was more risky to implement.
>
> Already done, but the other way around.
> IIRC, see iprintf vs printf.
iprintf() is non-standard. This avoids modifying any
existing non-FP code to avoid unnecessarily using the FPU.
Difference in view. I just believe in the rule of least
surprise. Printing an integer, string, or character should
not require FPU operations.
--
Joel Sherrill, Ph.D. Director of Research & Development
joel@OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985