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)


gniibe@m17n.org wrote:
> 
> Stephen Clarke wrote:
>  > Just curious, why was -m4-nofpu not adequate for this?
> 
> I've thought (misunderstood) and have been using -m4-nofpu with
> modification of specs (replace __SH3__ to __sh4__).  However, the flag
> -m4-nofpu is *not* for SH4.  It defines __SH3__ which is *not* a
> mistake.

One problem with -mno-fdiv-divsi is that it may be too specific
for your purpose.

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.

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.
Though things would be far less confusing if this is what "-m4-nofpu"
actually meant...

Steve.
-- 
Stephen Clarke, Principal Engineer, SuperH Inc.
Phone:1-408-922-4062, Fax:1-408-954-8507, mailto:Stephen.Clarke@st.com
Mail:  SuperH Inc., 3801 Zanker Rd., San Jose, CA 95134, USA.


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