From patchwork Thu Jun 2 07:15:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Segher Boessenkool X-Patchwork-Id: 629067 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 3rKz6T4mM7z9sRZ for ; Thu, 2 Jun 2016 17:16:16 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=Wwb7X0Al; 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:from :to:cc:subject:date:message-id; q=dns; s=default; b=jUn5vOhEdWrz fqaaNtvDMQyR8ZNgw31hGaI73SsYfMAGGPUZIxV/D0hCMohDOMPCPK7jXXUTmplm bifKjrEy6TE62luaqeIvJ/U/qggXDCDMa7Oc4xdHqnpcrNd1w8Y/m/uqdaADDlAS 7sKZdrrZoRHdrvGTfo1gtFFEwhh/RQg= 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:from :to:cc:subject:date:message-id; s=default; bh=xT6Vkh0QSJkpboAtvK VlsfIQgK4=; b=Wwb7X0Al2rt/n95Kcsr6uqMkRfIu9/+6qMc/6AK2pA3bIk9cZG nv5B4in6GLkkkTuZjXfxuPeIytMjH1znkYS2J9sV3twQ53GaxgX3l9relVE4LScS 8MncD5WqsObjICLUADe9Uk0YAPSFnzr+7N47ROgbDfC9fg8Ryej3Uc1b0= Received: (qmail 52706 invoked by alias); 2 Jun 2016 07:16:08 -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 52686 invoked by uid 89); 2 Jun 2016 07:16:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=2016-06-02, fmr, 20160602 X-HELO: gcc1-power7.osuosl.org Received: from gcc1-power7.osuosl.org (HELO gcc1-power7.osuosl.org) (140.211.15.137) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 02 Jun 2016 07:15:57 +0000 Received: by gcc1-power7.osuosl.org (Postfix, from userid 10019) id EA6821C0759; Thu, 2 Jun 2016 07:15:54 +0000 (UTC) From: Segher Boessenkool To: gcc-patches@gcc.gnu.org Cc: Segher Boessenkool Subject: [PATCH] rs6000: Correct the "length" attribute for trunctddd2 Date: Thu, 2 Jun 2016 07:15:50 +0000 Message-Id: X-IsSubscribed: yes Found in one of the ubsan testcases: a branch went out of range because of this incorrect length. Committing to mainline. Segher 2016-06-02 Segher Boessenkool * config/rs6000/dfp.md (trunctddd2): Correct the "length" attribute. --- gcc/config/rs6000/dfp.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/config/rs6000/dfp.md b/gcc/config/rs6000/dfp.md index a631ff5..7029eb6 100644 --- a/gcc/config/rs6000/dfp.md +++ b/gcc/config/rs6000/dfp.md @@ -173,7 +173,8 @@ (define_insn "trunctddd2" (clobber (match_scratch:TD 2 "=d"))] "TARGET_DFP" "drdpq %2,%1\;fmr %0,%2" - [(set_attr "type" "fp")]) + [(set_attr "type" "fp") + (set_attr "length" "8")]) (define_insn "adddd3" [(set (match_operand:DD 0 "gpc_reg_operand" "=d")