From 92e46ab105ed5d5a7d0a4d389ab26c3582994c53 Mon Sep 17 00:00:00 2001 From: nickc Date: Tue, 29 Apr 2014 13:09:03 +0000 Subject: * config/arc/arc.c (arc_select_cc_mode): Fix parentheses. (arc_init_reg_tables): Use a machine_mode enum to iterate over available modes. * config/m32r/m32r.c (init_reg_tables): Likewise. * config/m32c/m32c.c (m32c_illegal_subreg_p): Use a machine_mode enum to hold the modes. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@209894 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/config/m32r/m32r.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'gcc/config/m32r/m32r.c') diff --git a/gcc/config/m32r/m32r.c b/gcc/config/m32r/m32r.c index 83bc3a7bf3a..2b84b0ff1eb 100644 --- a/gcc/config/m32r/m32r.c +++ b/gcc/config/m32r/m32r.c @@ -282,31 +282,33 @@ init_reg_tables (void) for (i = 0; i < NUM_MACHINE_MODES; i++) { - switch (GET_MODE_CLASS (i)) + enum machine_mode m = (enum machine_mode) i; + + switch (GET_MODE_CLASS (m)) { case MODE_INT: case MODE_PARTIAL_INT: case MODE_COMPLEX_INT: - if (GET_MODE_SIZE (i) <= 4) + if (GET_MODE_SIZE (m) <= 4) m32r_mode_class[i] = 1 << (int) S_MODE; - else if (GET_MODE_SIZE (i) == 8) + else if (GET_MODE_SIZE (m) == 8) m32r_mode_class[i] = 1 << (int) D_MODE; - else if (GET_MODE_SIZE (i) == 16) + else if (GET_MODE_SIZE (m) == 16) m32r_mode_class[i] = 1 << (int) T_MODE; - else if (GET_MODE_SIZE (i) == 32) + else if (GET_MODE_SIZE (m) == 32) m32r_mode_class[i] = 1 << (int) O_MODE; else m32r_mode_class[i] = 0; break; case MODE_FLOAT: case MODE_COMPLEX_FLOAT: - if (GET_MODE_SIZE (i) <= 4) + if (GET_MODE_SIZE (m) <= 4) m32r_mode_class[i] = 1 << (int) SF_MODE; - else if (GET_MODE_SIZE (i) == 8) + else if (GET_MODE_SIZE (m) == 8) m32r_mode_class[i] = 1 << (int) DF_MODE; - else if (GET_MODE_SIZE (i) == 16) + else if (GET_MODE_SIZE (m) == 16) m32r_mode_class[i] = 1 << (int) TF_MODE; - else if (GET_MODE_SIZE (i) == 32) + else if (GET_MODE_SIZE (m) == 32) m32r_mode_class[i] = 1 << (int) OF_MODE; else m32r_mode_class[i] = 0; -- cgit v1.2.1