X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=gcc%2Fgenpreds.c;h=dd044f771e4b6e7f1a3450257845a7507fc55d32;hb=4ac5a450daf9f4e22dd90f2180cb15c2a4a7dc1f;hp=cb22908fb567a7ce89373be9452491985c58965e;hpb=3f980c569197e288a293a04298e7a9473188244c;p=pf3gnuchains%2Fgcc-fork.git diff --git a/gcc/genpreds.c b/gcc/genpreds.c index cb22908fb56..dd044f771e4 100644 --- a/gcc/genpreds.c +++ b/gcc/genpreds.c @@ -2,7 +2,7 @@ - prototype declarations for operand predicates (tm-preds.h) - function definitions of operand predicates, if defined new-style (insn-preds.c) - Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This file is part of GCC. @@ -18,8 +18,8 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GCC; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ +the Free Software Foundation, 51 Franklin Street, Fifth Floor, +Boston, MA 02110-1301, USA. */ #include "bconfig.h" #include "system.h" @@ -43,7 +43,7 @@ process_define_predicate (rtx defn) return; } - pred = xcalloc (sizeof (struct pred_data), 1); + pred = XCNEW (struct pred_data); pred->name = XSTR (defn, 0); pred->exp = XEXP (defn, 1); pred->c_block = XSTR (defn, 2); @@ -122,7 +122,7 @@ write_predicate_subfunction (struct pred_data *p) obstack_grow (rtl_obstack, p->name, strlen (p->name)); obstack_grow (rtl_obstack, "_1 (op, mode)", sizeof "_1 (op, mode)"); - match_test_str = obstack_finish (rtl_obstack); + match_test_str = XOBFINISH (rtl_obstack, const char *); /* Add the function-call expression to the complete expression to be evaluated. */ @@ -138,6 +138,7 @@ write_predicate_subfunction (struct pred_data *p) printf ("static inline int\n" "%s_1 (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)\n", p->name); + print_rtx_ptr_loc (p->c_block); if (p->c_block[0] == '{') fputs (p->c_block, stdout); else @@ -377,7 +378,7 @@ write_predicate_expr (const char *name, rtx exp) break; case MATCH_TEST: - fputs (XSTR (exp, 0), stdout); + print_c_condition (XSTR (exp, 0)); break; default: