sparc-rtems4.7-gcc versus fpu

Ralf Corsepius ralf.corsepius at rtems.org
Tue Jun 12 16:39:53 UTC 2007


On Tue, 2007-06-12 at 09:07 -0500, Joel Sherrill wrote:
> Peter A. Krauss wrote:
> >
> > Hello,
> >
> > I have downloaded sparc-rtems4.7 and would like to use it for a leon2 
> > target with fpu. I am puzzled on how the compiler inserts fpu 
> > instructions. My summary is:
> >
> > - The compiler does insert fpu instructions, if no fpu command line 
> > option is given or if "-mhard-quad-float" is used.
> >
> > - The compiler does not insert fpu instructions, if "-mfpu" or 
> > "-mhard-float" is used.
> >
> > Why?
> It would take a gcc expert to answer for sure but I recall a recent
> discussion on the gcc list which sounds like it is happening here.
> I suspect that since hard FPU is the default, -mfpu is toggling the
> default and turning it into soft float.
> 
> I tried this with gcc 4.2.0 and got your behavior.  I tried it with
> the RTEMS 4.6 gcc 3.2.3 and it still generated hardware FPU instructions.
> 
> Can you send this report to gcc AT gcc.gnu.org and CC me?  I think
> someone over there will have a better answer.

FWI: -msoft-float is supposed not to produce fpu instructions for
sparc-rtems4.8-gcc. If this doesn't work, something is borked somewhere.

Ralf





More information about the users mailing list