diff options
author | Hans-Peter Nilsson <hp@axis.com> | 2005-11-12 07:12:09 +0000 |
---|---|---|
committer | Hans-Peter Nilsson <hp@gcc.gnu.org> | 2005-11-12 07:12:09 +0000 |
commit | 74e3e54a6c09dbc5b56efe4ed9b5ddaedfc1c575 (patch) | |
tree | 13d1b5b48d40ed6fe25f4f0451bff9e312f1d737 /gcc | |
parent | 516ebd44865ef872178e6003100d241d3dd39237 (diff) | |
download | gcc-74e3e54a6c09dbc5b56efe4ed9b5ddaedfc1c575.zip gcc-74e3e54a6c09dbc5b56efe4ed9b5ddaedfc1c575.tar.gz gcc-74e3e54a6c09dbc5b56efe4ed9b5ddaedfc1c575.tar.bz2 |
recog.c (constrain_operands): For a match, require that a non-register matches general_operand when strict >= 0.
* recog.c (constrain_operands) <case 'g'>: For a match, require
that a non-register matches general_operand when strict >= 0.
From-SVN: r106821
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/recog.c | 20 |
2 files changed, 18 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2851015..f539184d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2005-11-12 Hans-Peter Nilsson <hp@axis.com> + + * recog.c (constrain_operands) <case 'g'>: For a match, require + that a non-register matches general_operand when strict >= 0. + 2005-11-11 Steven Bosscher <stevenb@suse.de> * loop-invariant.c (move_loop_invariants): Fix a thinko in the diff --git a/gcc/recog.c b/gcc/recog.c index 111f9cb..16bb280 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; |