From patchwork Wed Oct 26 16:17:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Law X-Patchwork-Id: 687182 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 3t3wD46Vlvz9sf9 for ; Thu, 27 Oct 2016 03:17:56 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=VdDXjXgb; 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=SCWOYkLbZk/KQRFywhdBYkj5hU9OqAxaaLYY4F/7Lp42XkOtx6 n9iBfprNI4U5ikvG1UaOK68wkBF4EJhA54b+7xZzfvzNaViHA9jnB8PGeYJ2YxAy jfigyJsAq0N09rUfY7XPGXpJW68qG62MNlYCttfnAt7l4CvNK1xEYRORM= 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=cfSB1609uAret3L5bmXeQ14z0pg=; b=VdDXjXgbxGtmb6MK4OqS xng1M/BMDE0iGCR6Tai+rI5fS0INtSnrd0v3it8QSaXzJTuN/ZbxkNR1KS554zZe YiSMk2o8qnn/DLCzwxhLHCg6hnrBLu8TqjuDZAppXBn1dm1kn8OlEwDNprhVI6ua imljcHyrrkmL8nIKKiwQhyU= Received: (qmail 56795 invoked by alias); 26 Oct 2016 16:17:48 -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 56774 invoked by uid 89); 26 Oct 2016 16:17:47 -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=Hx-languages-length:1566, issuing, ASM 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:17:46 +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 DCFE881129 for ; Wed, 26 Oct 2016 16:17:44 +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 u9QGHi28010754 for ; Wed, 26 Oct 2016 12:17:44 -0400 To: gcc-patches From: Jeff Law Subject: Fix frv port WRT fallthru Message-ID: Date: Wed, 26 Oct 2016 10:17:44 -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 We will return garbage from comparison_string in the event of an error in an ASM due to unintentional fallthru. My first through was to have output_operand_lossage declared as non-returning, but returning in the case of a user ASM is what it's designed to do AFAICT. So we just avoid the fallthru and return an empty string after issuing the error. Installing on the trunk. Jeff commit ff166102929f47c8bffb5aa8699066d9fafa8bb2 Author: law Date: Wed Oct 26 16:15:38 2016 +0000 * config/frv/frv.c (comparison_string): Do not fall through after an error. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@241576 138bc75d-0d04-0410-961f-82ee72b054a4 diff --git a/gcc/ChangeLog b/gcc/ChangeLog index afa4562..53d751d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,8 @@ 2016-10-26 Jeff Law + * config/frv/frv.c (comparison_string): Do not fall through after + an error. + * config/iq2000/iq2000.c (iq2000_function_arg): Adjust fallthru comment. (expand_one_builtin): Add missing break. diff --git a/gcc/config/frv/frv.c b/gcc/config/frv/frv.c index 352bcff..50899a7 100644 --- a/gcc/config/frv/frv.c +++ b/gcc/config/frv/frv.c @@ -2688,7 +2688,7 @@ comparison_string (enum rtx_code code, rtx op0) bool is_nz_p = GET_MODE (op0) == CC_NZmode; switch (code) { - default: output_operand_lossage ("bad condition code"); + default: output_operand_lossage ("bad condition code"); return ""; case EQ: return "eq"; case NE: return "ne"; case LT: return is_nz_p ? "n" : "lt";