From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ot1-x32e.google.com (mail-ot1-x32e.google.com [IPv6:2607:f8b0:4864:20::32e]) by sourceware.org (Postfix) with ESMTPS id 864D13858D32 for ; Tue, 29 Nov 2022 23:58:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 864D13858D32 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-ot1-x32e.google.com with SMTP id m7-20020a9d6447000000b0066da0504b5eso10191045otl.13 for ; Tue, 29 Nov 2022 15:58:24 -0800 (PST) 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=4HuSXoAwQkHgggzbxdBHjPw3LEVkf/DNW1ob+7k/Y8k=; b=qhExQvdgb3IMNyZksTTFYNGAK17wqz2QfAYFrCj/MUIYByycfHd/GHe1HPLw3hhL9F 4fv7rrbBGl3BaTBXpdO5BaDBBkJFk+obkvRZELQzfylaGNphiEOk2JeHPxrFanrCKYYo 7nlXwOsX+/l1+Xe83KWKMQKpw2SwjICRKyjZ8m5+R5YWrJgcuKkndVWtx/VutxNWjflc 1An/kT49c92uugcmVSMp2BUrLosw0gYWtTuG5XNH/Xd+Q1W1zYKf00XuFj7Tc+JZyElH ssO8jyFytbSbieMSgC/AgV5ZzVxGime9JyQHATa162HdOEXZPex7Vh3Z1LwbJAnO0tPC goQQ== 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=4HuSXoAwQkHgggzbxdBHjPw3LEVkf/DNW1ob+7k/Y8k=; b=hihZVk/SDfOVwzi9EtLgrwJ8r5UQidihhiQ/au+qilVkj70dMP7fNfUqxy75VqXF0o NdGu4BfDc5S7FpyvfB6gXO3iNBRw7340wkl+pLi/D3B8FfGrMSVAVpXG8HrUzoAR9gOF WnMD11ZAbeomnDee1LwcDVlPDX2IPU/RguC7Y3bhMfjLhQZFd+i/pKmdMkmjU0NtjKvP fRO19mwxqLU9jrxcGL0gYc/7LLURQsC2pR+v6mrRxasQXrgsyZF44v3hQgu7hFHRGrbb KbZX4rBphvqnkXos+YAR0xKty2HtqreE0wu++PrTy0Fa65WXYbMHsDyhTvMo2cX7H9wa E0rQ== X-Gm-Message-State: ANoB5pmTNPZAaUyJW3a6uMjvgHnSu/tvfpNzZpdJokt4wiZgPpDKcvOY ur0r5YNvFshOasiYPUQK7hgT2VcHbWFAyTlFMtY= X-Google-Smtp-Source: AA0mqf6wbYLPbKGHlQVo44xpK9cOhD/gLa4O3qW/sixe1xP4NS7GiXAcqi2aow5DYj8ecjptFRJWOf0KrJVJIPSfDXE= X-Received: by 2002:a05:6830:201a:b0:66c:49e4:82f8 with SMTP id e26-20020a056830201a00b0066c49e482f8mr29338333otp.371.1669766303868; Tue, 29 Nov 2022 15:58:23 -0800 (PST) MIME-Version: 1.0 References: <0168ba4a-766c-7cfe-7917-53259f846da0@suse.com> In-Reply-To: <0168ba4a-766c-7cfe-7917-53259f846da0@suse.com> From: "H.J. Lu" Date: Tue, 29 Nov 2022 15:57:47 -0800 Message-ID: Subject: Re: [PATCH 3/3] x86: widen applicability and use of CheckRegSize To: Jan Beulich Cc: Binutils Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3017.4 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 Wed, Nov 23, 2022 at 2:35 AM Jan Beulich wrote: > > First of all make operand_type_register_match() apply to all sized > operands, i.e. in Intel Syntax also to respective memory ones. This > addresses gas wrongly accepting certain SIMD insns where register and > memory operand sizes should match but don't. This apparently has > affected all templates with one memory-only operand and one or more > register ones, both permitting at least two sizes, due to CheckRegSize > not taking effect. > > Then also add CheckRegSize to a couple of non-SIMD templates matching > that same pattern of memory-only vs register operands. This replaces > bogus (for Intel Syntax) diagnostics referring to a wrong suffix (when > none was used at all) by "type mismatch" ones, just like already emitted > for insns where the template allows a register operand alongside a > memory one at any particular position. > > This also is a prereq to limiting (ideally eliminating in the long run) > suffix "derivation" in Intel Syntax mode. > > While making the code adjustment also flip order of checks to do the > cheaper one first in both cases. > --- > CheckRegSize now firmly isn't an appropriate name anymore - perhaps we > want to rename it to e.g. CheckSizes or CheckOperandSize (and then > better in a prereq patch)? > CheckOperandSize sounds better. -- H.J.