sparc erc32 FPU confusion

Kenneth J. Peters Kenneth.J.Peters at
Wed May 31 01:02:17 UTC 2006

I noticed that running some of the tests (sp19, tm26) on RTEMS 4.6.6 
erc32 that floating point was not tested. Digging in, I see that 
make/custom/erc32.cfg changed from 1.27 to (current version) 
as follows:

>-CPU_CFLAGS = -mcpu=cypress
>+CPU_CFLAGS = -mcpu=cypress -msoft-float
>  # optimize flag: typically -0, could use -O4 or -fast
>  # -O4 is ok for RTEMS
and this seems to be from the PR827 patch file. However, that same 
patch file has:

>diff -Naurb rtems-4.6.4/cpukit/score/cpu/sparc/rtems/score/sparc.h 
>--- rtems-4.6.4/cpukit/score/cpu/sparc/rtems/score/sparc.h 
>	2003-09-04 20:47:40.000000000 +0200
>+++ rtems-4.6.4-1.0.2/cpukit/score/cpu/sparc/rtems/score/sparc.h 
>	2005-09-12 10:56:58.000000000 +0200
>@@ -66,11 +66,7 @@
>   */
>-#if defined(_SOFT_FLOAT)
>-#define SPARC_HAS_FPU 0
>  #define SPARC_HAS_FPU 1
>  #define CPU_MODEL_NAME "w/FPU"
and this change is NOT reflected in either the 4.6.6 release version 
of sparc.h ( or the current CVS version of sparc.h (1.12)!

QUESTION 1: Should sparc.h be changed to always define SPARC_HAS_FPU 
according to the patch?

QUESTION 2: If so, are there other parts of the patch that have not 
made it into the current RTEMS package? I have not tried to figure 
this out yet.

QUESTION 3: Why the change to less optimization and -msoft-float? I 
don't see any explanation. Were there bugs found? Or can I optimize 
fully and ditch soft-float? If so, should this be changed back in the 
CVS tree and releases?

I have not looked at the leon sparc BSPs to see if this same thing is 
going on there.

Ken Peters
Ken.Peters at

More information about the users mailing list