diff options
author | nickc <nickc@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-04-29 13:09:03 +0000 |
---|---|---|
committer | nickc <nickc@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-04-29 13:09:03 +0000 |
commit | 92e46ab105ed5d5a7d0a4d389ab26c3582994c53 (patch) | |
tree | b1639687f7c682a4b3c6616eb1d44b6f3ea9e7eb /gcc/config/m32r/m32r.c | |
parent | 9f1b5eff47847ef8b682697450a80e31df14a42c (diff) | |
download | gcc-92e46ab105ed5d5a7d0a4d389ab26c3582994c53.tar.gz |
* 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
Diffstat (limited to 'gcc/config/m32r/m32r.c')
-rw-r--r-- | gcc/config/m32r/m32r.c | 20 |
1 files changed, 11 insertions, 9 deletions
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; |