[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Problems with floating-point support on ARM
- Date: Thu, 10 Sep 2009 13:02:43 +0200
- From: ralf.corsepius at rtems.org (Ralf Corsepius)
- Subject: Problems with floating-point support on ARM
On 09/10/2009 11:06 AM, Sebastian Huber wrote:
> Hi,
>
> RTEMS currently supports only soft-float ARM
What makes you say so?
> The
> default floating-point model for GCC on ARM is FPA.
AFAICT, correct.
> That means (excerpt from the corresponding ARM document):
>
> Little-endian double-precision values are neither pure little-endian nor pure
> big-endian.
>
> This differs from that more recent VFP (Vectored Floatin-Point architecture).
>
> In IEEE 754 we have the following double format:
>
> least significant word (lsw): fraction [31:0]
> moast significant word (msw): sign | exponent | fraction [51:32]
>
> This will be stored in different ways:
>
> VFP LE VFP BE FPA
> lower address lsw msw msw
> higher address msw lsw lsw
>
> The important thing here is that on little-endian the msw and lsw are switched.
> Newlib does not support the FPA floating-point model on little-endian.
What is missing according to your view?
> In this
> case it produces wrong results and writes to arbitrary memory locations.
>
> A possible fix is to add the following options to the GCC configuration command
> line:
>
> --with-float=soft
> --with-fpu=vfp
>
> The VFP floating-point hardware model is not implemented in GCC,
What makes you say so?
What I see inside of the GCC source code speaks, doesn't match with your
claim.
> thus the
> hard-float multilibs have to be disabled in gcc/config/arm/t-rtems.
Let me bring this hardly readable verbosity to the point: What do you
want us to do?
Do you want us to change the default fpu to vfp instead of fpa?
Comments from other arm users? Will vfp work for your boards?
Ralf