aboutsummaryrefslogtreecommitdiff
path: root/gcc/machmode.def
diff options
context:
space:
mode:
authorZack Weinberg <zack@codesourcery.com>2002-06-10 22:35:56 +0000
committerZack Weinberg <zack@gcc.gnu.org>2002-06-10 22:35:56 +0000
commita5381466722c3597aed833ae73b17350765f6659 (patch)
tree3704f68e05aa74e7be1ef03c29f2586c2068a4d5 /gcc/machmode.def
parent852c6ec7ac379280e79ba706c60f2f1aad152f67 (diff)
downloadgcc-a5381466722c3597aed833ae73b17350765f6659.zip
gcc-a5381466722c3597aed833ae73b17350765f6659.tar.gz
gcc-a5381466722c3597aed833ae73b17350765f6659.tar.bz2
Makefile.in (MACHMODE_H): Add @extra_modes_file@.
* Makefile.in (MACHMODE_H): Add @extra_modes_file@. * configure.in: If $srcdir/config/${cpu_type}/${cpu_type}-modes.def exists, substitute its pathname as @extra_modes_file@, define EXTRA_MODES_FILE to be an appropriate string to #include it with, and define EXTRA_CC_MODES to 1. * machmode.def: Update comments. Include EXTRA_MODES_FILE if it's defined. Get rid of redundancy in calling sequence for CC; don't use it to define CCmode, to avoid a warning. * libgcc2.c: Include symcat.h for the sake of machmode.def. * arc-modes.def, arm-modes.def, c4x-modes.def, i386-modes.def, i960-modes.def, ia64-modes.def, m88k-modes.def, mmix-modes.def, pa-modes.def, pdp11-modes.def, rs6000-modes.def, sparc-modes.def: New files. * arc.h, arm.h, c4x.h, i386.h, i960.h, ia64.h, m88k.h, mmix.h, pa.h, pdp11.h, rs6000.h, sparc.h: Don't define EXTRA_CC_MODES. * doc/sourcebuild.texi, doc/tm.texi: Document new scheme for defining extra CC modes. From-SVN: r54478
Diffstat (limited to 'gcc/machmode.def')
-rw-r--r--gcc/machmode.def18
1 files changed, 10 insertions, 8 deletions
diff --git a/gcc/machmode.def b/gcc/machmode.def
index 6212334..fe4b96e 100644
--- a/gcc/machmode.def
+++ b/gcc/machmode.def
@@ -151,18 +151,20 @@ DEF_MACHMODE (BLKmode, "BLK", MODE_RANDOM, 0, 0, 0, VOIDmode, VOIDmode)
/* The modes for representing the condition codes come last. CCmode
is always defined. Additional modes for the condition code can be
- specified in the EXTRA_CC_MODES macro. All MODE_CC modes are the
+ specified in the EXTRA_CC_MODES header. All MODE_CC modes are the
same width as SImode and have VOIDmode as their next wider mode. */
-#define CC(E, M) DEF_MACHMODE (E, M, MODE_CC, BITS_PER_UNIT*4, 4, 4, VOIDmode, VOIDmode)
-
-CC (CCmode, "CC")
-
-#ifdef EXTRA_CC_MODES
-EXTRA_CC_MODES
-#endif
+/* We do not use CC() for CCmode to avoid a warning about use of
+ function-like macros with no arguments. */
+DEF_MACHMODE (CCmode, "CC", MODE_CC, BITS_PER_UNIT*4, 4, 4, VOIDmode, VOIDmode)
+#ifdef EXTRA_MODES_FILE
+#define CC(N) \
+ DEF_MACHMODE (CONCAT2 (N,mode), STRINGX (N), \
+ MODE_CC, BITS_PER_UNIT*4, 4, 4, VOIDmode, VOIDmode)
+#include EXTRA_MODES_FILE
#undef CC
+#endif
/* The symbol Pmode stands for one of the above machine modes (usually SImode).
The tm file specifies which one. It is not a distinct mode. */