Problems with floating-point support on ARM
Sebastian Huber
sebastian.huber at embedded-brains.de
Tue Oct 20 08:13:29 UTC 2009
Ralf Corsepius wrote:
> On 10/19/2009 03:53 PM, Sebastian Huber wrote:
>> Sebastian Huber wrote:
>>
>>> Ralf Corsepius wrote:
>>> [...]
>>>
>>>> Comments from other arm users? Will vfp work for your boards?
>>>>
>>> [...]
>>>
>>> No comments from other ARM users in two weeks.
>>>
>>> We should change the default floating-point model in GCC from FPA to
>>> VFP.
>>>
>>>
>> It would be nice if the RTEMS 4.10 ARM GCC could use VFP as the default
>> floating-point model. Is this the way to do it?
>>
>
> No, it isn't.
Ok, let me describe the problem. On little-endian ARM with soft-float the
floating-point support from Newlib and the tool chain is broken. You can see
this if you run the paranoia sample from the test suite or the following module
(test.c) compiled with "arm-rtems4.10-gcc -c -o test.o test.c":
#include <math.h>
#include <assert.h>
double volatile b = 1.0;
void test(void)
{
double a = scalbn(b, 2);
assert(a == 4.0);
}
--
Sebastian Huber, embedded brains GmbH
Address : Obere Lagerstr. 30, D-82178 Puchheim, Germany
Phone : +49 89 18 90 80 79-6
Fax : +49 89 18 90 80 79-9
E-Mail : sebastian.huber at embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
More information about the users
mailing list