No subject

McLaren, David A (317J) david.a.mclaren at
Thu Aug 6 22:29:36 UTC 2009

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:


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?

More information about the users mailing list