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: GCC floating point usage


On Tue, Oct 15, 2002 at 05:20:07PM -0700, Mike Stump wrote:
> A routine that is compiled with no-implicit-fp is valid to use in a 
> no-FP task, provided there is no explicit fp in it.  A routine that 
> isn't compiled with this flag isn't valid to use in a non-FP task.

No, that's not correct.

A routine that doesn't use FP is valid to use in a no-FP task.

A routine that does use explicit fp is not valid to use in a no-FP task.


I think that the proper solution to this to have a mode in which
the compiler does not *prefer* to use FP registers for integral
data.  But the assembler would set a bit if any FP registers are
used, which would then be collected by the linker to indicate
whether or not the process as a whole uses FP registers.

In this way, if gcc does happen to use an FP register, due to
queer register pressure/preferencing, then we're still ok, because
the process *is* marked as an FP process.

Anything less is asking for trouble.

The only other solution is to use -msoft-float.  The argument that
that changes calling conventions is nonsense -- given that this 
is supposed to be a no-FP process, we've already established that
we're not supposed to be using FP whatsoever.



r~


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