arc.c (arc_select_cc_mode): Fix parentheses.

* 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.

From-SVN: r209894
This commit is contained in:
Nick Clifton 2014-04-29 13:09:03 +00:00 committed by Nick Clifton
parent 5d3ad081b1
commit f8d91e8034
4 changed files with 33 additions and 20 deletions

View File

@ -1,3 +1,12 @@
2014-04-29 Nick Clifton <nickc@redhat.com>
* 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.
2014-04-29 Richard Biener <rguenther@suse.de>
* dominance.c (free_dominance_info): Add overload with

View File

@ -994,7 +994,7 @@ arc_select_cc_mode (enum rtx_code op, rtx x, rtx y)
if (GET_MODE_CLASS (mode) == MODE_INT
&& y == const0_rtx
&& (op == EQ || op == NE
|| ((op == LT || op == GE) && GET_MODE_SIZE (GET_MODE (x) <= 4))))
|| ((op == LT || op == GE) && GET_MODE_SIZE (GET_MODE (x)) <= 4))))
return CC_ZNmode;
/* add.f for if (a+b) */
@ -1133,31 +1133,33 @@ arc_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)
arc_mode_class[i] = 1 << (int) S_MODE;
else if (GET_MODE_SIZE (i) == 8)
else if (GET_MODE_SIZE (m) == 8)
arc_mode_class[i] = 1 << (int) D_MODE;
else if (GET_MODE_SIZE (i) == 16)
else if (GET_MODE_SIZE (m) == 16)
arc_mode_class[i] = 1 << (int) T_MODE;
else if (GET_MODE_SIZE (i) == 32)
else if (GET_MODE_SIZE (m) == 32)
arc_mode_class[i] = 1 << (int) O_MODE;
else
arc_mode_class[i] = 0;
break;
case MODE_FLOAT:
case MODE_COMPLEX_FLOAT:
if (GET_MODE_SIZE (i) <= 4)
if (GET_MODE_SIZE (m) <= 4)
arc_mode_class[i] = 1 << (int) SF_MODE;
else if (GET_MODE_SIZE (i) == 8)
else if (GET_MODE_SIZE (m) == 8)
arc_mode_class[i] = 1 << (int) DF_MODE;
else if (GET_MODE_SIZE (i) == 16)
else if (GET_MODE_SIZE (m) == 16)
arc_mode_class[i] = 1 << (int) TF_MODE;
else if (GET_MODE_SIZE (i) == 32)
else if (GET_MODE_SIZE (m) == 32)
arc_mode_class[i] = 1 << (int) OF_MODE;
else
arc_mode_class[i] = 0;

View File

@ -3159,7 +3159,7 @@ m32c_illegal_subreg_p (rtx op)
{
int offset;
unsigned int i;
int src_mode, dest_mode;
enum machine_mode src_mode, dest_mode;
if (GET_CODE (op) == MEM
&& ! m32c_legitimate_address_p (Pmode, XEXP (op, 0), false))

View File

@ -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;