From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oa1-x2f.google.com (mail-oa1-x2f.google.com [IPv6:2001:4860:4864:20::2f]) by sourceware.org (Postfix) with ESMTPS id AD9A03858D33 for ; Wed, 1 Mar 2023 01:58:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AD9A03858D33 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivosinc.com Received: by mail-oa1-x2f.google.com with SMTP id 586e51a60fabf-172b0ba97b0so12972623fac.4 for ; Tue, 28 Feb 2023 17:58:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=VR6n9/ElfI+gSOA7ahhwHodmEhiYCYnx9tKgrR28fwE=; b=Xh0zSHdu2DYzjDo/fBMKu/fdkmnQVoUaoUpLqQ2JaHJfWO1wP6LHF5gvfGA/HucCaE wYQfxQr53WRu6buRo4uS7paaClFgDJZKd/Fe+oRP2huu6qew1LyTpSYikfgoepFBEJAm RKB4r6cis7O686jxE5N7Mxni8IK9xX3YrZ5fuLGKQ2Yg2Qeo8WQr0LwbeQuV5ugdYHtz LnZM8nMqasm2p6ZiUphJ2/t9ukK1PHPmRNMFEJaKJ1R+GzyixCZ/64Bz1QPMiu5YADMK cEq4I0/JN6vaWbc8SrGjVlRV+7QZb1iDs4jSOA7jmuO5wjyOGL6nrQISp0gNGKu82iZj kI/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding: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=VR6n9/ElfI+gSOA7ahhwHodmEhiYCYnx9tKgrR28fwE=; b=huMA6CGQS6ZjPp+nrIjJ+MQvwihPyr8B7T20gYpcz6ezcFcywP7MsCVJ9Qkj7zF+JO BBInX8X4CWqCeAa0B1QF8FK7pQmOFvJ34YQWv8RcZOsvYlwMZ3wDkDOkBMcBV7kVz1VH gQ4eB8xkaNmfOCcdVG2dnw1fI1PSlr+plaTGUU9jrF06pmqsJVyyTs6+Ul5KbaxxJfB9 PHVkI5CAiGcM2nBf1aC/Z8zTaeJnsnThAIcY1mjKWMeVH2JdjVyqEzFHtoB2ax3YMn8c iKPxL05b8Jgr1VKk1YOQwPagTVW2vAFgQF2C+Bz6xHoPs76pu6ebo4FZ9eH3plHA6sak O3Hg== X-Gm-Message-State: AO0yUKVN598LXx54MaYBt+Q/zgLHQATEzSq9AI/pZ+wtpivCLY4g1QAC cPsTCZxc/ITQ1bpe90Kqwzf55BnvVwrLgrbjsPhC0g== X-Google-Smtp-Source: AK7set9z9bIk7YgavpIm6J8W71fuEHgQ6y+5uH4aRoIsa0WC9mZFoZK655uLYs2g2X6hcWF7vfcWUf0gKNBC/KkhWuM= X-Received: by 2002:a05:6870:1aa6:b0:172:5195:753 with SMTP id ef38-20020a0568701aa600b0017251950753mr1360355oab.3.1677635921003; Tue, 28 Feb 2023 17:58:41 -0800 (PST) MIME-Version: 1.0 References: <20230121002935.1139281-1-philipp.tomsich@vrull.eu> <7dfcdb8b-f8ba-f0ae-b71f-f6fef1acac13@gmail.com> In-Reply-To: From: Nelson Chu Date: Wed, 1 Mar 2023 09:58:29 +0800 Message-ID: Subject: Re: [RFC PATCH v1] RISC-V: Support Zicond extension To: Andrew Waterman Cc: Jeff Law , Philipp Tomsich , binutils@sourceware.org, Kito Cheng , Nelson Chu , Christoph Muellner , Jim Wilson , Palmer Dabbelt Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,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: Hey Guys, I had heard that the final ratification of the zicond extension is coming soon, so it's time to see what we should do for those old vendor mnemonics and encodings, according to the current gnu policy. Not sure if maintaining compatibility of vendor stuff is worth it, but considering that obsolete vendor stuff should be replaced by the ratified zicond as soon as possible (or we should encourage everyone to use the RVI extension rather than the vendor one), maybe just removing them when the zicond committed is more intuitive. Thanks Nelson On Thu, Jan 26, 2023 at 9:03=E2=80=AFAM Andrew Waterman = wrote: > > On Wed, Jan 25, 2023 at 4:27 PM Jeff Law via Binutils > wrote: > > > > > > > > On 1/20/23 17:29, Philipp Tomsich wrote: > > > *** Zicond is not FROZEN at this time. Do not merge until FROZEN. *** > > > > > > This implements the Zicond (conditional integer operations) extension= , > > > as of version 1.0-draft-20230120. > > > > > > The Zicond extension acts as a building block for branchless sequence= s > > > including conditional-arithmetic, conditional-logic and > > > conditional-select/move. > > > The following instructions constitute Zicond: > > > - czero.eqz rd, rs1, rs2 =3D> rd =3D (rs2 =3D=3D 0) ? 0 : rs1 > > > - czero.nez rd, rs1, rs2 =3D> rd =3D (rs2 !=3D 0) ? 0 : rs1 > > > > > > See > > > https://github.com/riscv/riscv-zicond/releases/download/v1.0-draft= -20230120/riscv-zicond_1.0-draft-20230120.pdf > > > for the proposed specification and usage details. > > > > > > bfd/ChangeLog: > > > > > > * elfxx-riscv.c (riscv_multi_subset_supports): Recognize > > > INSN_CLASS_XVENTANACONDOPS. > > > (riscv_multi_subset_supports_ext): Recognize > > > INSN_CLASS_XVENTANACONDOPS, > > > > > > gas/ChangeLog: > > > > > > * testsuite/gas/riscv/zicond.d: New test. > > > * testsuite/gas/riscv/zicond.s: New test. > > > > > > include/ChangeLog: > > > > > > * opcode/riscv-opc.h (MATCH_CZERO_EQZ): Define. > > > (MASK_CZERO_EQZ): Define. > > > (MATCH_CZERO_NEZ): Define, > > > (MASK_CZERO_NEZ): Define. > > > (DECLARE_INSN): Add czero.eqz and czero.nez. > > > * opcode/riscv.h (enum riscv_insn_class): Add > > > INSN_CLASS_ZICOND > > > > > > opcodes/ChangeLog: > > > > > > * riscv-opc.c: Add czero.eqz and czero.nez. > > Given this extension is derived from the Ventana condops extension, I > > may be somewhat biased. > > This is very much a standardized version of Ventana's custom condops > extension, modulo some details. > > > The mnemonics and encoding is obviously > > different, but the behavior is the same (perhaps differing in timing > > characteristics, but I think that's outside of what we care about here)= . > > > > I assume nobody cares about gdbsim, so nothing to do there. With that > > assumption this is fine to go forward once the spec freezes. > > As for a status update, the RVI architecture-review committee recently > voted to approve the extension, so the official freeze should be > forthcoming. > > > > > jeff > >