From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-il1-x135.google.com (mail-il1-x135.google.com [IPv6:2607:f8b0:4864:20::135]) by sourceware.org (Postfix) with ESMTPS id 1FD553858D28 for ; Thu, 26 Jan 2023 01:02:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1FD553858D28 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=sifive.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=sifive.com Received: by mail-il1-x135.google.com with SMTP id m8so250337ili.7 for ; Wed, 25 Jan 2023 17:02:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=9gsb3g3aBzf+s+5I9C4Fp06aTFoKl20vBsHJ+tcDDa4=; b=hiVGmN4vhT1vUKhs2JwBdcnuDj7kVOhtlKSIdn1SAsRKS1qpiGITdwQH2GqJX7noNg saOhLCA0hEQWy35/PMFx7wDWKKPsKOIvlcW2pKvcfCHzuK5MLPAesWuTxKGO6njER+DX NhvvjCFrJNyuKFadO3XslsEqUyc8GmVb4m06FUUPBoWA8uMvg9N2d8RVXD8KVQBmTW6u rOwN3j6LtMYBFBkVXuS4hvcOpfoTjV3/JbeYf/aIqOcwehZdmDQOm7Rt0lk1UFSF2q1t SyF0kf50TD/xEY3QY/xTJpYkRPSu5e9cAc4Tdz8wCWsOMCDTutO+J9t0jePXhuYOWE6H Qhag== 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=9gsb3g3aBzf+s+5I9C4Fp06aTFoKl20vBsHJ+tcDDa4=; b=KnXTfmLaN4oyGmE0JoyVg2dWNcVeHADPEUK5e6P92rbgu5g/tde5R1gX5+k7wh5POq 6ZCuB6ysvbd8dzc2kBqTOKGTo+1uvCQKbsdcWN8wmXRVtf7fS7Qnqnz/A2wvqUb4J6vI XxFwJrIyIWLZ/P0yt7LkZQvT3FAJDk1hTaGkSxSPVQAMWhuCayuSlMHCJ1jgRKFNhfLB OyIBK2sYp3C0XxzJ6jPBMoUhvEfdgfN2VfOeDExoQ5w/1GStGab4ymkk/psKfXwcsm70 R1UCe6akYU8y1ohFEcc8RQhS3KLOR9XmHE86y7tjhw8ARQyEMnacvXm1FFffke0Im14t bCow== X-Gm-Message-State: AO0yUKUvpIISGDKTCjyVxsUiG7Jo0ZQyuhtEAMBEiickGUtlAKBJ9t0Y Qiy+VWpA9ucGVPT6AqQvChrEmqBXnwnmqmUndN74fS9mVIiZ/CwL+hkO2fovNFl5b0YUZfWNaXL ZtU8MR6KyHTvceroyQizhRVRA5y9wSQsQUcXGCWTqNJYhvGxwJ05vVUB8QLaYXxO/OXyCXvBZ6g == X-Google-Smtp-Source: AK7set/rY8LbkJZSBlE3f03Y2JCB2v/LbsqNN7Zw8bSMks3VFK2BUcyZ8YdqKWXYDLig8q2Zd1uCJg== X-Received: by 2002:a05:6e02:b4e:b0:30f:4f5b:201f with SMTP id f14-20020a056e020b4e00b0030f4f5b201fmr289791ilu.20.1674694954952; Wed, 25 Jan 2023 17:02:34 -0800 (PST) Received: from mail-il1-f179.google.com (mail-il1-f179.google.com. [209.85.166.179]) by smtp.gmail.com with ESMTPSA id t40-20020a05663836e800b003a5f25b1888sm17475jau.35.2023.01.25.17.02.34 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 25 Jan 2023 17:02:34 -0800 (PST) Received: by mail-il1-f179.google.com with SMTP id f8so254268ilj.5 for ; Wed, 25 Jan 2023 17:02:34 -0800 (PST) X-Received: by 2002:a05:6e02:102a:b0:30f:641b:d141 with SMTP id o10-20020a056e02102a00b0030f641bd141mr2024283ilj.16.1674694953661; Wed, 25 Jan 2023 17:02:33 -0800 (PST) MIME-Version: 1.0 References: <20230121002935.1139281-1-philipp.tomsich@vrull.eu> <7dfcdb8b-f8ba-f0ae-b71f-f6fef1acac13@gmail.com> In-Reply-To: <7dfcdb8b-f8ba-f0ae-b71f-f6fef1acac13@gmail.com> From: Andrew Waterman Date: Wed, 25 Jan 2023 17:02:22 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH v1] RISC-V: Support Zicond extension To: Jeff Law Cc: Philipp Tomsich , binutils@sourceware.org, Kito Cheng , Nelson Chu , Christoph Muellner Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 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 sequences > > including conditional-arithmetic, conditional-logic and > > conditional-select/move. > > The following instructions constitute Zicond: > > - czero.eqz rd, rs1, rs2 => rd = (rs2 == 0) ? 0 : rs1 > > - czero.nez rd, rs1, rs2 => rd = (rs2 != 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 >