vfprintf.c patch

Joel Sherrill joel.sherrill@OARcorp.com
Fri Dec 1 09:32:00 GMT 2000


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


More information about the Newlib mailing list