diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 1993-10-07 21:05:34 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 1993-10-07 21:05:34 +0000 |
commit | 1d445e9e5edb3f900bb815d7a8d7506feda0e875 (patch) | |
tree | 48efa73b34823850cb1e773fab63bd3a1ca6763b /gcc/emit-rtl.c | |
parent | d3d63026f5c383c11e1d6ecdaf4dd1c7bb2afa45 (diff) | |
download | gcc-1d445e9e5edb3f900bb815d7a8d7506feda0e875.zip gcc-1d445e9e5edb3f900bb815d7a8d7506feda0e875.tar.gz gcc-1d445e9e5edb3f900bb815d7a8d7506feda0e875.tar.bz2 |
Move in initialization of byte_mode and word_mode from rtl.c
From-SVN: r5662
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r-- | gcc/emit-rtl.c | 22 |
1 files changed, 22 insertions, 0 deletions
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); |