diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/config/mips/mips.c | 16 | ||||
-rw-r--r-- | gcc/config/mips/mips.h | 29 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/20030109-1.c | 6 |
5 files changed, 35 insertions, 27 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cc6771b..7e02d6a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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 diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index 52b9415..5c0b78a 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 5dee179..864be70 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 2582c71..f5d0134 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -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. 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 0000000..4df7d18 --- /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); +} |