aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/ira-lives.c16
2 files changed, 22 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index af977a0..a46cfda 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2014-06-06 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * ira-lives.c (single_reg_class): Add missing break. Explicitly
+ return NO_REGS for extra address and memory constraints. Handle
+ operands that match (or are equivalent to something that matches)
+ extra constant constraints. Ignore other non-register operands.
+
2014-06-06 Alan Modra <amodra@gmail.com>
PR target/61300
diff --git a/gcc/ira-lives.c b/gcc/ira-lives.c
index 6513320..bb03967 100644
--- a/gcc/ira-lives.c
+++ b/gcc/ira-lives.c
@@ -839,7 +839,8 @@ single_reg_class (const char *constraints, rtx op, rtx equiv_const)
&& CONST_DOUBLE_OK_FOR_CONSTRAINT_P (equiv_const,
c, constraints)))
return NO_REGS;
- /* ??? what about memory */
+ break;
+
case 'r':
case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
case 'h': case 'j': case 'k': case 'l':
@@ -848,9 +849,22 @@ single_reg_class (const char *constraints, rtx op, rtx equiv_const)
case 'A': case 'B': case 'C': case 'D':
case 'Q': case 'R': case 'S': case 'T': case 'U':
case 'W': case 'Y': case 'Z':
+#ifdef EXTRA_CONSTRAINT_STR
+ /* ??? Is this the best way to handle memory constraints? */
+ if (EXTRA_MEMORY_CONSTRAINT (c, constraints)
+ || EXTRA_ADDRESS_CONSTRAINT (c, constraints))
+ return NO_REGS;
+ if (EXTRA_CONSTRAINT_STR (op, c, constraints)
+ || (equiv_const != NULL_RTX
+ && CONSTANT_P (equiv_const)
+ && EXTRA_CONSTRAINT_STR (equiv_const, c, constraints)))
+ return NO_REGS;
+#endif
next_cl = (c == 'r'
? GENERAL_REGS
: REG_CLASS_FROM_CONSTRAINT (c, constraints));
+ if (next_cl == NO_REGS)
+ break;
if (cl == NO_REGS
? ira_class_singleton[next_cl][GET_MODE (op)] < 0
: (ira_class_singleton[cl][GET_MODE (op)]