This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
i960 cpu type preprocessor symbols
- To: gcc-patches at gcc dot gnu dot org
- Subject: i960 cpu type preprocessor symbols
- From: Michael Marking <marking at tatanka dot com>
- Date: Sun, 12 Dec 1999 13:39:23 -0800
This patch is submitted to correct a minor error
in the GNU C compiler
gcc-2.95.2. The error has
existed at least since egcs 1.1.
The error
affects only certain versions of the
Intel i960 processor: the i960JA,
i960JD, i960JF,
and i960RP.
The i960 version of gcc allows compatibility
with
Intel's CTOOLS using the command-line switches
-mic-compat,
-mic2.0-compat, and -mic3.0-compat.
The i960 version of gcc allows
specification of
the processor model with a switch of the form
-mxx. For
example, -mca specifies the i960CA.
When a processor model is specified,
then two
preprocessor sysmbols are defined. For example,
the command-line
switch -mca causes the symbols
__i960CA__ and __i960_CA__ to be defined.
If one of the -mic* (Intel CTOOLS) compatibility
switches is used, a
third, Intel-format symbol is
also defined. (In the case of the i960CA,
the
symbol is __i960CA.)
The error was that, for the JA, JD, JF, and
RP
versions of the processor, the Intel-format
symbols (without the
trailing underscores) were
being defined, but not the other two
symbols.
This patch, applied from the gcc-2.95.2 directory,
corrects the
problem. To apply the patch,
cd gcc-2.95.2
cat
gcc-2.95.2-patch.991211 | patch -p1
The only file affected
is
gcc-2.95.2/gcc/config/i960/i960.h.
The test program test.991211.c
illustrates the
error and demonstrates a successful fix. The
command
i960-gcc -mja test.991211.c
will fail without the fix, and will be
successful
once the patch is applied.
A ChangeLog entry is included as the
file
gcc-2.95.2-changelog.991211.
(Patch submitted 11 December 1999 by
Michael
Marking, marking@tatanka.com)
patch.tgz