From f6205c6fcee992d0ed4f4623d6b34fc5908ec4ed Mon Sep 17 00:00:00 2001 From: hp Date: Sat, 12 Nov 2005 07:12:09 +0000 Subject: * recog.c (constrain_operands) : For a match, require that a non-register matches general_operand when strict >= 0. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@106821 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/recog.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'gcc/recog.c') diff --git a/gcc/recog.c b/gcc/recog.c index 111f9cb62f8..16bb280d857 100644 --- a/gcc/recog.c +++ b/gcc/recog.c @@ -2429,16 +2429,22 @@ constrain_operands (int strict) break; /* No need to check general_operand again; - it was done in insn-recog.c. */ + it was done in insn-recog.c. Well, except that reload + doesn't check the validity of its replacements, but + that should only matter when there's a bug. */ case 'g': /* Anything goes unless it is a REG and really has a hard reg but the hard reg is not in the class GENERAL_REGS. */ - if (strict < 0 - || GENERAL_REGS == ALL_REGS - || !REG_P (op) - || (reload_in_progress - && REGNO (op) >= FIRST_PSEUDO_REGISTER) - || reg_fits_class_p (op, GENERAL_REGS, offset, mode)) + if (REG_P (op)) + { + if (strict < 0 + || GENERAL_REGS == ALL_REGS + || (reload_in_progress + && REGNO (op) >= FIRST_PSEUDO_REGISTER) + || reg_fits_class_p (op, GENERAL_REGS, offset, mode)) + win = 1; + } + else if (strict < 0 || general_operand (op, mode)) win = 1; break; -- cgit v1.2.1