From patchwork Thu Dec 1 03:20:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tsukasa OI X-Patchwork-Id: 2454 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp48178wrr; Wed, 30 Nov 2022 19:20:51 -0800 (PST) X-Google-Smtp-Source: AA0mqf5Ldxl+M4QXD9aqbU7p5IJJDM+90apITSgvW7taO6OD1DYP3jMYOz5JSjqASdT2bqk8DYec X-Received: by 2002:a17:906:2416:b0:7ad:4a55:d6f5 with SMTP id z22-20020a170906241600b007ad4a55d6f5mr55705408eja.220.1669864850977; Wed, 30 Nov 2022 19:20:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669864850; cv=none; d=google.com; s=arc-20160816; b=mRcpbCyK5EhPrRBnivAsRcEMnhXnqhjOBHpN8mSO3aK+g+2ynOKAgIQE5LQcHD2Lzs 1fnEA7al2Wark/maGyY47U/l3FFcwMPFFB3oWgyIgJjmg4z2yDwkqqyarj3l0+eH5rvz BXowE4eMi2QhInXFONmdjFaIOy1zrM33yXcXY6uymS0XJAXa6LzXiTJqqcyAWD3FxpH2 u8myCC8y/HbgLcDt/d/VDfQQX6YbrODDRwNoTwbLL5Pw3welyRJG3+q/2XHaA+PrDHoo /COIy0BQgXGYqc2YTahzyipxL3CxH+NWLjprfpXM6yKcek33ui4yd6Z8QOkDXDgvj10q YQVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=afqxmIrmqqiU35myP4q13jRY41S2yWwqQGEiNGE5U+k=; b=Oh2ZU4x3AJ363jwuttf9NztMimYSktsoI+4fuXOM8cwnrs8TsywZqnkamLJoAh7crf rFrauYzqXrkhXmnb7MBuNRnyIeAlclkoM0bhfqeaXEnRUVo9BHjWJxwoNAVZxc5BxYDZ 6o5R2SZSgERn3drJJJ3Xz0memGpMFBEv0TeKWA5iN/EIYJxGBjFe50nf1JmXGWVdV9cP 6Di14t1tCPJihdwbKsPb3nq4PZ2wyIDCasjJ0j/xEZ2yknBHkkvpWcr/D5zxi6P30SM2 oIm1nBZwYM75lrJuvZOacJZ5zEV+d4dPqDBoTm8ZZHUWFhyyo7/sZ+hW6x8n2BzGxqy3 mi8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b="RR9b/aqQ"; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id f3-20020a056402194300b0046b14f9e2fbsi2499030edz.430.2022.11.30.19.20.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Nov 2022 19:20:50 -0800 (PST) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b="RR9b/aqQ"; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E4B46385B525 for ; Thu, 1 Dec 2022 03:20:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E4B46385B525 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1669864849; bh=afqxmIrmqqiU35myP4q13jRY41S2yWwqQGEiNGE5U+k=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=RR9b/aqQoWNZX1Vw3P0ehJkqV6dl/bgoPu9k1y08d2TzjvzmQzIJUIA8W2icNrW0i 8/pi1fYzaZ1uoJljHlSLP+eIjT8G+CmS9NbhUvlZNGgu2TNRSDGlWDIMr2I0v1v5Do tljepjW/EX321LlRekv7TlFheGW69iuv1QfoFYwc= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-sender-0.a4lg.com (mail-sender-0.a4lg.com [IPv6:2401:2500:203:30b:4000:6bfe:4757:0]) by sourceware.org (Postfix) with ESMTPS id 6ADB53858C54 for ; Thu, 1 Dec 2022 03:20:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6ADB53858C54 Received: from [127.0.0.1] (localhost [127.0.0.1]) by mail-sender-0.a4lg.com (Postfix) with ESMTPSA id D9609300089; Thu, 1 Dec 2022 03:20:38 +0000 (UTC) To: Tsukasa OI Cc: binutils@sourceware.org Subject: [REVIEW ONLY v3 0/1] UNRATIFIED RISC-V: Add 'ZiCond' extension Date: Thu, 1 Dec 2022 03:20:30 +0000 Message-Id: In-Reply-To: References: Mime-Version: 1.0 X-Spam-Status: No, score=-6.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, 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 X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Tsukasa OI via Binutils From: Tsukasa OI Reply-To: Tsukasa OI Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750980205992056530?= X-GMAIL-MSGID: =?utf-8?q?1750980205992056530?= *** WAIT FOR SPECIFICATION FREEZE *** This is an implementation for unratified and not frozen RISC-V extension and not intended to be merged for now. The only intent to submit this patchset is to test new instructions for your (possibly virtual) environment and early review for fast adoption after ratification. PATCH v3 reflects recent change of the extension name (from 'ZiCondOps' to 'ZiCond') and encoding (all v1, v2 and v3 has different encodings). This patchset adds following unratified extension to GNU Binutils: - 'ZiCond' (Integer Conditional Operations) version 1.0 in development which adds 2 instructions ("czero.eqz" and "czero.nez"). This extension makes conditional arithmetic feature much simpler (fewer instructions when no branches are allowed). Note that constant timing guarantee (data-independence / certain side-channel resistance) for this extension is being discussed and may not be guaranteed. This is based on the commit 394e24376939 of the specification document: Tsukasa OI (1): UNRATIFIED RISC-V: Add 'ZiCond' extension bfd/elfxx-riscv.c | 5 +++++ gas/testsuite/gas/riscv/zicond-noarch.d | 3 +++ gas/testsuite/gas/riscv/zicond-noarch.l | 3 +++ gas/testsuite/gas/riscv/zicond.d | 11 +++++++++++ gas/testsuite/gas/riscv/zicond.s | 3 +++ include/opcode/riscv-opc.h | 8 ++++++++ include/opcode/riscv.h | 1 + opcodes/riscv-opc.c | 4 ++++ 8 files changed, 38 insertions(+) create mode 100644 gas/testsuite/gas/riscv/zicond-noarch.d create mode 100644 gas/testsuite/gas/riscv/zicond-noarch.l create mode 100644 gas/testsuite/gas/riscv/zicond.d create mode 100644 gas/testsuite/gas/riscv/zicond.s base-commit: 8a1c55cdfb2d17208cacfc6c34af4693d6956693