diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 1993-10-07 21:05:34 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 1993-10-07 21:05:34 +0000 |
commit | 399d45d3e4ea40f2041738aa889f1aba0a2a2f88 (patch) | |
tree | 48efa73b34823850cb1e773fab63bd3a1ca6763b /gcc/emit-rtl.c | |
parent | 206995195e4d57ed10850ffc3bf14002c49c8103 (diff) | |
download | gcc-399d45d3e4ea40f2041738aa889f1aba0a2a2f88.tar.gz |
Move in initialization of byte_mode and word_mode from rtl.c
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@5662 138bc75d-0d04-0410-961f-82ee72b054a4
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 32bc6b69e11..cc988317d1c 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); |