From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by sourceware.org (Postfix) with ESMTPS id CC6503858435 for ; Wed, 24 Nov 2021 10:00:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CC6503858435 Received: by mail-ed1-x52d.google.com with SMTP id y13so7670676edd.13 for ; Wed, 24 Nov 2021 02:00:45 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=aSoMTvRCbD/n721BWHAOPV2udH1O3DGOQidh3lRyxjs=; b=JdlZm9lfqZWqkjYRcUeOfV+SoEuX/T4oUobQybIeZLRcZsglY207daDTSYNcgz6jxO Ceiou7e68Z+LgPXkiSCiQLTuGVMiUqzjZnB3o4VVTARJcFZCmDE2bpiBWtpgl0+fDnvC VX/D2W7kmXkIX0UFbNUmP7YWOC/a9WVYe6ve+c+ApOLAXEtnpRsA3HZM9droeEkyqavi eSpJbryDzfrh8bEMYXZdR7/fwHnSRT0rGs4YQKKRHHbLsN6iGaa0wP1IUeoaEbTKqLtA rw0Q/5ztgi0Q2wa49310EsQnbZ1hjBu+OUyKV1xsJ5fX8WLkkUNRoHDHhi+v2SuxvJzQ 9TFg== X-Gm-Message-State: AOAM533FW+rl5SWmz3iZCmSsoLE+TadHnps6DQ+Bl5V9Jxl/XsOyQOxv XW3xJPBWAW5Sp94aQN2el/qQkbt/sRq2pXC2new= X-Google-Smtp-Source: ABdhPJwFJxLYsKxH9BFjLla4WMbH13a1HuLkq9cYKmMQ3sfyjxoh+SgZEhHntJBOgdCTp09yE/M/AGQPraWYcfZiBPM= X-Received: by 2002:a05:6402:11d2:: with SMTP id j18mr22262790edw.318.1637748044485; Wed, 24 Nov 2021 02:00:44 -0800 (PST) MIME-Version: 1.0 References: <20211122081910.1545117-1-siyu@isrc.iscas.ac.cn> In-Reply-To: From: Kito Cheng Date: Wed, 24 Nov 2021 18:00:33 +0800 Message-ID: Subject: Re: [PATCH v2 0/2] RISC-V: add gcc support for Scalar Cryptography v1.0.0-rc6 To: Palmer Dabbelt Cc: siyu@isrc.iscas.ac.cn, ben.marshall@pqshield.com, Christoph Muellner , Andrew Waterman , Richard.Newell@microchip.com, jiawei , mjos@pqshield.com, GCC Patches , Kito Cheng Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Nov 2021 10:00:47 -0000 I would prefer to accept those patchset even with no builtin function or intrinsic function yet, this not only add the support of -march option, but also introduce the predefined macros like __riscv_zk*, which could be used in *.S file to check if those instructions are available or not. On Wed, Nov 24, 2021 at 11:23 AM Palmer Dabbelt wrote: > > [Changing to Jim's new address] > > On Mon, 22 Nov 2021 00:19:08 PST (-0800), siyu@isrc.iscas.ac.cn wrote: > > From: SiYu Wu > > > > This patch add gcc backend support for RISC-V Scalar Cryptography > > Extension (k-ext), including machine description, builtins defines and > > testcases for each k-ext's subset. > > > > A note about Zbkx: The Zbkx should be implemented in bitmanip's Zbp, but > > since zbp is not included in the bitmanip spec v1.0, and crypto's v1.0 > > release will earlier than bitmanip's next release, so for now we > > implementing it here. > > > > Version logs: > > > > v2: As Kito mentions, now this patch only includes the arch string related > > stuff, the builtins and md changes is not included, waiting for the builtin > > and intrinsic added to the spec. Also removed the unnecessary patches and add > > Changelogs. > > I don't think there's anything wrong with what's here, but IMO we should > hold off on merging until GCC does something with these extensions. > > IIUC all this enables is passing "-march=*Zk*" instead of > "-Wa,-march=*Zk*", and while that is useful I'm worried it'll just make > more of a headache for users who lose a simple way to detect the > intrinsics. IMO forcing users to pass -Wa properly encodes the "GCC > doesn't support these, but binutils does" scenario pretty sanely, and > users doing things at this level of complexity should be used to that > already because it happens somewhat frequently. > > I'm not sure if I'm missing some use case this for this, though. > > > SiYu Wu (2): > > RISC-V: Add option defines for Scalar Cryptography > > RISC-V: Add implied defines of Zk, Zkn and Zks > > > > gcc/common/config/riscv/riscv-common.c | 38 +++++++++++++++++++++++++- > > gcc/config/riscv/arch-canonicalize | 16 ++++++++++- > > gcc/config/riscv/riscv-opts.h | 22 +++++++++++++++ > > gcc/config/riscv/riscv.opt | 3 ++ > > 4 files changed, 77 insertions(+), 2 deletions(-)