From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt1-x834.google.com (mail-qt1-x834.google.com [IPv6:2607:f8b0:4864:20::834]) by sourceware.org (Postfix) with ESMTPS id D0ED03858C55 for ; Fri, 14 Oct 2022 17:08:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D0ED03858C55 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-qt1-x834.google.com with SMTP id g11so4073926qts.1 for ; Fri, 14 Oct 2022 10:08:12 -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:message-id:reply-to; bh=tfxQyst5dYMq96GnDWfW1158fskExscZkewKIkPKSqg=; b=f7FbKZqISVZiq4I0a2ZSlQm2rNg+k8TJ5yePaYXOCTdel766t4t5rBNMXsqyDwR1JI jHbXWd/IekEMwcniUQvOL8xrFirwWFSbsfDM2iKfu9ExVXC5lBaEFiu6yYoRvMsMY3tb y9vpHoEEv5Z/PiNlUzIfSdt6z5T+gFHQ/RJVLxfpgEjl9IuNX2yCgDA4gYWChWjtMVOw vhtSgVrnN10zK7VTZsw9uAv7JC98RQGDVXLnGjr+mQq2ma0IXKQ36wwyv8/AW0s/XI53 0yzxvcl/uzi47qXnSA1KOAyRp+zoECBgNxVc+ethX/Ctgpj4ONUW5xaFOcj0Yo2/ER/t 0tdQ== 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:message-id :reply-to; bh=tfxQyst5dYMq96GnDWfW1158fskExscZkewKIkPKSqg=; b=FD80RerYemxQeAjSq6EiH2BiPcrDqgu70NR2QobWwM6n1uJAM0d8d/ZfcpAiSgU5XU dCuLLFpM5SlQ9++jOzw4qFBg33QuZfp1P59mSnMG2q3EMWbC/RjFv77jfsUaZQDzbE+B lXal0W12DfHSs7NCXjuMF1YRpPWwKKdwif7VjdzaGHisb8qbRQ/KN1zuV34Tb2GlF+2y uUGcadeH22DMsitrvfZOA+b9bXnF22pYLgHped2iyelOaFMg1FAZfsm5BbDOtPqEG/Ul MPlpqRL5Yn84eZWU8Yc2Lqapd+2weJh6Gzb8OhUQtNuJ9mlOhgUsx8xul8RnKMkWSTXJ reRg== X-Gm-Message-State: ACrzQf1KBJEHjvcAM+9pIg7ShDSRKi8xyFTZtylef8fI8JnTL/v45Y1F /J07Ln3vtCpKbvCLimiUnRsUvnP5SuPjRcseyWnD26gl X-Google-Smtp-Source: AMsMyM41/9VaMQv8op4ZkXIR9GFgWbtVOQbwJVTA581GIjbhwBlGJJPU0GbX/KEaEFO7TUuk4sAdekI0e0+tSTNwLdk= X-Received: by 2002:ac8:4e51:0:b0:395:4f2c:63c9 with SMTP id e17-20020ac84e51000000b003954f2c63c9mr4887398qtw.617.1665767292053; Fri, 14 Oct 2022 10:08:12 -0700 (PDT) MIME-Version: 1.0 References: <20e2773a-2e47-869b-1900-709f8ad4cd6b@suse.com> <2981100a-17bf-623c-27fc-0da08279c3ff@suse.com> <32052f49-9789-36c6-fc26-a7e24f248435@suse.com> In-Reply-To: <32052f49-9789-36c6-fc26-a7e24f248435@suse.com> From: "H.J. Lu" Date: Fri, 14 Oct 2022 10:07:36 -0700 Message-ID: Subject: Re: [PATCH v3 4/7] x86-64: further re-work insn/suffix recognition to also cover MOVSL To: Jan Beulich Cc: Binutils Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3018.3 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 Fri, Oct 14, 2022 at 12:03 AM Jan Beulich wrote: > > On 13.10.2022 19:00, H.J. Lu wrote: > > On Wed, Oct 12, 2022 at 11:08 PM Jan Beulich wrote: > >> > >> On 12.10.2022 19:10, H.J. Lu wrote: > >>> On Wed, Oct 12, 2022 at 12:08 AM Jan Beulich wrote: > >>>> > >>>> On 11.10.2022 19:44, H.J. Lu wrote: > >>>>> On Wed, Oct 5, 2022 at 12:24 AM Jan Beulich wrote: > >>>>>> > >>>>>> PR gas/29524 > >>>>>> In order to make MOVSL{,Q} behave similarly to MOVSB{W,L,Q} and > >>>>>> MOVSW{L,Q} we need to defer parse_insn()'s emitting of errors unrelated > >>>>>> to prefix parsing. Utilize i.error just like match_template() does. > >>>>> > >>>>> Since movs{b,w,l,q} are string instructions, integer sign extensions > >>>>> require a suffix to specify the destination size. This is different from other > >>>>> integer instructions. Since only the new assembler allows the implicit suffix, > >>>>> it won't be easy to use. We should improve error messages, but allowing > >>>>> new syntax doesn't help much. > >>>> > >>>> It is an earlier change making most of this consistent with MOVZ*; it is > >>> > >>> MOVZ is different. There are no MOVZ string instructions. MOVS has > >>> different meanings in ISA. MOVS difference from MOVZ in assembly > >>> syntax should be expected. > >> > >> You've said so before, yes, but I continue to disagree. And as we can see > >> from the series things can be made work consistently (and imo nothing else > >> should have been done right from the beginning). > >> > > > > There are inconsistencies in ISA. > > Sure. But we shouldn't add further ones in the assembler. Assembler just follows ISA. Programmers should learn to deal with it or use a compiler. > > AT&T syntax makes things more complex. > > People should either deal with it or leave it to compilers. I don't think we > > should make assembler more complex. > > The complexity added here isn't all that bad. You've added far more > complexity in the past for things which arguably shouldn't even be > dealt with by the assembler (I'm thinking of -malign-branch* and > -mlfence-* first of all). > > Jan -- H.J.