This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: powerpc-eabi-gcc no implicit FPU usage


On 01/15/2010 05:42 PM, Robert Grimm wrote:
Greetings all,

I'm working with the powerpc-eabi architecture (specifically, the MPC563 processor). For some time we have been using GCC 3.4.3 and I noticed gcc generating code that makes use of the floating point registers for 64-bit integer loads and whatnot... which we don't want it to do as there are times when we disable the FPU. I'm aware of the -msoft-float option but we didn't want to use that as we only wanted it to not use FP registers in certain functions and not entire files. I was under the impression that a newer GCC wouldn't do this based on some old mailing posts I've read. I've just tried out GCC 4.4.2 and notice that the FP registers are still being used even though there is no explicit FPU usage going on in this particular part of the code.

This is a long standing issue in the RTEMS community and we don't
have a good solution.  It needs GCC to only use the FPU when you
meant to.   This is dangerous in interrupt service routines.

And I don't think mixing soft-float and hard-float in a single executable
is a good idea.

I recall that this is not a PowerPC specific issue.  I think we have seem
complaints on other architectures.  When we had a HPPA port, I know
it would do it there.

Is there a way to get GCC to only use the FPU when we explicitly want to use it (i.e. when we use doubles/floats)? Is -msoft-float my only option here? Is there any sort of #pragma that could do the same thing as -msoft-float (I didn't see one)?

We would love to see a way to not have implicit FPU usage.
Regards,
Rob Grimm

--joel sherrill RTEMS


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]