RES: about SPARC_HAS_FPU = 1

Fabrício de Novaes Kucinskis fabricio at
Tue Oct 28 13:00:02 UTC 2008

Maybe I'm missing something, but I looked at my erc32.cfg file (RTEMS
4.8.1), and there is no -msoft-float flag on CPU_FLAGS. Only "CPU_FLAGS =

So I have two questions:

1) If I understood it correctly, currently (I'm not talking about a future
patch here) we should set the -msoft-float flag to avoid the use of the
floating point registers in integer operations by gcc. Is it right?

2) Reading a 2006 discussion
[] I noticed that
the flag was on the version of erc32.cfg (RTENS 4.6.6). Why it was


-----Mensagem original-----
De: rtems-users-bounces at [mailto:rtems-users-bounces at] Em
nome de Jiri Gaisler
Enviada em: sábado, 25 de outubro de 2008 18:54
Para: rtems-users at
Assunto: Re: about SPARC_HAS_FPU = 1

There has been some new development on this issue. We have
made a small patch to gcc to avoid emitting FPU instructions for
integer code. This was actually done in the frame of using gcc for a
SPARC/LEON port of VxWorks-6.x, but is applicable to RTEMS as well.

I would suggest that we include this patch to the rtems-gcc tool chain,
and then we can compile the kernel using the regular (multi-lib) flags
rather than always using -msoft-float.


>> Yes, i am referring to the statement
>> #define SPARC_HAS_FPU 1
>> My understanding is that if the kernel is compiled with -msoft-float then
>> have
>> #define SPARC_HAS_FPU 0 (from the header file
>> cpukit/score/cpu/sparc/rtems/score/sparc.h)
>> and then both symbols CPU_HARDWARE_FP and CPU_SOFTWARE_FP are FALSE.
> [snip]
> As Jiri said, SPARC_HAS_FPU should be always set, and this is
> currently not true. I guess someone should change/review that.
> Aleix

rtems-users mailing list
rtems-users at

More information about the users mailing list