From aa0b4465912b2baf8ad8c7e9fb68b6f616036e19 Mon Sep 17 00:00:00 2001 From: Zack Weinberg Date: Fri, 27 Aug 1999 20:37:06 +0000 Subject: rtl.c: Define CONST_DOUBLE_FORMAT to the appropriate format for a CONST_DOUBLE... 1999-08-27 13:27 -0700 Zack Weinberg * rtl.c: Define CONST_DOUBLE_FORMAT to the appropriate format for a CONST_DOUBLE, at compile time. Initialize rtx_length and class_narrowest_mode at compile time. Kill init_rtl. Mark rtx_length, mode_class, mode_size, mode_unit_size, mode_wider_mode, mode_mask_array, class_narrowest_mode, and rtx_format as const. Kill all references to EXTRA_CC_MODES or EXTRA_CC_NAMES. * rtl.def (CONST_DOUBLE): Use CONST_DOUBLE_FORMAT macro for format. * rtl.h: Declare rtx_length and rtx_format as const. * machmode.def: Define CC(). Use CC() to define CCmode. If EXTRA_CC_MODES is defined, expand it here. * machmode.h: Declare mode_class, mode_size, mode_unit_size, mode_wider_mode, mode_mask_array, and class_narrowest_mode as const. Kill all references to EXTRA_CC_MODES. * toplev.c: Don't prototype or call init_rtl. * optabs.c: Don't call init_mov_optab. * genemit.c: Don't generate init_mov_optab. Don't call init_rtl. * gengenrtl.c: Duplicate calculation of CONST_DOUBLE_FORMAT here. * genattr.c, genattrtab.c, gencodes.c, genconfig.c, genextract.c, genflags.c, genopinit.c, genoutput.c, genpeep.c, genrecog.c: Don't call init_rtl. * arc.h, arm.h, c4x.h, i386.h, i960.h, m88k.h, pa.h, pdp11.h, rs6000.h, sparc.h: Don't define EXTRA_CC_NAMES. Use CC() in definition of EXTRA_CC_MODES. * md.texi: Kill ref to EXTRA_CC_NAMES. * tm.texi: Document new way to define EXTRA_CC_MODES. * genrecog.c: Do not look up the name of a define_split. (Unrelated bugfix.) From-SVN: r28937 --- gcc/gengenrtl.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'gcc/gengenrtl.c') diff --git a/gcc/gengenrtl.c b/gcc/gengenrtl.c index e07b940..762c96fa 100644 --- a/gcc/gengenrtl.c +++ b/gcc/gengenrtl.c @@ -26,6 +26,27 @@ Boston, MA 02111-1307, USA. */ #include "rtl.h" #undef abort +#include "real.h" + +/* Calculate the format for CONST_DOUBLE. This depends on the relative + widths of HOST_WIDE_INT and REAL_VALUE_TYPE. + We only need to go out to e0wwww, since min(HOST_WIDE_INT)==32 and + max(LONG_DOUBLE_TYPE_SIZE)==128. + This is duplicated in rtl.c. + A number of places assume that there are always at least two 'w' + slots in a CONST_DOUBLE, so we provide them even if one would suffice. */ +#if HOST_BITS_PER_WIDE_INT >= LONG_DOUBLE_TYPE_SIZE +#define CONST_DOUBLE_FORMAT "e0ww" +#elif HOST_BITS_PER_WIDE_INT*2 >= LONG_DOUBLE_TYPE_SIZE +#define CONST_DOUBLE_FORMAT "e0ww" +#elif HOST_BITS_PER_WIDE_INT*3 >= LONG_DOUBLE_TYPE_SIZE +#define CONST_DOUBLE_FORMAT "e0www" +#elif HOST_BITS_PER_WIDE_INT*4 >= LONG_DOUBLE_TYPE_SIZE +#define CONST_DOUBLE_FORMAT "e0wwww" +#else +#define CONST_DOUBLE_FORMAT /* nothing - will cause syntax error */ +#endif + struct rtx_definition { -- cgit v1.1