This is the mail archive of the gcc-patches@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]

Re: sh-unknown-linux-gnu (Support of no fdiv for integer division)


Hi Folks,

We have the same issue with the PowerPC GNU compiler, which uses
floating-point registers to move 64-bit data items around.  Our
proposed name for the option that would prevent this "optimization"
is '-mno-implicit-fp'.  What do you think?

Stephen Clarke wrote:
 > One problem with -mno-fdiv-divsi is that it may be too specific
 > for your purpose.

NIIBE Yukata wrote:

> Well, it's OK for me to change the name of option and extend the
> semantics.  Yes, my point is we need some option for not using
> FPU unexpectedly.
> 
> -mno-fpu-for-integer?

 > If gcc were modified to use the fpu for another reason (say
 > to take advantage of fast 64 bit load and store) then that could break
 > the Linux kernel because -mno-fdiv-divsi would not disable it.

After all, I think that such a implementation is questionable.  It
surprises programmer.

 > It would be safer if the Linux kernel used an option which
 > meant "generate code for the SH4 without touching floating-point
 > state", even if this is a different option than the "-m4-nofpu" option.

I think that what we need is:
	Generate code for SH4 without touching FPU,
	if we only do interger arithmetic.
-- 


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