aboutsummaryrefslogtreecommitdiff
path: root/gcc/ira-lives.c
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2014-06-06 06:59:22 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2014-06-06 06:59:22 +0000
commitb58923e2a923e130fbc5420d882b02bdad16fe65 (patch)
treee393195e90c0710139c92a43a664d960118499cd /gcc/ira-lives.c
parent3def9a976919ceeda85707f324fa2d9a0336a2bb (diff)
downloadgcc-b58923e2a923e130fbc5420d882b02bdad16fe65.zip
gcc-b58923e2a923e130fbc5420d882b02bdad16fe65.tar.gz
gcc-b58923e2a923e130fbc5420d882b02bdad16fe65.tar.bz2
ira-lives.c (single_reg_class): Add missing break.
gcc/ * 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. From-SVN: r211300
Diffstat (limited to 'gcc/ira-lives.c')
-rw-r--r--gcc/ira-lives.c16
1 files changed, 15 insertions, 1 deletions
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)]