From patchwork Thu Sep 6 03:19:12 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liqin Chen X-Patchwork-Id: 182000 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 886F02C008B for ; Thu, 6 Sep 2012 13:19:45 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1347506386; h=Comment: DomainKey-Signature:Received:Received:Received:Received: MIME-Version:Received:Received:Date:Message-ID:Subject:From:To: Cc:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=wvLW1Hn YqbDNpTzmv1YL1+xPRz0=; b=hBqcWIKFct06Ro5yVdMC5moTDwhHiTT0sTTbG/N O3ocXxj8Glg6PtV78bQE/mVJzG98NR2hA+cgxgBBaAvH5WZwnVfOaAlJzWbCMCr7 4XsuyliM8UG6Hgy1zSZLx3JaSxsXjajZh8hD9Qxe6qKf8MBsWmN9J04dleXoI5Pq IYAg= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:MIME-Version:Received:Received:Date:Message-ID:Subject:From:To:Cc:Content-Type:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=tBTCU2VbCg2YWH+X9EOaQPQcjwRvh6Ow5Veskn8GhZI1I/7qfKM0hL/rfoSh8U rltwTP940J/eR6DsTPX8OIBSEc7sjGaZelc2PRNevYGyvPu+P6qtQaBNdxm3T0xk fL4HjIgxo6fqZJuD0Idmt7HWSzyyijyNhcQHLafpaFwRg=; Received: (qmail 22677 invoked by alias); 6 Sep 2012 03:19:42 -0000 Received: (qmail 22668 invoked by uid 22791); 6 Sep 2012 03:19:41 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, KAM_STOCKGEN, KHOP_RCVD_TRUST, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-ie0-f175.google.com (HELO mail-ie0-f175.google.com) (209.85.223.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 06 Sep 2012 03:19:13 +0000 Received: by iebc11 with SMTP id c11so2418576ieb.20 for ; Wed, 05 Sep 2012 20:19:12 -0700 (PDT) MIME-Version: 1.0 Received: by 10.50.195.134 with SMTP id ie6mr91629igc.28.1346901552492; Wed, 05 Sep 2012 20:19:12 -0700 (PDT) Received: by 10.50.104.168 with HTTP; Wed, 5 Sep 2012 20:19:12 -0700 (PDT) Date: Thu, 6 Sep 2012 11:19:12 +0800 Message-ID: Subject: [patch, score] Remove TARGET_LEGITIMIZE_ADDRESS define From: Liqin Chen To: gcc-patches@gcc.gnu.org Cc: Liqin Chen X-IsSubscribed: yes 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 Remove inconsistent code and macro define in score backend, Use gcc default code instead. --liqin ChangeLog: 2012-09-06 Chen Liqin * config/score/score.c : Remove TARGET_LEGITIMIZE_ADDRESS define and score_legitimize_address function, use compiler default code instead. Index: gcc/config/score/score.c =================================================================== --- gcc/config/score/score.c (revision 191002) +++ gcc/config/score/score.c (working copy) @@ -120,9 +120,6 @@ #undef TARGET_OPTION_OVERRIDE #define TARGET_OPTION_OVERRIDE score_option_override -#undef TARGET_LEGITIMIZE_ADDRESS -#define TARGET_LEGITIMIZE_ADDRESS score_legitimize_address - #undef TARGET_SCHED_ISSUE_RATE #define TARGET_SCHED_ISSUE_RATE score_issue_rate @@ -541,30 +538,6 @@ return gen_rtx_LO_SUM (Pmode, high, addr); } -/* This function is used to implement LEGITIMIZE_ADDRESS. If X can - be legitimized in a way that the generic machinery might not expect, - return the new address. */ -static rtx -score_legitimize_address (rtx x) -{ - enum score_symbol_type symbol_type; - - if (score_symbolic_constant_p (x, &symbol_type) - && symbol_type == SYMBOL_GENERAL) - return score_split_symbol (0, x); - - if (GET_CODE (x) == PLUS - && GET_CODE (XEXP (x, 1)) == CONST_INT) - { - rtx reg = XEXP (x, 0); - if (!score_valid_base_register_p (reg, 0)) - reg = copy_to_mode_reg (Pmode, reg); - return score_add_offset (reg, INTVAL (XEXP (x, 1))); - } - - return x; -} - /* Fill INFO with information about a single argument. CUM is the cumulative state for earlier arguments. MODE is the mode of this argument and TYPE is its type (if known). NAMED is true if this