You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to the Free
-Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA. */
+Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301, USA. */
#ifndef HAVE_MACHINE_MODES
#define HAVE_MACHINE_MODES
/* Make an enum class that gives all the machine modes. */
#include "insn-modes.h"
-/* Given MODE as integer value, get the corresponding enum machine_mode
- enumeration value. */
-#define to_machine_mode(MODE) ((enum machine_mode) (MODE))
-
/* Get the name of mode MODE as a string. */
extern const char * const mode_name[NUM_MACHINE_MODES];
/* Nonzero if MODE is a floating-point mode. */
#define FLOAT_MODE_P(MODE) \
(GET_MODE_CLASS (MODE) == MODE_FLOAT \
+ || GET_MODE_CLASS (MODE) == MODE_DECIMAL_FLOAT \
|| GET_MODE_CLASS (MODE) == MODE_COMPLEX_FLOAT \
|| GET_MODE_CLASS (MODE) == MODE_VECTOR_FLOAT)
/* Nonzero if MODE is a scalar floating point mode. */
#define SCALAR_FLOAT_MODE_P(MODE) \
- (GET_MODE_CLASS (MODE) == MODE_FLOAT)
+ (GET_MODE_CLASS (MODE) == MODE_FLOAT \
+ || GET_MODE_CLASS (MODE) == MODE_DECIMAL_FLOAT)
+
+/* Nonzero if MODE is a decimal floating point mode. */
+#define DECIMAL_FLOAT_MODE_P(MODE) \
+ (GET_MODE_CLASS (MODE) == MODE_DECIMAL_FLOAT)
+
+/* Nonzero if CLASS modes can be widened. */
+#define CLASS_HAS_WIDER_MODES_P(CLASS) \
+ (CLASS == MODE_INT \
+ || CLASS == MODE_FLOAT \
+ || CLASS == MODE_DECIMAL_FLOAT \
+ || CLASS == MODE_COMPLEX_FLOAT)
/* Get the size in bytes and bits of an object of mode MODE. */