Commit 1d445e9e by Ian Lance Taylor

Move in initialization of byte_mode and word_mode from rtl.c

From-SVN: r5662
parent d3d63026
...@@ -65,6 +65,11 @@ char *opcode_name[] = ...@@ -65,6 +65,11 @@ char *opcode_name[] =
#endif #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. /* 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. */ After rtl generation, it is 1 plus the largest register number used. */
...@@ -3100,6 +3105,23 @@ init_emit_once (line_numbers) ...@@ -3100,6 +3105,23 @@ init_emit_once (line_numbers)
sequence_stack = NULL; 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. */ /* Create the unique rtx's for certain rtx codes and operand values. */
pc_rtx = gen_rtx (PC, VOIDmode); pc_rtx = gen_rtx (PC, VOIDmode);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment