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)
On Oct 3, 2001, NIIBE Yutaka <gniibe@m17n.org> wrote:
> Alexandre Oliva wrote:
>> It is my understanding that this is exactly what -m4-nofpu means.
> Weird. IIRC, you said that it is for SH3 last year.
In the sense that it uses only the SH3 ISA. But my understanding is
that the ABI was supposed to be compatible with that of SH4, as long
as you don't use any floating-point types.
> Current implementation defines __sh3__ for -m4-nofpu, and the binary
> generated with -m4-nofpu is *not* compatible to the one of -m4,
> because the arguments are placed differently (when structure is
> passed).
Hmm... Yes, indeed, we seem to have a problem in PASS_IN_REG_P() and
FUNCTION_ARG() that would render structure-passing incompatible with
SH4 and compatible with SH3. This is quite unfortunate.
Joern, was this intended, or an oversight?
> The binary generated by -m4-nofpu is compatible with the one with -m3.
Which is kind of pointless, if you ask me. It means the only
difference between -m4-nofpu and -m3 is scheduling. I don't think
this was intended.
I'd much rather adjust the macros above so that -m4-nofpu has the
obvious meaning (which would unfortunately pose a binary-compatibility
problem) than introducing yet another flag. But, if we decide not to
break binary compatibility, I'd rather deprecate -m4-nofpu and
introduce say -m4-no-fpu, that uses the SH4 ABI except for FP types,
and use -m3 -mtune=sh4 to get what we currently get with -m4-nofpu.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me