This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][RFC] Prevent implicit FPU usage
Mark Mitchell wrote:
> Andrew Pinski wrote:
>
>
>>You still not looked at the case where GCC removes the fp calculations:
>>int f(void)
>>{
>> float f1 = 1.0;
>> return f1;
>>}
>
>
> Indeed.
>
> I think that the front ends should set a bit on FUNCTION_DECLs
> indicating whether or not they use floating point in any way; any
> attempt to do this in the gimplifier or other parts of the middle-end
> will be, at best, confusing to users.
Just to make sure I understand:
If
a) the user is compiling with -fno-implicit-fp,
and b) his/her source contains floating point operands,
and c) it happens so that a GCC front-end removes floating point operands
(e.g. folds constants),
and d) the backend may possibly use FP registers for non-FP operands,
and e) the user source contains part(s) that may take advantage of this
feature of the backend
then
we miss the opportunity to generate for these part(s) code using FP
registers, which has the potential of being $better than code using integer
registers only ?
> Your trick of marking the floating-point registers as fixed is clever; I
> think that should work.
It was suggested here http://gcc.gnu.org/ml/gcc/2002-10/msg01009.html
~velco