From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by sourceware.org (Postfix) with ESMTPS id 16D0E3858D34 for ; Thu, 15 Aug 2024 09:23:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 16D0E3858D34 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 16D0E3858D34 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::631 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1723713824; cv=none; b=EYK2FuOIqMTuInPYXoC6PdRRt0oGfpccSU+hLo9EWpviDO4MuHuwymff/cQlZ6nsLJmsXCyN07HGc/Xn3hLqY1LI7Q3n8dWw+wQf2D8yDwH7KJwSoPxnf34WQo9eyJh7pJoxH43mI1W+ugdds9Q1KEkAuAqMxyKiLeI3/bxfTsk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1723713824; c=relaxed/simple; bh=2u0D9PwR1aGT6KX3QtpV/4mGURWyS0DnraXcdxNv3XE=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=xs3cO+2XYHIJHwE64/EyVSOnWkculwJwwom0k0819cgR26Si1DTuhg42jR1eEgLqS2NQ5g4PKe5r1e8Bk+vH03HG6+Jo0Iz5GsaZOnSzNyDPfbtRwtGEq1SCp3FdIhUHMIbUGtRRN/7l2+ace9BXYHzBvVbj2TNagqTObFFBe68= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-a7a9185e1c0so64148366b.1 for ; Thu, 15 Aug 2024 02:23:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1723713822; x=1724318622; 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=x4bx0nfS1QhhI7i2sIziV1itruw02PK8b9j865lxsTs=; b=Iqsk8csqxuvGSXiHZjrYDYbMYPWJnQqcaYNe2WGGlO5WrzmqtzPHbAGAlFJ12v7+93 6q790asmlnMo3IDXU8SjkS7PUYmvcqow0DFUILvsoNC6qXw90K+FboVAWdSDO5gr7s0+ 6GL1+eLxuXHHRs+f8Dn/vzpogK1mQZTjkugT5w8tvEKxnug+7P2ruogpsZnMsio+wEz5 hrwkGtFqFoZdgHY52u2QtlFOO4H21Fp9tVaSA21KqKImmgDWK34InCD0v6GkUtpnJMvb ELFSBRkdJot69RPPJFPazoXY/an6es+X2104aHRl34Zl98TkH9hpBhcT9ZhtPXfI8YZR LTVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723713822; x=1724318622; 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=x4bx0nfS1QhhI7i2sIziV1itruw02PK8b9j865lxsTs=; b=QUGe4XannCK6I0L6tb66ggX/BctKhK/v3810hIoM/AVpreCLn4SjVOnW1j5vMMoeik koPGRDFU3SwTK+Ln5zY5N+ZV/jz9Z3pWOdtRxIZMOPyQWqjfuL08XP3wEHfgdUb5eOJD oVzEvfkst36Qi0NabwQ0z3Eg3inq6e4veINgqIrwuYsFJ8yJ+2EmOzxXu3q8zFvHd8SP BxnVQin5LAwZDLdNgJZ9QNVzZ9Nw/CGHOaiYwUePniU+0SFTqHPP6M2i3L3geoPow2aN sz/GaNv7ILQ0GZB8EAw2hQYiV43cLN+XGOq9lX04LdQvFo8SwUxvr0rLAjXa8B7tB4q/ n3gQ== X-Forwarded-Encrypted: i=1; AJvYcCVVBNHHs0vRMpnJCgYkXajhSDREudPLRQE4r2WaGmfEJ/3zLJslNOu1TzCnsq57BlnPwCWII8uJ56+dkER/8uoTOmDxFT0P0w== X-Gm-Message-State: AOJu0YxCdUGHIyMVk6ecprmYC9KuN5DsEJfND0uPh/YFTKPgxKTNWAby eDCcqHQCf2W4u6PIg2CT8QRzKbo3954dPqvEbsrrevzQYrCtwDiFYSN4P4FtgA== X-Google-Smtp-Source: AGHT+IG9qOPCRqTIh/1AH7FSPswdUq4ly7W5dguX104dDR5g7fnKOD25fY3wAIxiJ7EBhZGdzsjWew== X-Received: by 2002:a17:906:dc93:b0:a80:d683:4d23 with SMTP id a640c23a62f3a-a8367070e5cmr383419066b.62.1723713821503; Thu, 15 Aug 2024 02:23:41 -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 a640c23a62f3a-a838394716esm72615666b.146.2024.08.15.02.23.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 15 Aug 2024 02:23:41 -0700 (PDT) Message-ID: Date: Thu, 15 Aug 2024 11:23:40 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3] Support ymm rounding control for Intel AVX10.2 To: "Jiang, Haochen" Cc: "hjl.tools@gmail.com" , "binutils@sourceware.org" References: <20240809015708.4105350-1-haochen.jiang@intel.com> Content-Language: en-US From: Jan Beulich Autocrypt: addr=jbeulich@suse.com; keydata= xsDiBFk3nEQRBADAEaSw6zC/EJkiwGPXbWtPxl2xCdSoeepS07jW8UgcHNurfHvUzogEq5xk hu507c3BarVjyWCJOylMNR98Yd8VqD9UfmX0Hb8/BrA+Hl6/DB/eqGptrf4BSRwcZQM32aZK 7Pj2XbGWIUrZrd70x1eAP9QE3P79Y2oLrsCgbZJfEwCgvz9JjGmQqQkRiTVzlZVCJYcyGGsD /0tbFCzD2h20ahe8rC1gbb3K3qk+LpBt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MpicpZuqF4rnB0AQD12/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=-3023.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no 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 15.08.2024 03:06, Jiang, Haochen wrote: >>> --- a/opcodes/i386-opc.tbl >>> +++ b/opcodes/i386-opc.tbl >>> @@ -156,6 +156,8 @@ >>> // substantially similar), depending on what encoding was requested. >>> #define APX_F(cpuid) cpuid&(cpuid|APX_F) >>> >>> +#define AVX10_2(cpuid) cpuid&(cpuid|AVX10_2) >> >> ... this. The StaticRounding / SAE insn forms are all suitably identified >> by these two attributes. So far they applied to EVEX512 only. All that >> changes is that now they apply to EVEX256 as well. As long as AVX10.2 is >> available, of course. Therefore all (or at least most) of the templates >> should be possible to leave alone (on the assumption that there are no >> outliers, i.e. no mnemonics which allow RC/SAE in 512-bit forms bit not >> in 256-bit ones). You already change check_VecOperands(), it just needs >> doing a little differently (in particular without setting .ymm and >> without using maybe_cpu()). >> >> To achieve this, it may end up necessary to split encoding_evex512 into >> two enumerators, the new one being encoding_sae. > > I haven't investigated that fully, but I suppose we can definitely do that. > The concern is if we should do that. > > IMO, if doing that and not adding AVX10.2 to table, it means that > the ymm rounding in AVX10.2 is implicitly enabled, unlike all the other > features which are explicitly enabled. It will cause confusion when > someone wants to go through the table to know which feature belongs to > which ISA. It will also take more time to investigate that why suddenly > ymm rounding is turned on if they are not familiar with the latest ISA. The table's primary purpose isn't documentation. One of the goals continues to be to limit the number of templates we have, to in turn limit the number of matching attempts that need doing while trying to find the template for a given insn. That's why, for example, I went through the effort of folding the SAE templates back into their base ones. Which, as it turns out, is likely beneficial now - the same templates can hopefully simply be re-used for AVX10.2. There are, btw, other things which aren't explicit in the table (anymore). Jan