From patchwork Tue Sep 14 23:34:36 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 64769 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 46860B70A6 for ; Wed, 15 Sep 2010 09:35:07 +1000 (EST) Received: (qmail 32264 invoked by alias); 14 Sep 2010 23:35:05 -0000 Received: (qmail 32115 invoked by uid 22791); 14 Sep 2010 23:35:04 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 14 Sep 2010 23:34:40 +0000 Received: (qmail 22624 invoked from network); 14 Sep 2010 23:34:38 -0000 Received: from unknown (HELO digraph.polyomino.org.uk) (joseph@127.0.0.2) by mail.codesourcery.com with ESMTPA; 14 Sep 2010 23:34:38 -0000 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.69) (envelope-from ) id 1Ovf1I-0001N1-Sr; Tue, 14 Sep 2010 23:34:36 +0000 Date: Tue, 14 Sep 2010 23:34:36 +0000 (UTC) From: "Joseph S. Myers" To: gcc-patches@gcc.gnu.org cc: ni1d@arrl.net Subject: Fix build of cc1 for pdp11 Message-ID: MIME-Version: 1.0 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org The pdp11 back end has its own register_move_cost function that conflicts with the target-independent one added a few months ago. This patch fixes build of cc1 for this target by renaming the target's function to pdp11_register_move_cost. Tested with building cc1 for cross to pdp11-none. OK to commit? 2010-09-14 Joseph Myers * config/pdp11/pdp11.c (register_move_cost): Rename to pdp11_register_move_cost. * config/pdp11/pdp11-protos.h (register_move_cost): Rename to pdp11_register_move_cost. * config/pdp11/pdp11.h (REGISTER_MOVE_COST): Call pdp11_register_move_cost instead of register_move_cost. Index: config/pdp11/pdp11-protos.h =================================================================== --- config/pdp11/pdp11-protos.h (revision 164260) +++ config/pdp11/pdp11-protos.h (working copy) @@ -1,5 +1,6 @@ /* Definitions of target machine for GNU compiler, for the pdp-11 - Copyright (C) 2000, 2003, 2004, 2007 Free Software Foundation, Inc. + Copyright (C) 2000, 2003, 2004, 2007, 2009, 2010 + Free Software Foundation, Inc. Contributed by Michael K. Gschwind (mike@vlsivie.tuwien.ac.at). This file is part of GCC. @@ -34,7 +35,7 @@ extern const char *output_block_move (rtx *); extern const char *output_jump (enum rtx_code, int, int); extern void print_operand_address (FILE *, rtx); -extern int register_move_cost (enum reg_class, enum reg_class); +extern int pdp11_register_move_cost (enum reg_class, enum reg_class); #endif /* RTX_CODE */ extern void output_ascii (FILE *, const char *, int); Index: config/pdp11/pdp11.c =================================================================== --- config/pdp11/pdp11.c (revision 164260) +++ config/pdp11/pdp11.c (working copy) @@ -1070,7 +1070,7 @@ -- as we do here with 22 -- or not ? */ int -register_move_cost(enum reg_class c1, enum reg_class c2) +pdp11_register_move_cost (enum reg_class c1, enum reg_class c2) { return move_costs[(int)c1][(int)c2]; } Index: config/pdp11/pdp11.h =================================================================== --- config/pdp11/pdp11.h (revision 164260) +++ config/pdp11/pdp11.h (working copy) @@ -764,7 +764,7 @@ /* cost of moving one register class to another */ #define REGISTER_MOVE_COST(MODE, CLASS1, CLASS2) \ - register_move_cost (CLASS1, CLASS2) + pdp11_register_move_cost (CLASS1, CLASS2) /* Tell emit-rtl.c how to initialize special values on a per-function base. */ extern int optimize;