summaryrefslogtreecommitdiff
path: root/gcc/gengenrtl.c
diff options
context:
space:
mode:
authorzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2003-10-10 20:33:07 +0000
committerzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2003-10-10 20:33:07 +0000
commit47a2c1d448f2578c0d9d1bd6be4a17e95d279870 (patch)
treef9be992652ecd68b01a301007bfe03ceccd94dc6 /gcc/gengenrtl.c
parent18ee3f27ba9cc3c48b390db1d052618c0f393513 (diff)
downloadgcc-47a2c1d448f2578c0d9d1bd6be4a17e95d279870.tar.gz
* genmodes.c, mode-classes.def: New files.
* machmode.def: Rewritten to genmodes.c interface. * Makefile.in (extra_modes_file): New substitution variable. (MACHMODE_H): No longer includes machmode.def or @extra_modes_file@; instead, mode-classes.def and insn-modes.h. (BUILD_RTL): Add $(BUILD_PREFIX)insn-modes.o. (OBJS-common): Add insn-modes.o. (STAGESTUFF): Add insn-modes.c, insn-modes.h, s-modes, and genmodes$(build_exeext). (insn-modes.o, insn-modes.c, insn-modes.h, s-modes, genmodes.o, genmodes$(build_exeext), $(BUILD_PREFIX_1)insn-modes.o): New targets. (s-genrtl): Don't depend on $(RTL_BASE_H). (gengenrtl.o): Don't depend on coretypes.h, $(GTM_H), real.h, or $(RTL_BASE_H); just rtl.def. * gengenrtl.c: Don't include coretypes.h, tm.h, rtl.h, or real.h. Give fake definition of CONST_DOUBLE_FORMAT and substitute definition of NUM_RTX_CODE. Add casts to avoid warnings. * machmode.h: Include insn-modes.h, not machmode.def. Include mode-classes.def to define enum mode_class. Tweak definitions of GET_MODE_CLASS, GET_MODE_SIZE, GET_MODE_BITSIZE, GET_MODE_MASK, GET_MODE_INNER, GET_MODE_WIDER_MODE, GET_CLASS_NARROWEST_MODE. (inner_mode_array): Renamed mode_inner. (mode_base_align): New. * rtl.c (mode_name, mode_class, mode_bitsize, mode_size, mode_unit_size, mode_wider_mode, mode_mask_array, inner_mode_array, class_narrowest_mode): Delete definitions. * stor-layout.c (get_mode_alignment): Use mode_base_align. * real.h: Use MIN_MODE_FLOAT and MAX_MODE_FLOAT, not QFmode and TFmode, in real_format_for_mode and REAL_MODE_FORMAT. * config/ip2k/ip2k.h, config/iq2000/iq2000.h: No need to define BITS_PER_UNIT. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72313 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gengenrtl.c')
-rw-r--r--gcc/gengenrtl.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/gcc/gengenrtl.c b/gcc/gengenrtl.c
index 80ff784ba54..9fe9481bc8e 100644
--- a/gcc/gengenrtl.c
+++ b/gcc/gengenrtl.c
@@ -22,26 +22,24 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "bconfig.h"
#include "system.h"
-#include "coretypes.h"
-#include "tm.h"
-
-#define NO_GENRTL_H
-#include "rtl.h"
-#undef abort
-
-#include "real.h"
struct rtx_definition
{
const char *const enumname, *const name, *const format;
};
+/* rtl.def needs CONST_DOUBLE_FORMAT, but we don't care what
+ CONST_DOUBLE_FORMAT is because we're not going to be generating
+ anything for CONST_DOUBLE anyway. */
+#define CONST_DOUBLE_FORMAT ""
+
#define DEF_RTL_EXPR(ENUM, NAME, FORMAT, CLASS) { #ENUM, NAME, FORMAT },
static const struct rtx_definition defs[] =
{
#include "rtl.def" /* rtl expressions are documented here */
};
+#define NUM_RTX_CODE ARRAY_SIZE(defs)
static const char *formats[NUM_RTX_CODE];
@@ -169,7 +167,7 @@ find_formats (void)
{
int i;
- for (i = 0; i < NUM_RTX_CODE; i++)
+ for (i = 0; i < (int)NUM_RTX_CODE; i++)
{
const char **f;
@@ -309,7 +307,7 @@ genheader (void)
putchar ('\n');
- for (i = 0; i < NUM_RTX_CODE; i++)
+ for (i = 0; i < (int) NUM_RTX_CODE; i++)
if (! special_format (defs[i].format))
genmacro (i);