This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: sh-unknown-linux-gnu (Support of no fdiv for integer division)
- To: NIIBE Yutaka <gniibe at m17n dot org>
- Subject: Re: sh-unknown-linux-gnu (Support of no fdiv for integer division)
- From: "William C. Cox" <bcox at windriver dot com>
- Date: Wed, 03 Oct 2001 06:12:12 -0700
- cc: Stephen Clarke <Stephen dot Clarke at st dot com>, gcc-patches at gcc dot gnu dot org, kkojima at rr dot iij4u dot or dot jp
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.
--