From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by sourceware.org (Postfix) with ESMTPS id DDEF6385842B for ; Tue, 12 Jul 2022 11:18:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DDEF6385842B Received: by mail-ej1-x629.google.com with SMTP id bp15so3438080ejb.6 for ; Tue, 12 Jul 2022 04:18:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4ZxNvU8S6OCtODM0/sJZsTjHoSyNjP42uo2Auy9uOFs=; b=frv3GixKlPSK2oF1u3MS4M0G0kkgvOoQP36TnHY/+8zMZdKfargSYC/TqmdPTTUkYG j4Oahf8Fq+VYC4EXjyS03FFJOdGiK9fEJh4huAmxsrSsBkhC//UH1E14zvefI4BhjmIx GjVhN9m1D8jYsn51uhYl3pQE4PCurP0MfkjHo+1AhJCVi6+7YjVpGAXTnszkdcU/ctDQ Xc1jzXWtnPj+J0V34HcYwdDNkMeveGPKrC11PNXKpd0gY7QHnI8Tm59X1iI3K5S4vmrG 3RzZ/jQCfrhCgNq1dLI/feiDV1faqCUJFAEzkKN0zOw2did/I9rt6FcqTLzFt0v1XGO7 A7hw== X-Gm-Message-State: AJIora9o8dfawKf3fQHqAJ+35w5XVp2JThaPDOlF4M6VF1xbVKcAmxxO Gj6mspR/pdiPFEOZbQoEJhe3OCYUl/0oMzp/zIRsrmjWf78= X-Google-Smtp-Source: AGRyM1skU7Ot1tBlq1NjVaeWTwq6FS9DX4FcIh1bPtn0Voj/POMNDs4a3Cox3xFJM8lwtCVNF40BjA6/+6lcqmiT1/k= X-Received: by 2002:a17:907:2c57:b0:72b:32a8:7afc with SMTP id hf23-20020a1709072c5700b0072b32a87afcmr19181141ejc.129.1657624702769; Tue, 12 Jul 2022 04:18:22 -0700 (PDT) MIME-Version: 1.0 References: <2A99A5EA-C863-465C-A983-244A48D2E3C3@gmail.com> <473de1ae-ab00-357c-56e1-a12e2eab779a@suse.com> <6ede8e90-9db2-3676-3749-58382dd74e40@suse.com> In-Reply-To: From: Dmitry Selyutin Date: Tue, 12 Jul 2022 14:17:46 +0300 Message-ID: Subject: Re: Teaching expression() to treat some operations specially To: Jan Beulich Cc: lkcl , Binutils , Alan Modra Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jul 2022 11:18:25 -0000 On Tue, Jul 12, 2022 at 1:44 PM Jan Beulich wrote: > why again can't you deal with * > there (converting the thing to an X_md expression)? Actually this is what we already do. :-) https://git.libre-soc.org/?p=binutils-gdb.git;a=blob;f=gas/config/tc-ppc.c;h=989d1a29a56a364cdfcce6b670f7466ff8eaaeea;hb=refs/heads/svp64-ng#l4238 There are two issues: 1. Handle register names in macros in a uniform way. 2. Handle unary * operator. The thread became a bit confusing due to these questions being somewhat related (e.g. whether these should be parsed in the same place). My point was, since * is indeed an unary operator, it's kind of natural for it to be handled at md_operator. However, we can stick to md_operand, no problems; so the second question is already solved. As for the first one, I'm now preparing a patch for it (it's also about md_operand, anyway). I attempt to make the code somewhat more straightforward and generic, and also handle X_md stuff at port's side. I'll update on this. Thank you for your help and advice! -- Best regards, Dmitry Selyutin