On 1/16/10, David Edelsohn <dje....@gmail.com> wrote: > > 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. I dunno if that affects the use of FP registers to load /store 64-bit integer values as you originally described, but may be the closest you can get without modifying GCC to insert new #pragmas. M