From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by sourceware.org (Postfix) with ESMTPS id C6A083858C50 for ; Fri, 26 Apr 2024 06:53:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C6A083858C50 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C6A083858C50 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::52b ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714114383; cv=none; b=MgTONtoVoL8ZUU1NfPHXeg8Np+OsiQXWTmBaL4G4oYB3ulW7uoLNNeztrE2VIFunhGUDJ40elY5OX+hZ/2tKXNOd2e0Sj+Jf3bubChBw42O0H/TWiIJ4gabWWNr7UoYDtGLUA1fDB5MbyhgJ0Pf/mbAHWsykdpduZcJRLCcKS1s= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714114383; c=relaxed/simple; bh=NLdpchtsaQG7t2eqZ5HQGIVhROVaCErrTAGIE/MvnL4=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=hrrBnOMjf16bnCRY0GqMX2caxkCDGK1N0QoDUEyBRTm8LKGO5Y7aFHCkC5OOnsKedCXg4qxcehB9OpuLoFN5/VFUPixkxSq1dPk1RgwaxIo2GCJHAuVKESrpH/aeyMxiIa4osI5jlfZmI00KDw+BIraUOnCC26tCbW58R1Nuw0I= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-56e78970853so5011164a12.0 for ; Thu, 25 Apr 2024 23:53:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1714114380; x=1714719180; darn=sourceware.org; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=UtwTnj3JSwPNGDRtuznHn84Bd/I6mBuvXkNsmguLbGI=; b=WcaS1LIDj7bmFd9HJSCaSibfal3ruf5VQ6LB98yCHgS1j7/v8aelFqE/2JzKq/iC3C gDQq5cop8Zh6o50xTtNzbNdMk/AmO8Z5ad4KUoy1wpRvHpDeTV3PZBkHG5AAPGo7PcnG wnnIYLmjG4gaJbvaT7lcmBtYlF4kHDUXqAaXOhdSWU2kRc2e84YiVhfI+qfZe1txJISQ c1yC674OzRe89TotF3LwLweYWTMDSeyi25V4rgaww+5dtWB3L0rUU8pTJGaNfjwODvEl MuX+PbNS3Gu2u5hpv7RxbtgUlzGFzv1ki1VsxygrHM9gVYMO6kYdS0MVobbe2pnj94+n Z3Kw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714114380; x=1714719180; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=UtwTnj3JSwPNGDRtuznHn84Bd/I6mBuvXkNsmguLbGI=; b=jL5JYp7zv35i0sIF8zUTN7HxwgkkMtNTyrFPXujVplnYZ0gjG2mEf5BliklEXq6cVK NRs1rF6cgUPOo5QY7cjSqTCUMWwpUUiQIcSKTkThX7wIoO2/rYOZqquaT9uEtrWvn8vt 7a1A3bZxpOFOPZqXlbQC26vO/4B6iu5Gou0dtHhrwz8cb7V1qN0aAFVUArg9/xx8G4is lGWW5cjx3JIyX4MUigRuGXhHn9/tMDdXhE6xYScYVdj356/eaax2OyFLUlhoF5mdrtsH z692rdLX5/tNhHx2iLkg1mztNvwxsUSccITnZtlcR0kdNuxHrMB+Bib/DeFszvPUubMw zIlQ== X-Forwarded-Encrypted: i=1; AJvYcCXo+7neogNFfrXDIrQsLFqeyTxAvgzQuxWxotPtCYJ/O8CbuDxWfUihDkA/AC/L3Qdgy2vrLemVm/DFAZ58IPkABUmF2F2Thg== X-Gm-Message-State: AOJu0YwgmQgZmL4FX6nrkorA3MuLUmT6gFZYB/nzVUHOOYPj4vcC8xGu z7Q4bWST3W6gAREeGkpsSLydxZGnpVNkzryCVuBS7+XEI+fylQh0gidGVTIJ+w== X-Google-Smtp-Source: AGHT+IG5TSCsuhf0aNjZRbaxFtFRVLqpqFn0xgo9VHbKaAxAc+v+cHpGQX8ZScYlLZqBTAYHQ+YwKA== X-Received: by 2002:a17:906:3b18:b0:a55:b67c:bd04 with SMTP id g24-20020a1709063b1800b00a55b67cbd04mr4603578ejf.4.1714114380500; Thu, 25 Apr 2024 23:53:00 -0700 (PDT) Received: from [10.156.60.236] (ip-037-024-206-209.um08.pools.vodafone-ip.de. [37.24.206.209]) by smtp.gmail.com with ESMTPSA id z12-20020a170906270c00b00a55895c7f50sm8766395ejc.151.2024.04.25.23.53.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Apr 2024 23:53:00 -0700 (PDT) Message-ID: <99272e80-dbbc-424f-93cc-31426e0a255c@suse.com> Date: Fri, 26 Apr 2024 08:52:59 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/3] x86: Use vexvvvv to encode the vvvv register Content-Language: en-US To: "Cui, Lili" Cc: "hjl.tools@gmail.com" , "binutils@sourceware.org" References: <20240424072356.2433122-1-lili.cui@intel.com> <20240424072356.2433122-2-lili.cui@intel.com> <8a239b53-b713-473d-a8c4-87e28ec407cd@suse.com> From: Jan Beulich Autocrypt: addr=jbeulich@suse.com; keydata= xsDiBFk3nEQRBADAEaSw6zC/EJkiwGPXbWtPxl2xCdSoeepS07jW8UgcHNurfHvUzogEq5xk hu507c3BarVjyWCJOylMNR98Yd8VqD9UfmX0Hb8/BrA+Hl6/DB/eqGptrf4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0WvkWg5V2WZsUMlnDL9 mpwIGFhlbM3gfDMs7MPMu8YQRFVdUvtSpaAs8OFfGQ0ia3LGZcjA6Ik2+xcqscEJzNH+qh8V m5jjp28yZgaqTaRbg3M/+MTbMpicpZuqF4rnB0AQD12/3BNWDR6bmh+EkYSMcEIpQmBM51qM EKYTQGybRCjpnKHGOxG0rfFY1085mBDZCH5Kx0cl0HVJuQKC+dV2ZY5AqjcKwAxpE75MLFkr wkkEGBECAAkFAlk3nEQCGwwACgkQoDSui/t3IH7nnwCfcJWUDUFKdCsBH/E5d+0ZnMQi+G0A nAuWpQkjM1ASeQwSHEeAWPgskBQL In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3025.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE,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 26.04.2024 07:33, Cui, Lili wrote: >>>>> --- a/gas/config/tc-i386.c >>>>> +++ b/gas/config/tc-i386.c >>>>> @@ -5045,7 +5045,7 @@ optimize_encoding (void) >>>>> */ >>>>> i.tm.opcode_space = SPACE_0F; >>>>> i.tm.base_opcode = 0x6c; >>>>> - i.tm.opcode_modifier.vexvvvv = 1; >>>>> + i.tm.opcode_modifier.vexvvvv = VexVVVV_SRC1; >>>>> >>>>> ++i.operands; >>>>> ++i.reg_operands; >>>>> @@ -10432,19 +10432,19 @@ build_modrm_byte (void) >>>>> || i.encoding == encoding_evex)); >>>>> } >>>>> >>>>> - if (i.tm.opcode_modifier.vexvvvv == VexVVVV_DST) >>>>> + switch (i.tm.opcode_modifier.vexvvvv) >>>>> { >>>>> - v = dest; >>>>> - dest-- ; >>>>> - } >>>>> - else >>>>> - { >>>>> - for (v = source + 1; v < dest; ++v) >>>>> - if (v != reg_slot) >>>>> - break; >>>>> - if (v >= dest) >>>>> - v = ~0; >>>> >>>> Replacing this by ... >>>> >>>>> - } >>>>> + case VexVVVV_SRC1: >>>>> + v = dest - 1; >>>>> + break; >>>> >>>> ... just this could do with a word of explanation in the (sadly once >>>> again empty) description. While I'm sure this tests out okay for you, >>>> it's not immediately clear why the loop can be replaced this easily. >>>> Whereas by the end of the series (with SwapSources dropped) this >> simplification is pretty obvious. >>>> >>> >>> SDM said "VEX.vvvv encodes the first source register operand". It should be >> "dest -1". The old logic did not check vexvvvv first, which made the logic here >> very complicated. I'll add some comments here. >>> >>>> As to the deecription once again being empty: This is even more of an >>>> issue considering that the title suggests the patch isn't doing anything. >>>> After all we already use vexvvvv for the stated purpose. >>> >>> The title is "Use vexvvvv to encode the vvvv register", which means that use >> vexvvvv for the stated purpose. >> >> Well, yes and no: We did so before already, so the title suggests "no change". > > Do you want to split this patch 1/3 into two? Or move it to patch 2/3? No. I'm asking for the title to be adjusted to state what is changing, rather than what has already been the case forever since the introduction of the struct field. This may be as simple as inserting "more directly". Jan