aboutsummaryrefslogtreecommitdiff
path: root/gcc/recog.c
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2015-08-21 17:23:10 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2015-08-21 17:23:10 +0000
commit523ba7389abc5dd3f73cb10557edba876b3e1d1f (patch)
tree48205e4dfefd1ab26f456d3fbd7f172bbab3cf5b /gcc/recog.c
parentf5dffc0ba1786e6af96fd31e9c04599b818aeedb (diff)
downloadgcc-523ba7389abc5dd3f73cb10557edba876b3e1d1f.zip
gcc-523ba7389abc5dd3f73cb10557edba876b3e1d1f.tar.gz
gcc-523ba7389abc5dd3f73cb10557edba876b3e1d1f.tar.bz2
gencodes.c (gencodes): Print the comma for the preceding enum value rather than the current one.
gcc/ * gencodes.c (gencodes): Print the comma for the preceding enum value rather than the current one. Use aliased enum values rather than #defines for compiled-out patterns. (main): Update accordingly. Replace LAST_INSN_CODE with NUM_INSN_CODES. * lra.c (insn_code_data): Update accordingly. (finish_insn_code_data_once, get_static_insn_data): Likewise. * recog.h (target_recog): Likewise. (preprocess_insn_constraints): Change parameter to unsigned int. * recog.c (preprocess_insn_constraints): Likewise. (recog_init): Replace LAST_INSN_CODE with NUM_INSN_CODES. * tree-vect-stmts.c (vectorizable_operation): Simplify. From-SVN: r227076
Diffstat (limited to 'gcc/recog.c')
-rw-r--r--gcc/recog.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/recog.c b/gcc/recog.c
index 352aec2..c032424 100644
--- a/gcc/recog.c
+++ b/gcc/recog.c
@@ -2441,9 +2441,9 @@ preprocess_constraints (int n_operands, int n_alternatives,
instruction ICODE. */
const operand_alternative *
-preprocess_insn_constraints (int icode)
+preprocess_insn_constraints (unsigned int icode)
{
- gcc_checking_assert (IN_RANGE (icode, 0, LAST_INSN_CODE));
+ gcc_checking_assert (IN_RANGE (icode, 0, NUM_INSN_CODES - 1));
if (this_target_recog->x_op_alt[icode])
return this_target_recog->x_op_alt[icode];
@@ -4118,7 +4118,7 @@ recog_init ()
}
memset (this_target_recog->x_bool_attr_masks, 0,
sizeof (this_target_recog->x_bool_attr_masks));
- for (int i = 0; i < LAST_INSN_CODE; ++i)
+ for (unsigned int i = 0; i < NUM_INSN_CODES; ++i)
if (this_target_recog->x_op_alt[i])
{
free (this_target_recog->x_op_alt[i]);