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
This commit is contained in:
Richard Sandiford 2003-01-09 09:43:23 +00:00 committed by Richard Sandiford
parent bbb818c65a
commit 98c29f719c
5 changed files with 35 additions and 27 deletions

View File

@ -1,3 +1,10 @@
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>
PR c/8032

View File

@ -780,15 +780,9 @@ reg_or_0_operand (op, mode)
return 0;
return op == CONST0_RTX (mode);
case REG:
case SUBREG:
return register_operand (op, mode);
default:
break;
return register_operand (op, mode);
}
return 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)
case CONST_DOUBLE:
return op == CONST0_RTX (mode);
case REG:
case SUBREG:
return register_operand (op, mode);
default:
break;
return register_operand (op, mode);
}
return 0;
}
/* Return truth value if a CONST_DOUBLE is ok to be a legitimate constant. */

View File

@ -3786,11 +3786,13 @@ typedef struct mips_args {
macro are thoses used in the most insn patterns. */
#define PREDICATE_CODES \
{"uns_arith_operand", { REG, CONST_INT, SUBREG }}, \
{"arith_operand", { REG, CONST_INT, SUBREG }}, \
{"arith32_operand", { REG, CONST_INT, SUBREG }}, \
{"reg_or_0_operand", { REG, CONST_INT, CONST_DOUBLE, SUBREG }}, \
{"true_reg_or_0_operand", { REG, CONST_INT, CONST_DOUBLE, SUBREG }}, \
{"uns_arith_operand", { REG, CONST_INT, SUBREG, ADDRESSOF }}, \
{"arith_operand", { REG, CONST_INT, SUBREG, ADDRESSOF }}, \
{"arith32_operand", { REG, CONST_INT, SUBREG, ADDRESSOF }}, \
{"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 }}, \
{"large_int", { CONST_INT }}, \
{"mips_const_double_ok", { CONST_DOUBLE }}, \
@ -3804,20 +3806,21 @@ typedef struct mips_args {
{"call_insn_operand", { CONST_INT, CONST, SYMBOL_REF, REG}}, \
{"move_operand", { CONST_INT, CONST_DOUBLE, CONST, \
SYMBOL_REF, LABEL_REF, SUBREG, \
REG, MEM}}, \
REG, MEM, ADDRESSOF }}, \
{"movdi_operand", { CONST_INT, CONST_DOUBLE, CONST, \
SYMBOL_REF, LABEL_REF, SUBREG, REG, \
MEM, SIGN_EXTEND }}, \
{"se_register_operand", { SUBREG, REG, SIGN_EXTEND }}, \
SYMBOL_REF, LABEL_REF, SUBREG, \
REG, MEM, ADDRESSOF, SIGN_EXTEND }}, \
{"se_register_operand", { SUBREG, REG, ADDRESSOF, \
SIGN_EXTEND }}, \
{"se_reg_or_0_operand", { REG, CONST_INT, CONST_DOUBLE, SUBREG, \
SIGN_EXTEND }}, \
ADDRESSOF, SIGN_EXTEND }}, \
{"se_uns_arith_operand", { REG, CONST_INT, SUBREG, \
SIGN_EXTEND }}, \
ADDRESSOF, SIGN_EXTEND }}, \
{"se_arith_operand", { REG, CONST_INT, SUBREG, \
SIGN_EXTEND }}, \
ADDRESSOF, SIGN_EXTEND }}, \
{"se_nonmemory_operand", { CONST_INT, CONST_DOUBLE, CONST, \
SYMBOL_REF, LABEL_REF, SUBREG, \
REG, SIGN_EXTEND }}, \
REG, ADDRESSOF, SIGN_EXTEND }}, \
{"consttable_operand", { LABEL_REF, SYMBOL_REF, CONST_INT, \
CONST_DOUBLE, CONST }}, \
{"fcc_register_operand", { REG, SUBREG }}, \

View File

@ -1,3 +1,7 @@
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>
* gcc.c-torture/execute/20030109-1.c: New test.

View File

@ -0,0 +1,6 @@
void foo ()
{
int x1, x2, x3;
bar (&x2 - &x1, &x3 - &x2);
}