From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by sourceware.org (Postfix) with ESMTPS id 4C7C9385840D for ; Wed, 24 Apr 2024 13:51:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4C7C9385840D 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 4C7C9385840D Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::42a ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713966708; cv=none; b=wpbTx0giuyisbu2V1N/IAzlUoW7zl7t3pf9n1X7u7CMJ1n6njALoAp2TIz1nmS46phfcGJSIxhK3YQkLSf4zzL4c75+Uy0kuGKyaq5zkTSUWQDO+dG6HCP7QRbrsR/Xk0dw5L8nJNcyc9JIMV7ZnYB4sBGGCMkFafNidRgYfRrI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713966708; c=relaxed/simple; bh=Md6N/Fp5+bOU0av6ivrgGdiD5gjWruPq7uEK1REPMag=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=JcMBV2/u7tcaqkHzkA780ZcEzqHZmeWhYnrB6frlvczZlCTnPURB5vjAGLYAPzWvs/yiLvzoM6xDxYPkpGAzhuJD31Xg9b6+JJX9D9rH7yVsUsuN5d/n1hYwn3HTxd92Lzkex58VvK+hQE72eTpHi2SovwaxdPoQwTXlSpa042U= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-345b857d7adso5493069f8f.1 for ; Wed, 24 Apr 2024 06:51:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1713966706; x=1714571506; darn=sourceware.org; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to; bh=6l/oVlviWQSPmCI8hjLP23dyf2MZ/iQ9F2F41k2vXBA=; b=gYuczrPRjplAb1n7GnF2wxLhamRs6Ua11ptzO03nx9c1YhwCJUXLfWH8+1bWPyDWhF xZSnkQOLog6L0RnWzsmDEz5UsHwiFeBW2b6odS4+nVWLFNXbz/Z0EOriUu91mmDFewxi t4Y5RwZG8fc71p9wBAFNf2n1dxA7hqX+9taJcv6v/vfIexVt83TqpLTfnOurts04dr0b jO0qzAIXMd4UXHKzsA7P+ueX9dwtm9foCV9C3wsfbsGm1wfAyXfaggl4SPIPje8e+BM8 +S8cNSKeSe6anjR4nkBvhqAPXkXGcNrFnqwfK6RqX1529zltPsC5HgODqgrwAdinuYMG RsuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713966706; x=1714571506; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=6l/oVlviWQSPmCI8hjLP23dyf2MZ/iQ9F2F41k2vXBA=; b=T1pc6v//uKtM0e5m4bJ9A2fqugFGPOLhtAjJCRRlxDj0hvIhYFDFffger0Ir/VrzF6 D2whwsVxxP9Nj3aYyHpLpUSXuX8TuSipoXmyhJjhXAL18uDdHxJUgO+I/aUeUsXA3I7m f19uA+fgY+ZdNIicoqo3TrT9YVkF9stzOTBeJ2cs4Q+ZK0ZixprGkp90N1nU+dRUXryY o+uxAfi8x8Aret4Ndi5UxLCf4sfCOESzfrh9YGrjVOYO7jH8U22s5qnFEObTG1g0hxRY +czuATu1lgP2db2hTybii+LqxcIY85ojQLfLCFwxGCIPXsr6cRnoYcfP2oeObPZNPpRs Q44A== X-Forwarded-Encrypted: i=1; AJvYcCVeEef+jlroVwh+cwHRjNa7skrIHAtWi6VYASzqXi+N/55dr0Bw/4Kr5vaq5HAoAYomoBJDP4LcAkUBFzN/sAaNZgjMefdbgA== X-Gm-Message-State: AOJu0YxQhUT+PjuWjaYKNvnhG5urIhQgHCWsdNbvD4ojoyMS97yaQ2WL z7/YkUbgT2NZ51/MADfz603sDvrck0lXTXPd6riDvmb7LpJ3NeLjuKYcsOFJ0A== X-Google-Smtp-Source: AGHT+IFPEe6J+tK0nxyAbcM+5sL4FqFpvXLmonfa5Uhk0bnzMB7u8M8yyGmXhDxEUrk6Jb5uF3g80g== X-Received: by 2002:adf:f9c9:0:b0:34a:5d79:dfe2 with SMTP id w9-20020adff9c9000000b0034a5d79dfe2mr1838349wrr.13.1713966705904; Wed, 24 Apr 2024 06:51:45 -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 v14-20020a5d4a4e000000b0034625392416sm17179278wrs.104.2024.04.24.06.51.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 24 Apr 2024 06:51:45 -0700 (PDT) Message-ID: Date: Wed, 24 Apr 2024 15:51:44 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 1/4] x86: zap value-less Disp8MemShift from non-EVEX templates To: "Cui, Lili" Cc: "H.J. Lu" , Binutils References: <41696d73-4114-4adc-8491-bffddc5d72cc@suse.com> <56656107-d953-4a66-aa25-d90c8e9a4c5d@suse.com> Content-Language: en-US From: Jan Beulich Autocrypt: addr=jbeulich@suse.com; keydata= xsDiBFk3nEQRBADAEaSw6zC/EJkiwGPXbWtPxl2xCdSoeepS07jW8UgcHNurfHvUzogEq5xk hu507c3BarVjyWCJOylMNR98Yd8VqD9UfmX0Hb8/BrA+Hl6/DB/eqGptrf4BSRwcZQM32aZK 7Pj2XbGWIUrZrd70x1eAP9QE3P79Y2oLrsCgbZJfEwCg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OFfGQ0ia3LGZcjA6Ik2+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 24.04.2024 15:15, Cui, Lili wrote: >> On 24.04.2024 08:49, Cui, Lili wrote: >>>> In order to allow to continue to use templatized SSE2AVX templates >>>> when enhancing those to also cover eGPR usage, Disp8MemShift wants >>>> using to deviate from what general template attributes supply. That >>>> requires using Disp8MemShift in a way also affecting non-EVEX >>>> templates, yet having this attribute set would so far implicitly mean EVEX >> encoding. >>>> Recognize the case and instead zap the attribute if no other >>>> attribute indicates EVEX encoding. >>>> >>> >>> I'm confused about this patch, is it related to the movsd template? You >> removed the "Masking" for it and only left Disp8MemShift, but I thought it >> still belongs to EVEX template. >>> >>> +movsd, 0xf210, AVX512F, >>> +D|Modrm|EVexLIG|Space0F|VexW1|Disp8MemShift=3|NoSuf|SSE2AVX, >> { >>> +Qword|Unspecified|BaseIndex, RegXMM } >> >> There's no "masking" in an SSE2AVX template. Use of masking in a legacy- >> form input instruction is simply wrong, and wants rejecting. >> > > Is this patch intended to fix the following situation? Yes, this is one of the cases where the change particularly matters. > If not, could you give an example? > > > > + + $avx:AVX|AVX512VL:Vex128|EVex128|VexW0|Disp8MemShift=4|SSE2AVX:VexLIG|EVexLIG|VexW0|Disp8MemShift=2|SSE2AVX:VexVVVV, + > + $sse:SSE4_1:::> > > -insertps, 0x660f3a21, , Modrm|||NoSuf, { Imm8, Dword|Unspecified|BaseIndex|RegXMM, RegXMM } > +insertps, 0x660f3a21, , Modrm|||Disp8MemShift|NoSuf, { Imm8, Dword|Unspecified|BaseIndex|RegXMM, RegXMM } > > I'm confused why the Disp8MemShift is added here. includes Disp8MemShift=4, which would be wrong here. And also cannot be used, for specifying VexLIG|EVexLIG. Hence Disp8MemShift without a value is used to override the earlier setting (coming from ). Yet by having it here, the legacy (non- SSE2AVX) template would also have that attribute, which would be wrong (we'd infer EVEX encoding from its presence). Hence why such specific instances need zapping in i386-gen. Jan