No subject
McLaren, David A (317J)
david.a.mclaren at jpl.nasa.gov
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:
rtems_task_create(rtems_build_name(...),
2,
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_DEFAULT_MODES,
RTEMS_FLOATING_POINT,
&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 <http://www.rtems.org/wiki/index.php/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:
#define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_FLOATING_POINT
I am looking for something I missed-- what else can I try?
More information about the users
mailing list