This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: compiling new-lib


Jens-Christian Lache wrote:
> 
> Does anybody know if the files from new-lib get compiled
> with optimization -O2 turned on by default?
> 
> If I do a doublexdouble - multiplikation (64x64) on a ARM7TDMI proc,
> I get times of 1160 Clock-Ticks per multiplikation.
> 
> Jens-Christian
> 
> --
> 
> Jens-Christian Lache
> Technische Universitaet Hamburg-Harburg
> www.tu-harburg.de/~sejl1601
> Mail:
> lache@tu-harburg.de
> lache@ngi.de
> Tel.:
> +0491759610756

The default target flags are "-g -O2".  This does not affect multiplication, however.
Code for the multiplication of doubles is part of the compiler.  

What options did you specify when compiling?  If your chip supports floating point, you 
want to specify the -mhard-float option when you compile and link.  Linking via gcc allows
you to specify this option so that the correct newlib library is linked in.

You should also note that the default newlib math library uses integer math.  If
you want newlib to use floating-point algorithms, then configure with --enable-newlib-hw-fp.

-- Jeff Johnston

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]