From patchwork Thu Nov 3 11:58:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Hua X-Patchwork-Id: 690784 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 3t8k6709xYz9vDZ for ; Thu, 3 Nov 2016 22:59: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=xdwKMQDe; 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 :mime-version:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; q=dns; s=default; b=Han5b1VdbwUf+xA w3SA0lkifQ2XU9/MG8hZsfSAdp6+uHVJj1usUyXPTkAGB9WzSkuGK6Ts+5SUFd3l +0/45tCAJlmmWg9Gpb3dRBnSYjjyDuCwPKp6eWhk4D7VipCiSTEZl/FSw1YJ+pCF gvEyYSlxMmbqst7LjF5N4DNbokn0= 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 :mime-version:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; s=default; bh=hgVaoT9h7+51QwzLkOrA6 y99TFw=; b=xdwKMQDeYubZQYjCYpn3JsoFNtk1McgY1cNeaorn7xRfeKFKD29qf 6nLWftGyaohzcUYDqs+/HUoMwSZ87p5awftLpiuzHGRrbG4FPgF0XbTtJRqTQo2u flQ5sOt7P/33PYJbyqzPVm+WzbmuCTfm9I3AMYwL8cZ+FrJVo614j0= Received: (qmail 23117 invoked by alias); 3 Nov 2016 11:59:10 -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 22633 invoked by uid 89); 3 Nov 2016 11:59:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=no version=3.3.2 spammy=sk:matthew X-HELO: mail-qk0-f176.google.com Received: from mail-qk0-f176.google.com (HELO mail-qk0-f176.google.com) (209.85.220.176) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 03 Nov 2016 11:58:58 +0000 Received: by mail-qk0-f176.google.com with SMTP id x190so51568394qkb.0 for ; Thu, 03 Nov 2016 04:58:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=zz8qcHT6cnuGO7e5wpbWiD0F7PoTL8h0DBVoj7tEf+Y=; b=ICkq2/6SqOMO42Y/EukKikF/k0g+li8XPjGXNtu+Ro99oQZHptVxw9BuD3zge+TCh4 9ZXPBzLEZDTWgLI+I3zKzYNYizBVdQ9xnmKRpO+tuniVtu/rqf3D56xQXfMwXe7OT14g 1Zi63+d6aoCmhWOiMClL9I+WI8joDJw/FqE/yH4YLtAJKeg4bPjdzH79X5XktZkn7cfz doeEKmVZm4tIhsZS6FJucqt5AFH5FKfHFqFUISk6znYkTaMXcJaP67sJDyqYjBJsb7WE AiDkxPX60fzHn+1T3ntjI1hN9CbeuTiHrz3h+vAteZvDcbhwdUegxYLUTXnuUkyItDwL IkAA== X-Gm-Message-State: ABUngvdsP78Bi4aoqBV0SG9/SVe4nkMcS++lmwCAeb3WNSyB+QRrv2Vf9feEAv6GXgaefnywGDx7UuZPQuzinA== X-Received: by 10.55.31.157 with SMTP id n29mr7089049qkh.221.1478174336687; Thu, 03 Nov 2016 04:58:56 -0700 (PDT) MIME-Version: 1.0 Received: by 10.55.94.65 with HTTP; Thu, 3 Nov 2016 04:58:56 -0700 (PDT) In-Reply-To: <6D39441BF12EF246A7ABCE6654B0235380AB5FAF@HHMAIL01.hh.imgtec.org> References: <6D39441BF12EF246A7ABCE6654B0235380AB5FAF@HHMAIL01.hh.imgtec.org> From: Paul Hua Date: Thu, 3 Nov 2016 19:58:56 +0800 Message-ID: Subject: Re: [PATCH,gcc/MIPS] Make loongson3a use fused madd.d To: Matthew Fortune Cc: "gcc-patches@gcc.gnu.org" , "catherine_moore@mentor.com" X-IsSubscribed: yes Hi Matthew, Thanks for your comments, update the patch. *** gcc/ChangeLog *** 2016-11-03 Chenghua Xu * config/mips/mips.h (ISA_HAS_FUSED_MADD4): Enable for TARGET_LOONGSON_3A. (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_LOONGSON_3A. Thanks, Paul On Thu, Nov 3, 2016 at 6:31 PM, Matthew Fortune wrote: > Paul Hua writes: >> Loongson3a has 4 operand fused madd instrcution. This patch set >> loongson3a use fused madd.d. > > Hi Paul, > > Thanks for the fix. I was vaguely aware that this was wrong for > loongson-3a but never confirmed it. > > I suspect this change is mechanical enough that it can bypass > copyright assignment but I'd need a global maintainer to comment. > > I've sent you copyright assignment paperwork separately. > > Two comments on the patch: > >> ChangeLog : >> >> *** gcc/ChangeLog *** >> >> 2016-11-03 Chenghua Xu >> >> config/mips/ >> * mips.h: Set loongson3a use fused madd.d. > > The changelog needs to reference what was changed rather than the > effect of the change: > > * config/mips/mips.h (ISA_HAS_FUSED_MADD4): Enable for > TARGET_LOONGSON_3A. > (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_LOONGSON_3A. > > >>diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h >>index 81862a9..5076a2b 100644 >>--- a/gcc/config/mips/mips.h >>+++ b/gcc/config/mips/mips.h >>@@ -1056,11 +1056,11 @@ struct mips_cpu_info { >> >> /* ISA has 4 operand fused madd instructions of the form >> 'd = [+-] (a * b [+-] c)'. */ >>-#define ISA_HAS_FUSED_MADD4 TARGET_MIPS8000 >>+#define ISA_HAS_FUSED_MADD4 (TARGET_MIPS8000 || TARGET_LOONGSON_3A) >> >> /* ISA has 4 operand unfused madd instructions of the form >> 'd = [+-] (a * b [+-] c)'. */ >>-#define ISA_HAS_UNFUSED_MADD4 (ISA_HAS_FP4 && !TARGET_MIPS8000) >>+#define ISA_HAS_UNFUSED_MADD4 (ISA_HAS_FP4 && !TARGET_MIPS8000 && !TARGET_LOONGSON_3A) > > Please split this line and move && !TARGET_LOONGSON_3A to the next line > under ISA_HAS_FP4. > >> >> /* ISA has 3 operand r6 fused madd instructions of the form >> 'c = c [+-] (a * b)'. */ > > Thanks, > Matthew > diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h index 81862a9..2a7a3f2 100644 --- a/gcc/config/mips/mips.h +++ b/gcc/config/mips/mips.h @@ -1056,11 +1056,13 @@ struct mips_cpu_info { /* ISA has 4 operand fused madd instructions of the form 'd = [+-] (a * b [+-] c)'. */ -#define ISA_HAS_FUSED_MADD4 TARGET_MIPS8000 +#define ISA_HAS_FUSED_MADD4 (TARGET_MIPS8000 || TARGET_LOONGSON_3A) /* ISA has 4 operand unfused madd instructions of the form 'd = [+-] (a * b [+-] c)'. */ -#define ISA_HAS_UNFUSED_MADD4 (ISA_HAS_FP4 && !TARGET_MIPS8000) +#define ISA_HAS_UNFUSED_MADD4 (ISA_HAS_FP4 \ + && !TARGET_MIPS8000 \ + && !TARGET_LOONGSON_3A) /* ISA has 3 operand r6 fused madd instructions of the form 'c = c [+-] (a * b)'. */