From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk1-x731.google.com (mail-qk1-x731.google.com [IPv6:2607:f8b0:4864:20::731]) by sourceware.org (Postfix) with ESMTPS id 982983858C74 for ; Thu, 29 Sep 2022 16:00:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 982983858C74 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-qk1-x731.google.com with SMTP id x18so1116512qkn.6 for ; Thu, 29 Sep 2022 09:00:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=RgZT4IQF3RhRr3BmPwgUt5SE6NazXTyby456H/UT7uM=; b=N9/NuxLdbtE7CkO740Dn9vjFazwLSYy+E/abTxOywCBm9JXJ4VhCHzzFUwLfcU9ifL fpjpcU8Vsq7w04duSjO56XmRZZ8HUUt9uwp/KK6sPVHsTqLoAKx9/TtHhO9Zy0Q/+2oD HpTen28uPowcZZwno2xQxFtzA3bMEZ4kDyYNNOxMXUPzmBObh1msn017UQT6S6Ae9fi0 HjWqJzUBm7y6hlafkCnPEW4t7eqre3urXgI5It/Mi3NEhnxi/tRihefKffl7HE3lOHe+ 6N7VR0mv3YcFsKrhZoSUHr2OLfba3MG4Y70InsHTO24VtQijElYiQIqQ8rOJKjo4Vpr4 9ObA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=RgZT4IQF3RhRr3BmPwgUt5SE6NazXTyby456H/UT7uM=; b=29xDEm78EgfwzZhUAZrCL9yEjYag6CSeVbht7T37zFrCpF8AqZHN5Z75ITaq9GB/qF BMakNhuHv9c5omNwgu6WmmsuRuLHzZt1qhaHCiICEb9aZlfoxHESvCXlBsW+0ZdrhKJm 0563RmRxsbgyzN2uHOI/shqfm30Zz6umga3eL3PJNw2BtDvxC+5rPvXVBPEORcmKK3OM JRK89h35By+tAPwHfcYPyxaPmodGmno6JGwIfUCbRBWSLxMAeZgXt6Bqsa4WjVXj2rwH 9Yll5HnxGulycLZ1vKKiWr9cuMfIl4BmgQdy2GB+I01YfItLaqZtj/3CP8KrctDzFw64 gXhw== X-Gm-Message-State: ACrzQf38mMNWjfsVXSXeUrOhUE/th3ArvD7+YBLE12ygTLelHfvC1BHs Md75ykZ3NVT51l1SsHE4xtR/B8c8ABciy3NSOPJOSUSu X-Google-Smtp-Source: AMsMyM6Dgig7VyPbcdDf/xNA3+HPD76j7eRCnR/r2IcWAWfkY4df571HmHQp2I9C8YILkVGGS28kgFngmMs66adznks= X-Received: by 2002:a37:e307:0:b0:6ce:368f:6a0f with SMTP id y7-20020a37e307000000b006ce368f6a0fmr2765014qki.81.1664467238939; Thu, 29 Sep 2022 09:00:38 -0700 (PDT) MIME-Version: 1.0 References: <32216291-fd1f-4579-87de-d24cb7190894@suse.com> <995353db-27f3-ea60-8e69-32bcc44dfd49@suse.com> <162c053b-7c68-67b8-1443-926f2ebb321d@suse.com> <892afda8-0e6a-cc7c-df95-f5581e831fff@suse.com> <93622263-1a05-07e7-4a96-c33cffb0796b@suse.com> In-Reply-To: From: "H.J. Lu" Date: Thu, 29 Sep 2022 09:00:02 -0700 Message-ID: Subject: Re: [PATCH 5/7] x86: re-work insn/suffix recognition To: Jan Beulich Cc: Binutils Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3017.9 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 List-Id: On Thu, Sep 29, 2022 at 1:08 AM Jan Beulich wrote: > > On 28.09.2022 21:33, H.J. Lu wrote: > > On Wed, Sep 28, 2022 at 5:49 AM Jan Beulich wrote: > >> I guess to prove (and going forward guarantee) the apparent behavior of > >> parse_insn() I'd like to constify its first parameter. This might > >> involve adding a cast (to drop const-ness again after the call), which > >> I generally would like to avoid, or some "interesting" pointer > >> arithmetic. If you have any opinion here up front, please let me know. > > > > Can we avoid it by adding some new entries to the opcode table? > > I don't think we need many such entries. > > I'm afraid I don't see the connection between the intended constification > and what entries there are (or not) in the opcode table. I view it as a > desirable property of the function in the first place to express its > behavior (of not altering the input string) by a pointer-to-const > parameter. In fact I guess I would make such an adjustment a standalone > (prereq for the larger change) patch. > Rescan means that the first scan fails. Can we add new entries which only do the second scan? -- H.J.