From patchwork Wed Oct 26 16:35:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Law X-Patchwork-Id: 687207 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3t3wdS5Wjvz9sBR for ; Thu, 27 Oct 2016 03:36:26 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=SN7eNZJX; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=Y9cm36s60ABZ20bsrf2zYtledmo7aG+2jNlXG9eWyoCZcWz9Wk l5Us+lBsOx2DFMWu5leNfBDr6+IrFXhSgg10+c0EDhB8Fxh6UnIz7T73wM5252LU O65LuklL98iJQ2YIKTv4TdQ9AUUNwJvgoHvUqVIK6sOQEBLxgHV1oBr/s= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; s= default; bh=JCu9lhu04aKSwT5a4Ag6blsxfZc=; b=SN7eNZJX4oMf0oJy08ZC SJ4jsU0BvEG0pXZjJGnuN4OZIshogQcvJVdTycUgTTqcxO1ogsBiDnfc/o4H5L+j vBiIH/c8O2mNGdW/KMGcVCVqLYtmUhz6K+dAiXeC4u9CJQc/4RXdDRiJMaQhP4io KBg3xGq6PrqiTv5/WiOswzg= Received: (qmail 112638 invoked by alias); 26 Oct 2016 16:36:13 -0000 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 Received: (qmail 111863 invoked by uid 89); 26 Oct 2016 16:36:11 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=BAYES_00, KAM_STOCKGEN, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=sk:operand, sk:check_i X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 26 Oct 2016 16:36:01 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BCA292960 for ; Wed, 26 Oct 2016 16:35:59 +0000 (UTC) Received: from localhost.localdomain (ovpn-116-128.phx2.redhat.com [10.3.116.128]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u9QGZxBL004105 for ; Wed, 26 Oct 2016 12:35:59 -0400 To: gcc-patches From: Jeff Law Subject: Fix ARC port WRT fallthru and sprintf warnings Message-ID: <5d06d51f-4fb9-4cc5-3a22-3a856c4e9193@redhat.com> Date: Wed, 26 Oct 2016 10:35:59 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 X-IsSubscribed: yes The usuall fallthru and sprintf stuff. These required a bit more thought, but nothing terribly taxing. Installing on the trunk. jeff commit 7227c03164300c5f5188a1261b3c57f0b7072394 Author: law Date: Wed Oct 26 16:33:22 2016 +0000 * config/arc/arc.c (acr_print_operand): Adjust fallthru comment. (check_if_valid_sleep_operand): Add missing fallthru comment. (arc_register_move_cost): Increase buffer size. * config/arc/arc.md (cbranch4si_scratch): Add missing fallthru comment. * config/arc/predicates.md (move_str_operand): Avoid fallthru. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@241585 138bc75d-0d04-0410-961f-82ee72b054a4 diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ce2693b..1aa397e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,12 @@ 2016-10-26 Jeff Law + * config/arc/arc.c (acr_print_operand): Adjust fallthru comment. + (check_if_valid_sleep_operand): Add missing fallthru comment. + (arc_register_move_cost): Increase buffer size. + * config/arc/arc.md (cbranch4si_scratch): Add missing fallthru + comment. + * config/arc/predicates.md (move_str_operand): Avoid fallthru. + * config/cr16/cr16.c (cr16_print_operand): Add missing fallthru comment. Add gcc_unreachable for path that should never happen. diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c index 21bba0c..0e7b63d 100644 --- a/gcc/config/arc/arc.c +++ b/gcc/config/arc/arc.c @@ -3459,7 +3459,8 @@ arc_print_operand (FILE *file, rtx x, int code) fprintf (file, "0x%08lx", l); break; } - /* Fall through. Let output_addr_const deal with it. */ + /* FALLTHRU */ + /* Let output_addr_const deal with it. */ default : if (flag_pic || (GET_CODE (x) == CONST @@ -6197,6 +6198,7 @@ check_if_valid_sleep_operand (rtx *operands, int opno) case CONST_INT : if( UNSIGNED_INT6 (INTVAL (operands[opno]))) return true; + /* FALLTHRU */ default: fatal_error (input_location, "operand for sleep instruction must be an unsigned 6 bit compile-time constant"); @@ -7284,7 +7286,7 @@ arc_register_move_cost (machine_mode, int arc_output_addsi (rtx *operands, bool cond_p, bool output_p) { - char format[32]; + char format[35]; int match = operands_match_p (operands[0], operands[1]); int match2 = operands_match_p (operands[0], operands[2]); diff --git a/gcc/config/arc/arc.md b/gcc/config/arc/arc.md index 3c531d9..e127d5b 100644 --- a/gcc/config/arc/arc.md +++ b/gcc/config/arc/arc.md @@ -4891,6 +4891,7 @@ case 4: return \"br%d0%* %1, %B2, %^%l3\"; case 8: if (!brcc_nolimm_operator (operands[0], VOIDmode)) return \"br%d0%* %1, %B2, %^%l3\"; + /* FALLTHRU */ case 6: case 10: case 12:return \"cmp%? %1, %B2\\n\\tb%d0%* %^%l3%&;br%d0 out of range\"; default: fprintf (stderr, \"unexpected length %d\\n\", get_attr_length (insn)); fflush (stderr); gcc_unreachable (); diff --git a/gcc/config/arc/predicates.md b/gcc/config/arc/predicates.md index f85f931..cb75dbc 100644 --- a/gcc/config/arc/predicates.md +++ b/gcc/config/arc/predicates.md @@ -266,6 +266,7 @@ case SYMBOL_REF : if (SYMBOL_REF_TLS_MODEL (op)) return 0; + return 1; case LABEL_REF : return 1; case CONST :