From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-x536.google.com (mail-pg1-x536.google.com [IPv6:2607:f8b0:4864:20::536]) by sourceware.org (Postfix) with ESMTPS id 722A43858D37 for ; Wed, 20 Jul 2022 03:06:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 722A43858D37 Received: by mail-pg1-x536.google.com with SMTP id 23so15205982pgc.8 for ; Tue, 19 Jul 2022 20:06:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=C51yuQ/txi8JGrkTNVclY7fPTbrJHtpc9zyqzLmuwG0=; b=mMZl4DKIP6qTY4LtMLivz/v//8JhjqVko/rC3DrqPiiTUcjutlkHSUA3ciVmWTZDWW 0R8ZlEvxWUd0Pb6/WC1mqCVrwx8TuQlTsYN5NKkSms4krzmRkhg8oYmWhi7yj7eNxY6H bo5nBwhukn1dg3hrOM0PwvEwQ7gf7pzZ8BkXPIFWexCQOysfsxEWppkJx3sC3fFTZBFI fJMxn2FHtj5OnCm2Ds8FXrf38MVzcuG7VdkCAFmZrbusKkqy+nMYAP2HqNRP7YR0MdIx 5hmXi3osvjrCZFfpxZYAcHG5SJUoTuLRE62vx5bMsx8HHTCteONASDs80+z4i+lco+a3 5doQ== X-Gm-Message-State: AJIora/PvH8K0TQj8vLuxzDU2IKXIXtLSPQuV1+wH8BDlb2+ekibgNdY r0WarWu5aSqZ2W0ISXLDbiI4x1FwTP0= X-Google-Smtp-Source: AGRyM1tc/4/PSlRbBISxSi9gHlQ66NncxivUzPKoXIQHZtxKNyWRahQRrGIV0anYGKlNDbzI8nf5ow== X-Received: by 2002:a05:6a00:1708:b0:52a:ecdd:69d1 with SMTP id h8-20020a056a00170800b0052aecdd69d1mr37141674pfc.75.1658286403475; Tue, 19 Jul 2022 20:06:43 -0700 (PDT) Received: from squeak.grove.modra.org (158.106.96.58.static.exetel.com.au. [58.96.106.158]) by smtp.gmail.com with ESMTPSA id 1-20020a620501000000b0052ba5fe74c8sm294690pff.54.2022.07.19.20.06.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Jul 2022 20:06:42 -0700 (PDT) Received: by squeak.grove.modra.org (Postfix, from userid 1000) id 86C9D1143300; Wed, 20 Jul 2022 12:36:40 +0930 (ACST) Date: Wed, 20 Jul 2022 12:36:40 +0930 From: Alan Modra To: Dmitry Selyutin Cc: binutils@sourceware.org, Luke Kenneth Casson Leighton Subject: Re: [PATCH] gas/symbols: introduce md_resolve_symbol Message-ID: References: <20220714212651.297902-1-ghostmansd@gmail.com> <20220718094652.21455-1-ghostmansd@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220718094652.21455-1-ghostmansd@gmail.com> X-Spam-Status: No, score=-3030.8 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 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: Wed, 20 Jul 2022 03:06:45 -0000 On Mon, Jul 18, 2022 at 12:46:53PM +0300, Dmitry Selyutin wrote: > Assuming GMSD is a special operand, marked as O_md1, the code: > > .set VREG, GMSD > .set REG, VREG > extsw REG, 2 > > ...fails upon attempts to resolve the value of the symbol. This happens > since machine-dependent values are not handled in the giant op switch. > We introduce a custom md_resolve_symbol macro; the ports can use this > macro to customize the behavior when resolve_symbol_value hits O_md > operand. Applied to mainline with a small tweak. -- Alan Modra Australia Development Lab, IBM