+2014-06-11 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * system.h (CONST_DOUBLE_OK_FOR_CONSTRAINT_P): Poison.
+ * genpreds.c (have_const_dbl_constraints): Delete.
+ (add_constraint): Don't set it.
+ (write_tm_preds_h): Don't call CONST_DOUBLE_OK_FOR_CONSTRAINT_P.
+ * ira-costs.c (record_reg_classes): Handle CONST_INT and CONST_DOUBLE
+ constraints using the lookup_constraint logic.
+ * ira-lives.c (single_reg_class): Likewise.
+ * ira.c (ira_setup_alts): Likewise.
+ * lra-constraints.c (process_alt_operands): Likewise.
+ * recog.c (asm_operand_ok, constrain_operands): Likewise.
+ * reload.c (find_reloads): Likewise.
+
2014-06-11 Richard Sandiford <rdsandiford@googlemail.com>
* genpreds.c (const_int_start, const_int_end): New variables.
static bool have_address_constraints;
static bool have_extra_constraints;
static bool have_const_int_constraints;
-static bool have_const_dbl_constraints;
static unsigned int num_constraints;
static const constraint_data **enum_order;
constraint_max_namelen = MAX (constraint_max_namelen, strlen (name));
have_register_constraints |= c->is_register;
have_const_int_constraints |= c->is_const_int;
- have_const_dbl_constraints |= c->is_const_dbl;
have_extra_constraints |= c->is_extra;
have_memory_constraints |= c->is_memory;
have_address_constraints |= c->is_address;
"{\n"
" return false;\n"
"}\n");
- if (have_const_dbl_constraints)
- puts ("#define CONST_DOUBLE_OK_FOR_CONSTRAINT_P(v_,c_,s_) \\\n"
- " constraint_satisfied_p (v_, lookup_constraint (s_))\n");
- else
- puts ("#define CONST_DOUBLE_OK_FOR_CONSTRAINT_P(v_,c_,s_) 0\n");
puts ("enum constraint_type\n"
"{\n"
win = 1;
break;
- case 'G':
- case 'H':
- if (CONST_DOUBLE_AS_FLOAT_P (op)
- && CONST_DOUBLE_OK_FOR_CONSTRAINT_P (op, c, p))
- win = 1;
- break;
-
case 's':
if (CONST_SCALAR_INT_P (op))
break;
win = 1;
break;
- case 'I':
- case 'J':
- case 'K':
- case 'L':
- case 'M':
- case 'N':
- case 'O':
- case 'P':
- if (CONST_INT_P (op)
- && CONST_OK_FOR_CONSTRAINT_P (INTVAL (op), c, p))
- win = 1;
- break;
-
case 'X':
win = 1;
break;
return NO_REGS;
break;
- case 'I':
- case 'J':
- case 'K':
- case 'L':
- case 'M':
- case 'N':
- case 'O':
- case 'P':
- if ((CONST_INT_P (op)
- && CONST_OK_FOR_CONSTRAINT_P (INTVAL (op), c, constraints))
- || (equiv_const != NULL_RTX
- && CONST_INT_P (equiv_const)
- && CONST_OK_FOR_CONSTRAINT_P (INTVAL (equiv_const),
- c, constraints)))
- return NO_REGS;
- break;
-
case 'E':
case 'F':
if (CONST_DOUBLE_AS_FLOAT_P (op)
return NO_REGS;
break;
- case 'G':
- case 'H':
- if ((CONST_DOUBLE_AS_FLOAT_P (op)
- && CONST_DOUBLE_OK_FOR_CONSTRAINT_P (op, c, constraints))
- || (equiv_const != NULL_RTX
- && CONST_DOUBLE_AS_FLOAT_P (equiv_const)
- && CONST_DOUBLE_OK_FOR_CONSTRAINT_P (equiv_const,
- c, constraints)))
- return NO_REGS;
- break;
-
+ case 'I': case 'J': case 'K': case 'L': case 'M': case 'N':
+ case 'O': case 'P':
+ case 'G': case 'H':
case 'r':
case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
case 'h': case 'j': case 'k': case 'l':
goto op_success;
break;
- case 'G':
- case 'H':
- if (CONST_DOUBLE_AS_FLOAT_P (op)
- && CONST_DOUBLE_OK_FOR_CONSTRAINT_P (op, c, p))
- goto op_success;
- break;
-
case 's':
if (CONST_SCALAR_INT_P (op))
break;
goto op_success;
break;
- case 'I':
- case 'J':
- case 'K':
- case 'L':
- case 'M':
- case 'N':
- case 'O':
- case 'P':
- if (CONST_INT_P (op)
- && CONST_OK_FOR_CONSTRAINT_P (INTVAL (op), c, p))
- goto op_success;
- break;
-
case 'V':
if (MEM_P (op) && ! offsettable_memref_p (op))
goto op_success;
win = true;
break;
- case 'G':
- case 'H':
- if (CONST_DOUBLE_AS_FLOAT_P (op)
- && CONST_DOUBLE_OK_FOR_CONSTRAINT_P (op, c, p))
- win = true;
- break;
-
case 's':
if (CONST_SCALAR_INT_P (op))
break;
win = true;
break;
- case 'I':
- case 'J':
- case 'K':
- case 'L':
- case 'M':
- case 'N':
- case 'O':
- case 'P':
- if (CONST_INT_P (op)
- && CONST_OK_FOR_CONSTRAINT_P (INTVAL (op), c, p))
- win = true;
- break;
-
case 'X':
/* This constraint should be excluded by the fast
track. */
result = 1;
break;
- case 'G':
- if (CONST_DOUBLE_AS_FLOAT_P (op)
- && CONST_DOUBLE_OK_FOR_CONSTRAINT_P (op, 'G', constraint))
- result = 1;
- break;
- case 'H':
- if (CONST_DOUBLE_AS_FLOAT_P (op)
- && CONST_DOUBLE_OK_FOR_CONSTRAINT_P (op, 'H', constraint))
- result = 1;
- break;
-
case 's':
if (CONST_SCALAR_INT_P (op))
break;
result = 1;
break;
- case 'I':
- if (CONST_INT_P (op)
- && CONST_OK_FOR_CONSTRAINT_P (INTVAL (op), 'I', constraint))
- result = 1;
- break;
- case 'J':
- if (CONST_INT_P (op)
- && CONST_OK_FOR_CONSTRAINT_P (INTVAL (op), 'J', constraint))
- result = 1;
- break;
- case 'K':
- if (CONST_INT_P (op)
- && CONST_OK_FOR_CONSTRAINT_P (INTVAL (op), 'K', constraint))
- result = 1;
- break;
- case 'L':
- if (CONST_INT_P (op)
- && CONST_OK_FOR_CONSTRAINT_P (INTVAL (op), 'L', constraint))
- result = 1;
- break;
- case 'M':
- if (CONST_INT_P (op)
- && CONST_OK_FOR_CONSTRAINT_P (INTVAL (op), 'M', constraint))
- result = 1;
- break;
- case 'N':
- if (CONST_INT_P (op)
- && CONST_OK_FOR_CONSTRAINT_P (INTVAL (op), 'N', constraint))
- result = 1;
- break;
- case 'O':
- if (CONST_INT_P (op)
- && CONST_OK_FOR_CONSTRAINT_P (INTVAL (op), 'O', constraint))
- result = 1;
- break;
- case 'P':
- if (CONST_INT_P (op)
- && CONST_OK_FOR_CONSTRAINT_P (INTVAL (op), 'P', constraint))
- result = 1;
- break;
-
case 'X':
result = 1;
break;
win = 1;
break;
- case 'G':
- case 'H':
- if (CONST_DOUBLE_AS_FLOAT_P (op)
- && CONST_DOUBLE_OK_FOR_CONSTRAINT_P (op, c, p))
- win = 1;
- break;
-
case 's':
if (CONST_SCALAR_INT_P (op))
break;
win = 1;
break;
- case 'I':
- case 'J':
- case 'K':
- case 'L':
- case 'M':
- case 'N':
- case 'O':
- case 'P':
- if (CONST_INT_P (op)
- && CONST_OK_FOR_CONSTRAINT_P (INTVAL (op), c, p))
- win = 1;
- break;
-
case 'V':
if (MEM_P (op)
&& ((strict > 0 && ! offsettable_memref_p (op))
win = 1;
break;
- case 'G':
- case 'H':
- if (CONST_DOUBLE_AS_FLOAT_P (operand)
- && CONST_DOUBLE_OK_FOR_CONSTRAINT_P (operand, c, p))
- win = 1;
- break;
-
case 's':
if (CONST_SCALAR_INT_P (operand))
break;
win = 1;
break;
- case 'I':
- case 'J':
- case 'K':
- case 'L':
- case 'M':
- case 'N':
- case 'O':
- case 'P':
- if (CONST_INT_P (operand)
- && CONST_OK_FOR_CONSTRAINT_P (INTVAL (operand), c, p))
- win = 1;
- break;
-
case 'X':
force_reload = 0;
win = 1;
CONST_DOUBLE_OK_FOR_LETTER_P EXTRA_CONSTRAINT \
REG_CLASS_FROM_CONSTRAINT REG_CLASS_FOR_CONSTRAINT \
EXTRA_CONSTRAINT_STR EXTRA_MEMORY_CONSTRAINT \
- EXTRA_ADDRESS_CONSTRAINT
+ EXTRA_ADDRESS_CONSTRAINT CONST_DOUBLE_OK_FOR_CONSTRAINT_P
/* Hooks that are no longer used. */
#pragma GCC poison LANG_HOOKS_FUNCTION_MARK LANG_HOOKS_FUNCTION_FREE \