sparc-rtems4.7-gcc versus fpu
joel.sherrill at oarcorp.com
Tue Jun 12 16:59:34 UTC 2007
Ralf Corsepius wrote:
> On Tue, 2007-06-12 at 09:07 -0500, Joel Sherrill wrote:
>> Peter A. Krauss wrote:
>>> 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.
>> 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.
If I followed the question correctly, -mcpu=cypress -mfpu should
still produce hardware FPU code, but doesn't. It appears that
-mfpu is not toggling the FPU code generation bit not setting it.
More information about the users