From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com [IPv6:2607:f8b0:4864:20::42c]) by sourceware.org (Postfix) with ESMTPS id 76A443853823 for ; Mon, 13 Jun 2022 20:59:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 76A443853823 Received: by mail-pf1-x42c.google.com with SMTP id y196so6797051pfb.6 for ; Mon, 13 Jun 2022 13:59:26 -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=nxO3oe+rNSDIolKf8dry3tMeFcm/3jeyiLCIOaQuk8E=; b=usGA8dgh0nTb92GSTSZmbUZG40XBUpzqa8BV+NbWmCQE+4yPnGPE0tX/2910f8Uusg 6ZehX9il07EyI8PFiBO6K+swFsoYUGB62NFSRVOpYm8nTPL0xv1X7Aj0dgOVY0ttpc+2 u8juFNol+d4T9zZlafgtUm4cp2F+UwHkrMod3Uk2qdpbO5iqRMlFWE+ItgkCQlfU2dgS cvj8nYXeqtPXkkspQOgtrd/34gHVHOaP5GT0GtjVIPLlJllyELn/YxFQGKDmj8ibirMw X5KzI0w/3NBBK5MGcwMQOvcL5o7Z5+27dJImxO0Rr4xof3mBF5BXxgm2uF2ghQ8ApiAZ 0yEw== X-Gm-Message-State: AOAM530HUG8Hr7dfpfIQmXEYhC6CavX8acePqOJsSnK3qUYAq8a5Kv+X 3wDeVzdCOx3P28MZHBZViZt/X9NNS3iDXbInUOWrAnhI7D8= X-Google-Smtp-Source: ABdhPJzTJVnsCvH4Pxl3ODPvPl0i1f03tWBlPT4cJwGkm4FNQIkBJFAYcUie6rBjt72cF3doEzPazM2h7VHoq4y1SPc= X-Received: by 2002:a63:5522:0:b0:405:1ff7:33dd with SMTP id j34-20020a635522000000b004051ff733ddmr1361162pgb.86.1655153965346; Mon, 13 Jun 2022 13:59:25 -0700 (PDT) MIME-Version: 1.0 References: <6fd28ca0-2af4-7335-18d3-31036dea7a4f@suse.com> In-Reply-To: From: "H.J. Lu" Date: Mon, 13 Jun 2022 13:58:49 -0700 Message-ID: Subject: Re: [PATCH 4/4] x86: replace global scratch buffer To: Jan Beulich Cc: Binutils , Andrew Burgess Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3019.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: Mon, 13 Jun 2022 20:59:29 -0000 On Mon, Jun 13, 2022 at 7:55 AM Jan Beulich wrote: > > On 13.06.2022 15:59, H.J. Lu wrote: > > On Fri, Jun 10, 2022 at 6:36 AM Jan Beulich wrote: > >> > >> With its movement to the stack, and with the subsequent desire to > >> initialize the entire instr_info instances, this has become doubly > >> inefficient. Individual users have better knowledge of how big a buffer > >> they need, and in a number of cases going through an intermediate buffer > >> can be avoided altogether. > >> > >> Having got confirmation that it wasn't intentional to print memory > >> operand displacements with inconsistent style, print_displacement() is > >> now using dis_style_address_offset consistently (eliminating the need > >> for callers to pass in a style). > >> > >> While touching print_operand_value() also convert its "hex" parameter to > >> bool. And while altering (and moving) oappend_immediate(), fold > >> oappend_maybe_intel_with_style() into its only remaining caller. Finally > >> where doing adjustments, use snprintf() in favor of sprintf(). > >> --- > >> While doing the conversion I came to notice that print_operand_value()'s > >> "hex" parameter has only ever passed "true" to it. I wonder why this > >> parameter still exists. > >> > > > > Andrew, > > > > Do you have follow-up patches to pass "false" to print_operand_value? > > I don't think that's related to Andrew's work. Even when looking at plain > 2.37 (which I'm sure predates any of his work) I see only 1 ever passed > as the argument. Going very far back (2.16) I see varying arguments. I > therefore wonder whether the parameter simply wasn't cleaned up when the > last party (possibly) passing 0 / false was removed / replaced. > It was changed to always use hexadecimal for https://sourceware.org/bugzilla/show_bug.cgi?id=4430 We can remove the argument. -- H.J.