From: Richard Sandiford Date: Thu, 9 Jan 2003 09:43:23 +0000 (+0000) Subject: mips.h (PREDICATE_CODES): Add ADDRESSOF for predicates that match register_operands. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=98c29f719c19ac2a166f19f14518f748952296d6;p=gcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cc6771beeee..7e02d6a54de 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2003-01-09 Richard Sandiford + + * 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 PR c/8032 diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index 52b9415a48f..5c0b78af698 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -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. */ diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h index 5dee17967ad..864be70a678 100644 --- a/gcc/config/mips/mips.h +++ b/gcc/config/mips/mips.h @@ -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 }}, \ - {"se_reg_or_0_operand", { REG, CONST_INT, CONST_DOUBLE, SUBREG, \ + 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, \ + 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 }}, \ diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 2582c719266..f5d0134f2a1 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2003-01-09 Richard Sandiford + + * gcc.c-torture/compile/20030109-1.c: New test. + 2003-01-09 Eric Botcazou * gcc.c-torture/execute/20030109-1.c: New test. diff --git a/gcc/testsuite/gcc.c-torture/compile/20030109-1.c b/gcc/testsuite/gcc.c-torture/compile/20030109-1.c new file mode 100644 index 00000000000..4df7d18721a --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/20030109-1.c @@ -0,0 +1,6 @@ +void foo () +{ + int x1, x2, x3; + + bar (&x2 - &x1, &x3 - &x2); +}