aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1993-06-27 21:18:58 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1993-06-27 21:18:58 -0400
commitae1ae48cdb444b210600c4b59d3a0524aee8a784 (patch)
tree804e5a02c1ea5236fc8fefb13d79b35fc2136f43 /gcc
parent40d055518b63b3ff0a883f9a32533ad72f491baa (diff)
downloadgcc-ae1ae48cdb444b210600c4b59d3a0524aee8a784.zip
gcc-ae1ae48cdb444b210600c4b59d3a0524aee8a784.tar.gz
gcc-ae1ae48cdb444b210600c4b59d3a0524aee8a784.tar.bz2
(INTEGRAL_MODE_P, FLOAT_MODE_P): New macros.
From-SVN: r4778
Diffstat (limited to 'gcc')
-rw-r--r--gcc/machmode.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/gcc/machmode.h b/gcc/machmode.h
index 240bd57..bb069d9 100644
--- a/gcc/machmode.h
+++ b/gcc/machmode.h
@@ -1,5 +1,5 @@
/* Machine mode definitions for GNU C-Compiler; included by rtl.h and tree.h.
- Copyright (C) 1991 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1993 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -104,6 +104,17 @@ enum mode_class { MODE_RANDOM, MODE_INT, MODE_FLOAT, MODE_PARTIAL_INT, MODE_CC,
extern enum mode_class mode_class[];
#define GET_MODE_CLASS(MODE) (mode_class[(int)(MODE)])
+/* Nonzero if MODE is an integral mode. */
+#define INTEGRAL_MODE_P(MODE) \
+ (GET_MODE_CLASS (MODE) == MODE_INT \
+ || GET_MODE_CLASS (MODE) == MODE_PARTIAL_INT \
+ || GET_MODE_CLASS (MODE) == MODE_COMPLEX_INT)
+
+/* Nonzero if MODE is a floating-point mode. */
+#define FLOAT_MODE_P(MODE) \
+ (GET_MODE_CLASS (MODE) == MODE_FLOAT \
+ || GET_MODE_CLASS (MODE) == MODE_COMPLEX_FLOAT)
+
/* Get the size in bytes of an object of mode MODE. */
extern int mode_size[];