From 1d445e9e5edb3f900bb815d7a8d7506feda0e875 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Thu, 7 Oct 1993 21:05:34 +0000 Subject: [PATCH] Move in initialization of byte_mode and word_mode from rtl.c From-SVN: r5662 --- gcc/emit-rtl.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index 32bc6b6..cc98831 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -65,6 +65,11 @@ char *opcode_name[] = #endif +/* Commonly used modes. */ + +enum machine_mode byte_mode; /* Mode whose width is BITS_PER_UNIT */ +enum machine_mode word_mode; /* Mode whose width is BITS_PER_WORD */ + /* This is reset to LAST_VIRTUAL_REGISTER + 1 at the start of each function. After rtl generation, it is 1 plus the largest register number used. */ @@ -3100,6 +3105,23 @@ init_emit_once (line_numbers) sequence_stack = NULL; + /* Compute the word and byte modes. */ + + byte_mode = VOIDmode; + word_mode = VOIDmode; + + for (mode = GET_CLASS_NARROWEST_MODE (MODE_INT); mode != VOIDmode; + mode = GET_MODE_WIDER_MODE (mode)) + { + if (GET_MODE_BITSIZE (mode) == BITS_PER_UNIT + && byte_mode == VOIDmode) + byte_mode = mode; + + if (GET_MODE_BITSIZE (mode) == BITS_PER_WORD + && word_mode == VOIDmode) + word_mode = mode; + } + /* Create the unique rtx's for certain rtx codes and operand values. */ pc_rtx = gen_rtx (PC, VOIDmode); -- 2.7.4