From patchwork Thu May 12 09:44:55 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Clifton X-Patchwork-Id: 95283 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 720761007D5 for ; Thu, 12 May 2011 20:44:21 +1000 (EST) Received: (qmail 21660 invoked by alias); 12 May 2011 09:44:20 -0000 Received: (qmail 21649 invoked by uid 22791); 12 May 2011 09:44:19 -0000 X-SWARE-Spam-Status: No, hits=-6.2 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_HI, SPF_HELO_PASS, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 12 May 2011 09:43:50 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p4C9hotL010111 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 12 May 2011 05:43:50 -0400 Received: from Gift.redhat.com (vpn1-7-176.ams2.redhat.com [10.36.7.176]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p4C9hkMX016790 for ; Thu, 12 May 2011 05:43:48 -0400 From: Nick Clifton To: gcc-patches@gcc.gnu.org Subject: RX: 4.6 branch: Obvious fixes Date: Thu, 12 May 2011 10:44:55 +0100 Message-ID: MIME-Version: 1.0 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 Hi Guys, I am applying the patch below to the RX backend on the 4.6 branch. It fixes several small, obvious bugs, as described in the changelog. Cheers Nick gcc/ChangeLog 2011-05-12 Nick Clifton * config/rx/rx.h (HAVE_PRE_DECREMENT): Fix typo. * config/rx/rx.c (rx_is_legitimate_constant): Use gcc_unreachable instead of abort. (rx_align_for_label): Test label before extracting its number of uses. (rx_max_skip_for_label): Ignore debug insns. Index: gcc/config/rx/rx.h =================================================================== --- gcc/config/rx/rx.h (revision 173693) +++ gcc/config/rx/rx.h (working copy) @@ -155,7 +155,7 @@ #define LEGITIMATE_CONSTANT_P(X) rx_is_legitimate_constant (X) -#define HAVE_PRE_DECCREMENT 1 +#define HAVE_PRE_DECREMENT 1 #define HAVE_POST_INCREMENT 1 #define MOVE_RATIO(SPEED) ((SPEED) ? 4 : 2) Index: gcc/config/rx/rx.c =================================================================== --- gcc/config/rx/rx.c (revision 173693) +++ gcc/config/rx/rx.c (working copy) @@ -2451,8 +2451,7 @@ default: /* FIXME: Can this ever happen ? */ - abort (); - return false; + gcc_unreachable (); } break; @@ -2758,7 +2757,7 @@ because the delay due to the inserted NOPs would be greater than the delay due to the misaligned branch. If uses_threshold is zero then the alignment is always useful. */ - if (LABEL_NUSES (lab) < uses_threshold) + if (LABEL_P (lab) && LABEL_NUSES (lab) < uses_threshold) return 0; return optimize_size ? 1 : 3; @@ -2775,7 +2774,7 @@ op = lab; do { - op = next_nonnote_insn (op); + op = next_nonnote_nondebug_insn (op); } while (op && (LABEL_P (op) || (INSN_P (op) && GET_CODE (PATTERN (op)) == USE)));