From: Richard Sandiford Date: Fri, 6 Jun 2014 06:59:22 +0000 (+0000) Subject: ira-lives.c (single_reg_class): Add missing break. X-Git-Tag: releases/gcc-5.1.0~7054 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b58923e2a923e130fbc5420d882b02bdad16fe65;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index af977a09fdcc..a46cfda428bd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2014-06-06 Richard Sandiford + + * 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 PR target/61300 diff --git a/gcc/ira-lives.c b/gcc/ira-lives.c index 651332024328..bb03967225b5 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)]