From patchwork Wed Oct 26 16:08:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Law X-Patchwork-Id: 687176 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 3t3w1r6BVWz9ryk for ; Thu, 27 Oct 2016 03:09:04 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=FLhyUSsY; 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=hmx+rGE8F3TaZJCga1Oib0PI2ZaEOQd5N+9Pl8yA1iycKjzLwU M+mLuADbt62lvWzLNz0cPQ6P9pSxf7+Y4n8jaT0gXtNUmrRjnkYKe/LL/QHZ7I8M iRUbdoQVHKs/BclfLk6pINBAGA/lsoKIzMB9e0NJY1FhUxhzw8/jF3e2g= 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=wgFC+oSmsdktGEnC1Tevm7PNTgU=; b=FLhyUSsYh0ep4wlHamIn 3fNNnFbjP6LQSuB5n9uWZU1vNCmOMQ1a0WDEvyCXJZD2RnXeM/qhNTOAuRZf8n/a A+tFC1FeUB/mf5HIh1M6PkO3fruiv8z23uK8kaFD4DqOGd6F1a6kAFhoW4blFkZw S5/pjo62aVVxdHrz19ETCZ0= Received: (qmail 36402 invoked by alias); 26 Oct 2016 16:08:55 -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 36388 invoked by uid 89); 26 Oct 2016 16:08:55 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=1766 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:08:54 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (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 F1E2066CB5 for ; Wed, 26 Oct 2016 16:08:52 +0000 (UTC) Received: from localhost.localdomain (ovpn-116-128.phx2.redhat.com [10.3.116.128]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u9QG8qF8000601 for ; Wed, 26 Oct 2016 12:08:52 -0400 To: gcc-patches From: Jeff Law Subject: Fix m32c WRT fallthrus Message-ID: <8e6d4da7-70f4-9794-74e6-25065dfde01e@redhat.com> Date: Wed, 26 Oct 2016 10:08:52 -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 In encode_pattern_1, we stuff the 'm' into the pattern for the memory operand, then want to recurse on the address. So A fallthru seems reasonable. In m32c_legitimate_address_p we have a special case for certain registers, but which does not apply to A0. So we've got case ... case ... special handling case A0_REGNO: common handling So fallthru is what we wanted here too. Installing on the trunk. Jeff commit 90189036e0ed5752b5bb448962bda507b97c18c5 Author: law Date: Wed Oct 26 16:08:30 2016 +0000 * config/m32c/m32c.c (encode_pattern_1): Add fallthru comment. (m32c_legitimate_address_p): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@241572 138bc75d-0d04-0410-961f-82ee72b054a4 diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1e03936..4aec3eb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,8 @@ 2016-10-26 Jeff Law + * config/m32c/m32c.c (encode_pattern_1): Add fallthru comment. + (m32c_legitimate_address_p): Likewise. + * config/m32r/m32r.c (m32r_print_operand): Adjust fallthru comment. * config/mcore/mcore.c (mcore_gen_compare): Adjust fallthru comments. diff --git a/gcc/config/m32c/m32c.c b/gcc/config/m32c/m32c.c index 7d64c49..ccd9675 100644 --- a/gcc/config/m32c/m32c.c +++ b/gcc/config/m32c/m32c.c @@ -176,6 +176,7 @@ encode_pattern_1 (rtx x) break; case MEM: *patternp++ = 'm'; + /* FALLTHRU */ case CONST: encode_pattern_1 (XEXP (x, 0)); break; @@ -1696,6 +1697,7 @@ m32c_legitimate_address_p (machine_mode mode, rtx x, bool strict) case SP_REGNO: if (TARGET_A16 && GET_MODE (x) == SImode) return 0; + /* FALLTHRU */ case A0_REGNO: return 1;