compiling newlib-1.17.0 with soft floating point and soft mult and div

Jeff Johnston jjohnstn@redhat.com
Mon Jan 19 22:15:00 GMT 2009


Jon is correct.  Soft-floating point is handled by gcc.  The 
soft-floating point operations are found
in libgcc.a (e.g. __adddf3 - soft floating-point double add routine).  
When the compiler sees a C floating-point operation, it maps this 
appropriately to calls to the soft-floating-point library functions so 
you just build newlib as normal.

It's worth noting that the libm math library uses integer operations for 
most algorithms anyway.

-- Jeff J.

Jon Beniston wrote:
> Hi,
>
> I think it is actually GCC where soft FP should be added.
>
> Look at the file gcc/config/fp-bit.c and how it is used the makefile
> fragments under gcc/config/cpu/t-cpu
>
> Cheers,
> Jon 
>
> -----Original Message-----
> From: newlib-owner@sourceware.org [mailto:newlib-owner@sourceware.org] On
> Behalf Of Navid Toosizadeh
> Sent: 18 January 2009 02:53
> To: newlib@sourceware.org
> Subject: compiling newlib-1.17.0 with soft floating point and soft mult and
> div
>
>
> Greetings,
>
> My target processor does not have any support for floating point, neither
> for multiplication and division. How should I configure/build newlib-1.17.0
> to support my processor with soft floating point and soft
> multiplication/division? The processor only has integer 32-bit registers
> (r0,...,r31).
>
> Thank you,
> Navid
>
>
>   



More information about the Newlib mailing list