From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 94111 invoked by alias); 8 Apr 2019 06:09:26 -0000 Mailing-List: contact cgen-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cgen-owner@sourceware.org Received: (qmail 94102 invoked by uid 89); 8 Apr 2019 06:09:26 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 spammy=Frank, Matos, Paulo, matos X-HELO: box.linki.tools Received: from box.linki.tools (HELO box.linki.tools) (88.198.125.222) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 08 Apr 2019 06:09:24 +0000 Received: from authenticated-user (box.linki.tools [88.198.125.222]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by box.linki.tools (Postfix) with ESMTPSA id A10DF400A0 for ; Mon, 8 Apr 2019 08:09:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=linki.tools; s=mail; t=1554703760; bh=P87eI8Xz2o0SEg6v91zW3HPcJ0aRu9C488NAGulwZ8c=; h=Subject:To:References:From:Date:In-Reply-To:From; b=S33MXHZaVDVnIT5/1P095LUnTzu9l8KorZEHrgZlT4aXWA8cxOkSFAVVFasOBjrGd ebQAhomxEljCvWQeSKLozLhRuJNvF/a4Rnj2yE7WNeeoTUozMs2q4mzIbQd2Sd8Gl0 VHQEepWUsUHvJIq7OlBVr8dBQfA5F4fjLUfICMh8/TmPwyACXWRJSnZ2EZdgL1+rW+ xRGP2PWvdtjDIrBvNQqYbizPNCi5OZL4ISpeF4wwwZluSI0crDNxj/Y0J4gEqlbAOI kG2SWk8q/kqbuBKmgH7Cx5chimc5yfa/gd+cISr9IoHZCk7lJs4liOy4+1yO22LrfD 0S5AvycRqJ5DQ== Subject: Re: Macro with same operands is misbehaving To: cgen@sourceware.org References: <2978b83b-e5eb-434d-f39b-b763782c11cf@linki.tools> <20190408012812.GD1874@redhat.com> From: Paulo Matos Openpgp: preference=signencrypt Message-ID: <68ada948-e1b3-fc84-0fd6-d5b9e102bf89@linki.tools> Date: Mon, 08 Apr 2019 06:09:00 -0000 MIME-Version: 1.0 In-Reply-To: <20190408012812.GD1874@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2019-q2/txt/msg00002.txt.bz2 On 08/04/2019 03:28, Frank Ch. Eigler wrote: > Hi - > >> If I define the instruction fsgnj.s and followed by fmv.s macro, during >> disassembly `fsgnj.s` is always chosen, although assembly works fine. >> [...] >> I can't find a way to say: `fmv.s` matches for disassembly but only if >> `f1` == `f2` in `fsgnj.s f0, f1, f2`. > > I don't know of a way either, at the cgen .cpu level. But I must ask > ... why is this particular disassembly heuristic seem important, given > that those are equivalent? Anyway, it may be possible to handle at > the disassmembler driver level (in C code) even if .cpu/cgen can't > express it. > The client reckons it's important to show the macro version when possible. :) When you mean at the disassembler level in C, I then assume there's a hook that cgen calls before printing a disassembly string to the output that I can use to mangle the string back into the macro version? -- Paulo Matos