Commit 98c29f71 by Richard Sandiford Committed by Richard Sandiford

mips.h (PREDICATE_CODES): Add ADDRESSOF for predicates that match register_operands.

	* config/mips/mips.h (PREDICATE_CODES): Add ADDRESSOF for predicates
	that match register_operands.
	* config/mips/mips.c (reg_or_0_operand, true_reg_or_0_operand): Make
	register_operand the default case.

From-SVN: r61097
parent bbb818c6
2003-01-09 Richard Sandiford <rsandifo@redhat.com>
* config/mips/mips.h (PREDICATE_CODES): Add ADDRESSOF for predicates
that match register_operands.
* config/mips/mips.c (reg_or_0_operand, true_reg_or_0_operand): Make
register_operand the default case.
2003-01-09 Eric Botcazou <ebotcazou@libertysurf.fr> 2003-01-09 Eric Botcazou <ebotcazou@libertysurf.fr>
PR c/8032 PR c/8032
......
...@@ -780,15 +780,9 @@ reg_or_0_operand (op, mode) ...@@ -780,15 +780,9 @@ reg_or_0_operand (op, mode)
return 0; return 0;
return op == CONST0_RTX (mode); return op == CONST0_RTX (mode);
case REG:
case SUBREG:
return register_operand (op, mode);
default: default:
break; return register_operand (op, mode);
} }
return 0;
} }
/* Return truth value of whether OP is a register or the constant 0, /* Return truth value of whether OP is a register or the constant 0,
...@@ -807,15 +801,9 @@ true_reg_or_0_operand (op, mode) ...@@ -807,15 +801,9 @@ true_reg_or_0_operand (op, mode)
case CONST_DOUBLE: case CONST_DOUBLE:
return op == CONST0_RTX (mode); return op == CONST0_RTX (mode);
case REG:
case SUBREG:
return register_operand (op, mode);
default: default:
break; return register_operand (op, mode);
} }
return 0;
} }
/* Return truth value if a CONST_DOUBLE is ok to be a legitimate constant. */ /* Return truth value if a CONST_DOUBLE is ok to be a legitimate constant. */
......
...@@ -3786,11 +3786,13 @@ typedef struct mips_args { ...@@ -3786,11 +3786,13 @@ typedef struct mips_args {
macro are thoses used in the most insn patterns. */ macro are thoses used in the most insn patterns. */
#define PREDICATE_CODES \ #define PREDICATE_CODES \
{"uns_arith_operand", { REG, CONST_INT, SUBREG }}, \ {"uns_arith_operand", { REG, CONST_INT, SUBREG, ADDRESSOF }}, \
{"arith_operand", { REG, CONST_INT, SUBREG }}, \ {"arith_operand", { REG, CONST_INT, SUBREG, ADDRESSOF }}, \
{"arith32_operand", { REG, CONST_INT, SUBREG }}, \ {"arith32_operand", { REG, CONST_INT, SUBREG, ADDRESSOF }}, \
{"reg_or_0_operand", { REG, CONST_INT, CONST_DOUBLE, SUBREG }}, \ {"reg_or_0_operand", { REG, CONST_INT, CONST_DOUBLE, SUBREG, \
{"true_reg_or_0_operand", { REG, CONST_INT, CONST_DOUBLE, SUBREG }}, \ ADDRESSOF }}, \
{"true_reg_or_0_operand", { REG, CONST_INT, CONST_DOUBLE, SUBREG, \
ADDRESSOF }}, \
{"small_int", { CONST_INT }}, \ {"small_int", { CONST_INT }}, \
{"large_int", { CONST_INT }}, \ {"large_int", { CONST_INT }}, \
{"mips_const_double_ok", { CONST_DOUBLE }}, \ {"mips_const_double_ok", { CONST_DOUBLE }}, \
...@@ -3804,20 +3806,21 @@ typedef struct mips_args { ...@@ -3804,20 +3806,21 @@ typedef struct mips_args {
{"call_insn_operand", { CONST_INT, CONST, SYMBOL_REF, REG}}, \ {"call_insn_operand", { CONST_INT, CONST, SYMBOL_REF, REG}}, \
{"move_operand", { CONST_INT, CONST_DOUBLE, CONST, \ {"move_operand", { CONST_INT, CONST_DOUBLE, CONST, \
SYMBOL_REF, LABEL_REF, SUBREG, \ SYMBOL_REF, LABEL_REF, SUBREG, \
REG, MEM}}, \ REG, MEM, ADDRESSOF }}, \
{"movdi_operand", { CONST_INT, CONST_DOUBLE, CONST, \ {"movdi_operand", { CONST_INT, CONST_DOUBLE, CONST, \
SYMBOL_REF, LABEL_REF, SUBREG, REG, \ SYMBOL_REF, LABEL_REF, SUBREG, \
MEM, SIGN_EXTEND }}, \ REG, MEM, ADDRESSOF, SIGN_EXTEND }}, \
{"se_register_operand", { SUBREG, REG, SIGN_EXTEND }}, \ {"se_register_operand", { SUBREG, REG, ADDRESSOF, \
{"se_reg_or_0_operand", { REG, CONST_INT, CONST_DOUBLE, SUBREG, \
SIGN_EXTEND }}, \ SIGN_EXTEND }}, \
{"se_reg_or_0_operand", { REG, CONST_INT, CONST_DOUBLE, SUBREG, \
ADDRESSOF, SIGN_EXTEND }}, \
{"se_uns_arith_operand", { REG, CONST_INT, SUBREG, \ {"se_uns_arith_operand", { REG, CONST_INT, SUBREG, \
SIGN_EXTEND }}, \ ADDRESSOF, SIGN_EXTEND }}, \
{"se_arith_operand", { REG, CONST_INT, SUBREG, \ {"se_arith_operand", { REG, CONST_INT, SUBREG, \
SIGN_EXTEND }}, \ ADDRESSOF, SIGN_EXTEND }}, \
{"se_nonmemory_operand", { CONST_INT, CONST_DOUBLE, CONST, \ {"se_nonmemory_operand", { CONST_INT, CONST_DOUBLE, CONST, \
SYMBOL_REF, LABEL_REF, SUBREG, \ SYMBOL_REF, LABEL_REF, SUBREG, \
REG, SIGN_EXTEND }}, \ REG, ADDRESSOF, SIGN_EXTEND }}, \
{"consttable_operand", { LABEL_REF, SYMBOL_REF, CONST_INT, \ {"consttable_operand", { LABEL_REF, SYMBOL_REF, CONST_INT, \
CONST_DOUBLE, CONST }}, \ CONST_DOUBLE, CONST }}, \
{"fcc_register_operand", { REG, SUBREG }}, \ {"fcc_register_operand", { REG, SUBREG }}, \
......
2003-01-09 Richard Sandiford <rsandifo@redhat.com>
* gcc.c-torture/compile/20030109-1.c: New test.
2003-01-09 Eric Botcazou <ebotcazou@libertysurf.fr> 2003-01-09 Eric Botcazou <ebotcazou@libertysurf.fr>
* gcc.c-torture/execute/20030109-1.c: New test. * gcc.c-torture/execute/20030109-1.c: New test.
......
void foo ()
{
int x1, x2, x3;
bar (&x2 - &x1, &x3 - &x2);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment