Mercurial > hg > CbC > CbC_gcc
diff gcc/recog.c @ 63:b7f97abdc517 gcc-4.6-20100522
update gcc from gcc-4.5.0 to gcc-4.6
author | ryoma <e075725@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 24 May 2010 12:47:05 +0900 |
parents | 77e2b8dfacca |
children | f6334be47118 |
line wrap: on
line diff
--- a/gcc/recog.c Fri Feb 12 23:41:23 2010 +0900 +++ b/gcc/recog.c Mon May 24 12:47:05 2010 +0900 @@ -1,6 +1,6 @@ /* Subroutines used by or related to instruction recognition. Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998 - 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 + 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of GCC. @@ -35,7 +35,6 @@ #include "expr.h" #include "function.h" #include "flags.h" -#include "real.h" #include "toplev.h" #include "basic-block.h" #include "output.h" @@ -787,12 +786,18 @@ } -/* Try replacing every occurrence of FROM in INSN with TO. */ +/* Try replacing every occurrence of FROM in INSN with TO. This also + will replace in REG_EQUAL and REG_EQUIV notes. */ void validate_replace_rtx_group (rtx from, rtx to, rtx insn) { + rtx note; validate_replace_rtx_1 (&PATTERN (insn), from, to, insn, true); + for (note = REG_NOTES (insn); note; note = XEXP (note, 1)) + if (REG_NOTE_KIND (note) == REG_EQUAL + || REG_NOTE_KIND (note) == REG_EQUIV) + validate_replace_rtx_1 (&XEXP (note, 0), from, to, insn, true); } /* Function called by note_uses to replace used subexpressions. */ @@ -1972,7 +1977,7 @@ Autoincrement addressing is a typical example of mode-dependence because the amount of the increment depends on the mode. */ -int +bool mode_dependent_address_p (rtx addr) { /* Auto-increment addressing with anything other than post_modify @@ -1982,13 +1987,9 @@ || GET_CODE (addr) == POST_INC || GET_CODE (addr) == PRE_DEC || GET_CODE (addr) == POST_DEC) - return 1; - - GO_IF_MODE_DEPENDENT_ADDRESS (addr, win); - return 0; - /* Label `win' might (not) be used via GO_IF_MODE_DEPENDENT_ADDRESS. */ - win: ATTRIBUTE_UNUSED_LABEL - return 1; + return true; + + return targetm.mode_dependent_address_p (addr); } /* Like extract_insn, but save insn extracted and don't extract again, when @@ -2076,6 +2077,7 @@ recog_data.operand_loc, recog_data.constraints, recog_data.operand_mode, NULL); + memset (recog_data.is_operator, 0, sizeof recog_data.is_operator); if (noperands > 0) { const char *p = recog_data.constraints[0]; @@ -2105,6 +2107,7 @@ for (i = 0; i < noperands; i++) { recog_data.constraints[i] = insn_data[icode].operand[i].constraint; + recog_data.is_operator[i] = insn_data[icode].operand[i].is_operator; recog_data.operand_mode[i] = insn_data[icode].operand[i].mode; /* VOIDmode match_operands gets mode from their real operand. */ if (recog_data.operand_mode[i] == VOIDmode)