SuperH: -m4-nofpu flag

Toshi Morita tm2@best.com
Fri Feb 16 15:33:00 GMT 2001


> On Feb 15, 2001, NIIBE Yutaka <gniibe@m17n.org> wrote:
> 
> > If we use sh-elf specs, this should be:
> > ------------------
> > #if defined(__SH4__) || defined(__SH4_NOFPU__)
>       || defined(__SH4_SINGLE_ONLY__) || defined(__SH4_SINGLE__)
> 
> It's a pity there's no macro defined for all SH4 variants.  How about
> defining __sh4__ on them all?  Then __sh4__ would denote ``This is a
> SH4 machine'', defined for all of -m4, -m4-single, -m4-single-only and
> -m4-nofpu, whereas __SH4__ would denote ``This is a SH4 machine with
> an single- and double-precision FPU, with double-precision assumed
> enabled at function entry and exit''.  Then, we wouldn't be changing
> the meaning of any existing preprocessor macros (I'd rather not do it;
> there may be people out there depending on it), yet it would be easy
> to tell whether the target machine is a SuperH 4 or some earlier
> machine.
> 
> -- 
> 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
> 

There is a macro, I believe.

It's __HARD_SH4__ or something like that.

This is why I hate the current SH processor identification scheme.
It's horribly confusing.

Toshi



More information about the Gcc mailing list