From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 100433 invoked by alias); 30 Oct 2019 19:14:00 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 100058 invoked by uid 89); 30 Oct 2019 19:13:59 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.1 spammy=H*F:D*comcast.net, H*i:sk:92fddbc, H*MI:sk:92fddbc, H*f:sk:92fddbc X-HELO: resqmta-po-12v.sys.comcast.net Received: from resqmta-po-12v.sys.comcast.net (HELO resqmta-po-12v.sys.comcast.net) (96.114.154.171) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 30 Oct 2019 19:13:57 +0000 Received: from resomta-po-11v.sys.comcast.net ([96.114.154.235]) by resqmta-po-12v.sys.comcast.net with ESMTP id PozOiXJejp6xOPtPniBBrL; Wed, 30 Oct 2019 19:13:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=20190202a; t=1572462835; bh=s/0RSRuftj7rqnkKx9T+gNJ5V8UI9l0HvjwcN+l5xbQ=; h=Received:Received:Content-Type:Mime-Version:Subject:From:Date: Message-Id:To; b=l32/AXgImlLS4FLwOqg6OQDJdwDPlyjTuua7vbnGLEQyTcPibWK4NMGD5O8b+EIeT Un1jugsp3Jx7Bu9+sjbFD9tLqoFd4dblVJ8tGHfP1gI4Gd2rIP0immjLnnNVLJFmIk gIAqsmMIFp7zoaQVLSUuS4LrP9Pt5dCUrpZu0WwWjcS/SztFZHZhn8o4xLlEyIwuW1 RFBmdGw3kuxjHELZLlFpoKiA5feSqVgp/kbqdHdeI0W2YsuWzoCrzkY/3TuLBPTCsx 8JSX63hz5EhTTIiFiJiK4s7VwP/Qljc+YHMof/L7GDL7ZIm3u0Zi1kvWxKdDilQ1yp az1BCQaSmZ4bA== Received: from pkoning.akdesign.com ([73.60.223.101]) by resomta-po-11v.sys.comcast.net with ESMTPA id PtPjipnaDUi3wPtPkinIV6; Wed, 30 Oct 2019 19:13:55 +0000 X-Xfinity-VAAS: gggruggvucftvghtrhhoucdtuddrgedufedruddtfedguddvgecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucevohhmtggrshhtqdftvghsihdpqfgfvfdppffquffrtefokffrnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpegtggfuhfgjfffgkfhfvffosehtqhhmtdhhtddvnecuhfhrohhmpefrrghulhcumfhonhhinhhguceophgruhhlkhhonhhinhhgsegtohhmtggrshht X-Xfinity-VMeta: sc=-100.00;st=legit Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: Deprecating cc0 (and consequently cc0 targets) From: Paul Koning In-Reply-To: <92fddbcb-3e51-20e9-9eb3-34000ae340e3@redhat.com> Date: Wed, 30 Oct 2019 19:34:00 -0000 Cc: Richard Biener , John Paul Adrian Glaubitz , gcc-patches , Denis Chertykov , hp@axis.com, Andreas Schwab , Matt Thomas Content-Transfer-Encoding: quoted-printable Message-Id: <4503D953-A6CF-4F70-8263-426BC4464E1B@comcast.net> References: <61a6a83a-beec-24a2-7726-fba9e02f5ab9@physik.fu-berlin.de> <12e368c7-94db-1a42-6458-53596ebfb623@redhat.com> <92fddbcb-3e51-20e9-9eb3-34000ae340e3@redhat.com> To: Jeff Law X-SW-Source: 2019-10/txt/msg02182.txt.bz2 > On Oct 30, 2019, at 2:24 PM, Jeff Law wrote: >=20 > On 10/30/19 2:12 AM, Richard Biener wrote: >> On Tue, Oct 29, 2019 at 8:34 PM Jeff Law wrote: >=20 >>=20 >> I think the wiki has better examples. That said, I wonder how much can >> be automated here, for example when just considering CCmode (m68k has >> setcc IIRC) then for example all define_insns like >>=20 >> (define_insn "*cmpsi_cf" >> [(set (cc0) >> (compare (match_operand:SI 0 "nonimmediate_operand" "mrKs,r") >> (match_operand:SI 1 "general_operand" "r,mrKs")))] >> "TARGET_COLDFIRE" >> {...} > The compare/test insns are relatively straightforward as they're a > fairly simple substitution. It's all the other insns that implicitly > set cc0 that are so painful. >=20 >=20 >>=20 >> The various expanders need to be handled manually I guess, though somehow >> automagically generating the define_insn_and_split might be possible >> as well, no? > I was looking at define_subst to help here, but it didn't look like it > was really going to simplify things in any significant way. Maybe > someone with more experience with define_subst would see something that > would dramtically simplify this process. I've found define_subst to be quite helpful for generating the pairs of "cl= obbers CC" and "sets CC in a useful way from the operation result" pairs th= at Richard was referring to. pdp11.md shows what I learned; it may be appl= icable elsewhere too. This is for a "case 2" target, one that modifies CC = on most operations (essentially all those that do arithmetic). paul