From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk1-x733.google.com (mail-qk1-x733.google.com [IPv6:2607:f8b0:4864:20::733]) by sourceware.org (Postfix) with ESMTPS id 4B49D3858D3C for ; Mon, 17 Oct 2022 21:11:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4B49D3858D3C 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-qk1-x733.google.com with SMTP id b25so7506095qkk.7 for ; Mon, 17 Oct 2022 14:11:33 -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=9qr11sW2HFJ8uKBnal809KjZUpCIPX4P4XviszNUpu0=; b=U5fyWAChcHkyKINF1RvufljjklsqAEOjVkm80TaawHJnEnGlaXG4WAwm9xZAbb9EP+ /Fl9wsRjV2/jpsg4zAUEqvsvPEty/W6EDbrU9e3aidead5dT8L+Io2i+yU8Wx14V1aVN sKPAf9CbLE0zgu0whrgxtOqXEisDIwJA66bnr3MWJBpR5jpW6Bhz2q7ouESHQgouqQf0 qKDgTvoeJqoCtDgCyavOllKFWdejlM9LgaIkGXXOh8Wr2Gm1/r78RziHU49rkaF/kgIn HSFbagCz6qawGQGmrySLh6BXVbgTBoFzz1IbEpAf1Y9nrX3kjTo/mp8luumIrzQ//C3W SFCA== 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=9qr11sW2HFJ8uKBnal809KjZUpCIPX4P4XviszNUpu0=; b=71B7ZrT/2MNMb6sdSC6ZakSpF3w180UKGtwJQixzXjfjQYZhYCi562RmK21+n5dX4D vWyV8Ce/Bh9E2j8gtBCuiDF5Yp8nukynJiO3EAAWyp/dDq+Hb0T4dqg7pplPbV4Oaosn oZsXK8VUNiLQDAQ5whKQZghEwc/uiCGFaavJtto4NvCxWtORJEuFXshQiTum/GHFBdnz k42vawc12zB2ZTR3xWg+tjz4DodHEAEpQChI/57nidmdCV5CHJMXc16TEilQ77stBE9e zYH7/0VGcyNXK3zUZ4kwmyssoyAbACybOzFCyQMaOxeaRhVd0xiEPTPKOirgFjAwolEU L5gQ== X-Gm-Message-State: ACrzQf0H8PAG5EEXRKmgbEhSJ4GxAUyS71qRcsKr2eXdTxvcMlgZL1W6 KWsa21clPjrengzc/6Muxa53HIGQgAC/IOlC3kEZC1gZUE8= X-Google-Smtp-Source: AMsMyM6qNrFM6lSZHBuICZdKGEYgz5P+9Q1wXnSKAAI/SfoKHzwuP+AVPnL+2SLoI0O8MT5safWuJ6ImMJ8FeEWVDVE= X-Received: by 2002:a05:620a:13f3:b0:6ee:92b9:fe2f with SMTP id h19-20020a05620a13f300b006ee92b9fe2fmr8914252qkl.477.1666041092623; Mon, 17 Oct 2022 14:11:32 -0700 (PDT) MIME-Version: 1.0 References: <7bac66be-535e-9051-d674-f2f5ba180e17@suse.com> <90899ac8-cc4f-52f1-9498-5e7f87fe6355@suse.com> In-Reply-To: <90899ac8-cc4f-52f1-9498-5e7f87fe6355@suse.com> From: "H.J. Lu" Date: Mon, 17 Oct 2022 14:10:56 -0700 Message-ID: Subject: Re: [PATCH] x86: fold AVX512-VNNI disassembler entries with AVX-VNNI ones To: Jan Beulich Cc: Binutils , "Jiang, Haochen" , wwwhhhyyy Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3017.8 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 Sun, Oct 16, 2022 at 11:39 PM Jan Beulich wrote: > > On 14.10.2022 19:28, H.J. Lu wrote: > > On Fri, Oct 14, 2022 at 3:22 AM Jan Beulich wrote: > >> > >> Make %XV also print the separating blank in the VEX case, while making > >> it do nothing for EVEX-encoded insns. This way the AVX-VNNI entries > >> can be re-used for AVX512-VNNI, at the same time fixing the lack of > >> EVEX.W decoding. > >> > >> For the AVX-VNNI ones further make sure only VEX.66 forms are actually > >> decoded. > >> --- > >> Irrespective of this change I continue to disagree with the arbitrary > >> printing of "{vex}" for the AVX-VNNI insns: If that's meant for > >> disambiguation purposes, then EVEX-encoded insns not using EVEX-specific > >> functionality by having VEX counterparts (vaddps %xmm0, %xmm0, %xmm0) > >> should also be prefixed by "{evex}". > > > > This is done to match the assembler. There are 3 kinds of VNNI processors: > > > > 1. AVX512-VNNI only. > > 2. AVX-VNNI only. > > 3. AVX512-VNNI and AVX-VNNI. > > > > Since AVX512-VNNI came out first, all VNNI instructions without a prefix > > are encoded as AVX512-VNNI. The existing VNNI instructions without > > a prefix, generated by compiler or hand written, are encoded with EVEX. > > If one needs VNNI with VEX encoding, the {vex} prefix should be used. > > ... if, as said, AVX512 wasn't turned off altogether. > > With your model, just look at how odd code using both AVX-VNNI and > AVX-VNNI-INT8 then looks: > > vpdpbssd %ymm0, %ymm5, %ymm6 > vpdpbsud %ymm1, %ymm5, %ymm6 > {vex} vpdpbusd %ymm2, %ymm5, %ymm6 > vpdpbuud %ymm3, %ymm5, %ymm6 > > Yes, one could further clutter this and add {vex} to every line. But > why would anyone want to clutter their code? This ensures that VNNI instructions without a prefix are encoded with EVEX. > Plus the same argument then applies to AVX512VL: This came out later than > AVX, and the assembler (necessarily) requires {evex} to actually encode > these (when there are AVX equivalents). Hence to match the assembler, the > disassembler then also ought to emit {evex} for this subset of encodings. A patch is welcome. > Jan > > > This applies to any AVX extensions which come after EVEX ones, including > > AVX-IFMA. > -- H.J.