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


Am Samstag, den 16.01.2010, 23:14 +0000 schrieb Paul Brook:
> > >  > 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)?
> > >
> > >  To absolutely prevent use of FPRs, one must use -msoft-float.  The
> > >  hard-float and soft-float ABIs are incompatible and one cannot mix
> > >  object files.
> > 
> > There is a third option -mfloat-abi=softfp which stipulates that FP
> > instructions can be used within functions but the parameter and return
> > values are passed using the same conventions as soft float. soft and
> > softfp-compiled files can be linked together, allowing you to mix code
> > using FP instructions and not with source file granularity.
> 
> That's completely the opposite. mfloat-abi=softfp tells gcc to use FPU 
> instructions while conforming to a nominally soft-float ABI.
> 
> The OP wants the opposite: Conform to a hard-float ABI without actually using 
> FPU instructions. It is (in thory) possible to do this in a half-sane way, 
> however it's also easy to end up with something very fragile that breaks more 
> often than it works.

If the whole source file does not need to use fp, could you get the
intended effect using -ffixed-REG for all FP registers?


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