McLaren, David A (317J) david.a.mclaren at
Mon Aug 10 16:09:07 UTC 2009


We solved this problem by removing -mhard-float from the build line, and not including -msoft-float either.  When hard-float was present, it used the software emulation.  When neither flag was present, gcc 4.1.1 started using the hardware FPU instructions as it should.

-----Original Message-----
From: Jiri Gaisler [mailto:jiri at] 
Sent: Sunday, August 09, 2009 9:02 AM
To: McLaren, David A (317J)
Cc: rtems-users at
Subject: Re: 

You could try to build the paranoia test in the sample applications.
If it also fails then your kernel configuration must be wrong somehow...


McLaren, David A (317J) wrote:
> I am having trouble using the hardware FPU for a SPARC-RTEMS target.  I understand that RTEMS is built with -msoft-float, and I followed steps on the RTEMS wiki to try to build my project with hardware FPU support.  The results of floating point calculations are coming out incorrectly-- i.e. 10000 * .9999 = X*10^-23.
> I am spawning one subtask in this manner, and no others:
>     rtems_task_create(rtems_build_name(...),
> 		      2,
> 		      &id);
> After this subtask is spawned, I suspend the init task.
> I am using RTEMS 4.8.0.  My target is the SPARC leon2.  I am also running my code for a leon3 on tsim, and getting the same behavior as I see on the leon2.
> I can tell that CPU_HARDWARE_FP is TRUE, and _SOFT_FLOAT is not defined b/c of printouts in my code.
> I followed the instructions on the RTEMS wiki on floating point support <>.  I rebuilt RTEMS 4.8.0 after commenting out the lines indicated, setting SPARC_HAS_FPU to 1.  I replaced the "-msoft-float" line with "-mhard-float" in my leon2/3.cfg files (and see it in the build line).
> I am creating the init task with the FP attribute as well:
> I am looking for something I  missed-- what else can I try?
> _______________________________________________
> rtems-users mailing list
> rtems-users at

More information about the users mailing list