This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
egcs-1.0.2 Minor bug in sh.h
- To: egcs-bugs at cygnus dot com
- Subject: egcs-1.0.2 Minor bug in sh.h
- From: Ralf Corsepius <corsepiu at faw dot uni-ulm dot de>
- Date: Tue, 17 Mar 1998 13:27:55 +0100
- CC: tm at netcom dot com
- Reply-To: corsepiu at faw dot uni-ulm dot de
Hi,
egcs-1.0.2/gcc/config/sh/sh.h still uses the old -m flags rules, which
have changed for the snapshot branch for quile a while.
While egcs-snapshots defines __sh1__ by default, egcs-1.0.2 doesn't,
i.e. if not specifing any -m flags, egcs-snapshots implies sh1, while
egcs-1.0.2 doesn't.
>From egcs-1.0.2:
#define CPP_SPEC "%{ml:-D__LITTLE_ENDIAN__} \
%{m1:-D__sh1__} \
%{m2:-D__sh2__} \
%{m3:-D__sh3__} \
%{m3e:-D__SH3E__}"
>From egcs-980315:
#define CPP_SPEC "%{ml:-D__LITTLE_ENDIAN__} \
%{m1:-D__sh1__} \
%{m2:-D__sh2__} \
%{m3:-D__sh3__} \
%{m3e:-D__SH3E__} \
%{!m1:%{!m2:%{!m3:%{!m3e:-D__sh1__}}}}"
Therefore machine dependent sh-asm code (newlib, multilib-ed libraries)
still needs to use the ugly and broken (once a new shXX processor is
released all source code has to be edited - AFAIK sh4 is approaching!):
#if defined(__sh2__) || defined(__sh3__) || defined(__SH3E__)
/* sh[2|3|3e] code */
#else
/* sh1 code */
#endif
instead of:
#ifdef __sh1__
[...]
Ralf.
--
Ralf Corsepius
Forschungsinstitut fuer Anwendungsorientierte Wissensverarbeitung (FAW)
Helmholtzstr. 16, 89089 Ulm, Germany Tel: +49/731/501-8690
mailto:corsepiu@faw.uni-ulm.de FAX: +49/731/501-999
http://www.faw.uni-ulm.de