From patchwork Fri Jan 19 09:40:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kito Cheng X-Patchwork-Id: 1888353 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=sifive.com header.i=@sifive.com header.a=rsa-sha256 header.s=google header.b=TxLcNJup; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4TGZNw6wjmz1yPV for ; Fri, 19 Jan 2024 20:40:48 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id F02203858283 for ; Fri, 19 Jan 2024 09:40:46 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-il1-x131.google.com (mail-il1-x131.google.com [IPv6:2607:f8b0:4864:20::131]) by sourceware.org (Postfix) with ESMTPS id 52FB33858C2A for ; Fri, 19 Jan 2024 09:40:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 52FB33858C2A Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=sifive.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=sifive.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 52FB33858C2A Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::131 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705657215; cv=none; b=Jx4ym4SwnV2bH59dREtj3cvbzcojsSqGTEpiPVsWFGWBNcMQ5l+z++wq0lJ2SQwH938w2hHzOlLT3ZOEYaRudPBIY60ZgR7xgqvxgiQLeKgSi8ZnEOk26lAR6384VhXPa+VvQxNP4QGVIUm8NLOYYHX1aO6hvP2wwkcQPz/dVxk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705657215; c=relaxed/simple; bh=/dgL8yGPHtQiiBMA64J2Cr6f+oRcFfiDbbl8k2op6Zc=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=WJ2TTlw3iXMbWLWQf17/ern48blUpGrvqVJPNqnh2eO1xwjCynkACBSJslj7mKwGrLO3zWPqBSnXU19AvcikknkkNlgNwHMZP2XW/e2gZIIf95NlH2WJUsY3qBnJCXTIQU6vXPYgw7OUgCgimVCbHrRbsXAzDZw1OOtCsjjfXKk= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-il1-x131.google.com with SMTP id e9e14a558f8ab-361ae51a4c6so314065ab.1 for ; Fri, 19 Jan 2024 01:40:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; t=1705657212; x=1706262012; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=vKhPdK9vPLuCTYXz9uhUoZODwxr6JhsPb7EB2P9Pmrg=; b=TxLcNJupBh6eD7woYVA8YxXKCr3x62WYP7YPHRT24tWXkCKv+ojHO6u/s8ym+jpATA XK0XHlUfyEyzpAMKG8fv6mVBE8YnPd/U65O30XAhDsYYgYjfG8DlB0UANgY3ib5nkXtQ zXIyZv+K0reMZntDe7l5CMKTeWgcK3VWr4DPBXwIOqs2a9ghnwcMAJExdRRVnlpLF7dO EL1WpTi2IkQvM/+GVNIQz6yppu+u9BwgJbgsBUKiPowAC60tr9zIxfBvMysidQSMlQmq XOucOTXhGhLzBTxDE6c0f/K2ThQ6Q86rY4uR8uXWvuZ6WYlEK0dAo4cuKPYT8Ts8fFzG Fo/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705657212; x=1706262012; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=vKhPdK9vPLuCTYXz9uhUoZODwxr6JhsPb7EB2P9Pmrg=; b=Svcd3CooZLkDinWSqkeCAPBBe4vdnxFO5ojyzopKEahzUnmXZb9FBvp+n2u0Xyj7FA 3FGa9dbJ2isl6KHKMw+sfSZ/8truIa30S/FpZPfNQM98pHEdsCX1iY9P1g8caYuuvbif wmjcDQRJjPm+4Qkgx9srn8AuoPZRltoZwM9W2IVLEGeHctx+GB4nZfDda+RXvDRuT0+4 Xez6fAoiy9TZ93zkP/KbhWtZuUvdR9qEQydr46EzJJi/fstv3s3g5XuwYSZTjRURoYM5 BzE5N3K+EC6U6kfg0Yvyg2SHGevxyK5DMuVx62ToCRDSc1ZX2dITKkjxCxzEeB0GJY+X h7rw== X-Gm-Message-State: AOJu0YyuA1zeStOrLNJpS+/sU/tkgdGLAuZxl1LPNudo5DNhL89UspGW /cQkmAUVJxJwGYPJNfeOc4whHZZFBP1+x/QCPg0g2em5A1FmVR+3jhurpj6+xrAzbfvyoddbrU5 RAuOlBZgfc2IRKJoFzSA3qspoCPNXa0PF3nJOJX+/eLSBU7gedOGjs727DI7aP3jhiXOidyZYfO hHRs9xez4UEr2ZiKcljMtOohlx/1mmc00qHWaBqFJ1 X-Google-Smtp-Source: AGHT+IGNNgWfqLVS17EQ3G0A2B+h9890J8JH8duDh49CsfLh84uOJuLRVL+A+F7JlVibm8QIhSp+7w== X-Received: by 2002:a05:6e02:dc4:b0:361:a7aa:c8fb with SMTP id l4-20020a056e020dc400b00361a7aac8fbmr1197910ilj.34.1705657211882; Fri, 19 Jan 2024 01:40:11 -0800 (PST) Received: from hsinchu18.internal.sifive.com (59-124-168-89.hinet-ip.hinet.net. [59.124.168.89]) by smtp.gmail.com with ESMTPSA id c4-20020a633504000000b005cf9e592e7bsm2988030pga.16.2024.01.19.01.40.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jan 2024 01:40:11 -0800 (PST) From: Kito Cheng To: gcc-patches@gcc.gnu.org, kito.cheng@gmail.com, jim.wilson.gcc@gmail.com, palmer@dabbelt.com, andrew@sifive.com, jeffreyalaw@gmail.com, christoph.muellner@vrull.eu, juzhe.zhong@rivai.ai, rep.dot.nop@gmail.com Cc: Kito Cheng Subject: [PATCH v2] RISC-V: Documnet the list of supported extensions Date: Fri, 19 Jan 2024 17:40:05 +0800 Message-Id: <20240119094005.1936422-1-kito.cheng@sifive.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-12.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Try to list all supported extensions: name, version and few description for each extension. v2 changes: - Fix several typo. - Add expantion info for vector crypto extensions. - Drop zvl8192b, zvl16384b, zvl32768b and zvl65536b. - Aadd zicntr and zihpm gcc/ChangeLog: * doc/invoke.texi (RISC-V Options): Add list of supported extensions. --- gcc/doc/invoke.texi | 461 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 461 insertions(+) diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index c0e513c8f27..313f363f5f2 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -30113,6 +30113,467 @@ syntax @samp{p} or @samp{}, (e.g.@: @samp{m2p1} or @samp{m2}). @end table +Supported extension are listed below: +@multitable @columnfractions .10 .10 .80 +@headitem Extension Name @tab Supported Version @tab Description +@item i +@tab 2.0, 2.1 +@tab Base integer extension. + +@item e +@tab 2.0 +@tab Reduced base integer extension. + +@item g +@tab - +@tab General-purpose computing base extension, @samp{g} will expand to +@samp{i}, @samp{m}, @samp{a}, @samp{f}, @samp{d}, @samp{zicsr} and +@samp{zifencei}. + +@item m +@tab 2.0 +@tab Integer multiplication and division extension. + +@item a +@tab 2.0, 2.1 +@tab Atomic extension. + +@item f +@tab 2.0, 2.2 +@tab Single-precision floating-point extension. + +@item d +@tab 2.0, 2.2 +@tab Double-precision floating-point extension. + +@item c +@tab 2.0 +@tab Compressed extension. + +@item h +@tab 1.0 +@tab Hypervisor extension. + +@item v +@tab 1.0 +@tab Vector extension. + +@item zicsr +@tab 2.0 +@tab Control and status register access extension. + +@item zifencei +@tab 2.0 +@tab Instruction-fetch fence extension. + +@item zicond +@tab 1.0 +@tab Integer conditional operations extension. + +@item zawrs +@tab 1.0 +@tab Wait-on-reservation-set extension. + +@item zba +@tab 1.0 +@tab Address calculation extension. + +@item zbb +@tab 1.0 +@tab Basic bit manipulation extension. + +@item zbc +@tab 1.0 +@tab Carry-less multiplication extension. + +@item zbs +@tab 1.0 +@tab Single-bit operation extension. + +@item zfinx +@tab 1.0 +@tab Single-precision floating-point in integer registers extension. + +@item zdinx +@tab 1.0 +@tab Double-precision floating-point in integer registers extension. + +@item zhinx +@tab 1.0 +@tab Half-precision floating-point in integer registers extension. + +@item zhinxmin +@tab 1.0 +@tab Minimal half-precision floating-point in integer registers extension. + +@item zbkb +@tab 1.0 +@tab Cryptography bit-manipulation extension. + +@item zbkc +@tab 1.0 +@tab Cryptography carry-less multiply extension. + +@item zbkx +@tab 1.0 +@tab Cryptography crossbar permutation extension. + +@item zkne +@tab 1.0 +@tab AES Encryption extension. + +@item zknd +@tab 1.0 +@tab AES Decryption extension. + +@item zknh +@tab 1.0 +@tab Hash function extension. + +@item zkr +@tab 1.0 +@tab Entropy source extension. + +@item zksed +@tab 1.0 +@tab SM4 block cipher extension. + +@item zksh +@tab 1.0 +@tab SM3 hash function extension. + +@item zkt +@tab 1.0 +@tab Data independent execution latency extension. + +@item zk +@tab 1.0 +@tab Standard scalar cryptography extension. + +@item zkn +@tab 1.0 +@tab NIST algorithm suite extension. + +@item zks +@tab 1.0 +@tab ShangMi algorithm suite extension. + +@item zihintntl +@tab 1.0 +@tab Non-temporal locality hints extension. + +@item zihintpause +@tab 1.0 +@tab Pause hint extension. + +@item zicboz +@tab 1.0 +@tab Cache-block zero extension. + +@item zicbom +@tab 1.0 +@tab Cache-block management extension. + +@item zicbop +@tab 1.0 +@tab Cache-block prefetch extension. + +@item zicntr +@tab 2.0 +@tab Standard extension for base counters and timers. + +@item zihpm +@tab 2.0 +@tab Standard extension for hardware performance counters. + +@item ztso +@tab 1.0 +@tab Total store ordering extension. + +@item zve32x +@tab 1.0 +@tab Vector extensions for embedded processors. + +@item zve32f +@tab 1.0 +@tab Vector extensions for embedded processors. + +@item zve64x +@tab 1.0 +@tab Vector extensions for embedded processors. + +@item zve64f +@tab 1.0 +@tab Vector extensions for embedded processors. + +@item zve64d +@tab 1.0 +@tab Vector extensions for embedded processors. + +@item zvl32b +@tab 1.0 +@tab Minimum vector length standard extensions + +@item zvl64b +@tab 1.0 +@tab Minimum vector length standard extensions + +@item zvl128b +@tab 1.0 +@tab Minimum vector length standard extensions + +@item zvl256b +@tab 1.0 +@tab Minimum vector length standard extensions + +@item zvl512b +@tab 1.0 +@tab Minimum vector length standard extensions + +@item zvl1024b +@tab 1.0 +@tab Minimum vector length standard extensions + +@item zvl2048b +@tab 1.0 +@tab Minimum vector length standard extensions + +@item zvl4096b +@tab 1.0 +@tab Minimum vector length standard extensions + +@item zvbb +@tab 1.0 +@tab Vector basic bit-manipulation extension. + +@item zvbc +@tab 1.0 +@tab Vector carryless multiplication extension. + +@item zvkb +@tab 1.0 +@tab Vector cryptography bit-manipulation extension. + +@item zvkg +@tab 1.0 +@tab Vector GCM/GMAC extension. + +@item zvkned +@tab 1.0 +@tab Vector AES block cipher extension. + +@item zvknha +@tab 1.0 +@tab Vector SHA-2 secure hash extension. + +@item zvknhb +@tab 1.0 +@tab Vector SHA-2 secure hash extension. + +@item zvksed +@tab 1.0 +@tab Vector SM4 Block Cipher extension. + +@item zvksh +@tab 1.0 +@tab Vector SM3 Secure Hash extension. + +@item zvkn +@tab 1.0 +@tab Vector NIST Algorithm Suite extension, @samp{zvkn} will expand to +@samp{zvkned}, @samp{zvknhb}, @samp{zvkb} and @samp{zvkt}. + +@item zvknc +@tab 1.0 +@tab Vector NIST Algorithm Suite with carryless multiply extension, @samp{zvknc} +will expand to @samp{zvkn} and @samp{zvbc}. + +@item zvkng +@tab 1.0 +@tab Vector NIST Algorithm Suite with GCM extension, @samp{zvkng} will expand +to @samp{zvkn} and @samp{zvkg}. + +@item zvks +@tab 1.0 +@tab Vector ShangMi algorithm suite extension, @samp{zvks} will expand +to @samp{zvksed}, @samp{zvksh}, @samp{zvkb} and @samp{zvkt}. + +@item zvksc +@tab 1.0 +@tab Vector ShangMi algorithm suite with carryless multiplication extension, +@samp{zvksc} will expand to @samp{zvks} and @samp{zvbc}. + +@item zvksg +@tab 1.0 +@tab Vector ShangMi algorithm suite with GCM extension, @samp{zvksg} will expand +to @samp{zvks} and @samp{zvkg}. + +@item zvkt +@tab 1.0 +@tab Vector data independent execution latency extension. + +@item zfh +@tab 1.0 +@tab Half-precision floating-point extension. + +@item zfhmin +@tab 1.0 +@tab Minimal half-precision floating-point extension. + +@item zvfh +@tab 1.0 +@tab Vector half-precision floating-point extension. + +@item zvfhmin +@tab 1.0 +@tab Vector minimal half-precision floating-point extension. + +@item zvfbfmin +@tab 1.0 +@tab Vector BF16 converts extension. + +@item zfa +@tab 1.0 +@tab Additional floating-point extension. + +@item zmmul +@tab 1.0 +@tab Integer multiplication extension. + +@item zca +@tab 1.0 +@tab Integer compressed instruction extension. + +@item zcf +@tab 1.0 +@tab Compressed single-precision floating point loads and stores extension. + +@item zcd +@tab 1.0 +@tab Compressed double-precision floating point loads and stores extension. + +@item zcb +@tab 1.0 +@tab Simple compressed instruction extension. + +@item zce +@tab 1.0 +@tab Compressed instruction extensions for embedded processors. + +@item zcmp +@tab 1.0 +@tab Compressed push pop extension. + +@item zcmt +@tab 1.0 +@tab Table jump instruction extension. + +@item smaia +@tab 1.0 +@tab Advanced interrupt architecture extension. + +@item smepmp +@tab 1.0 +@tab PMP Enhancements for memory access and execution prevention on Machine mode. + +@item smstateen +@tab 1.0 +@tab State enable extension. + +@item ssaia +@tab 1.0 +@tab Advanced interrupt architecture extension for supervisor-mode. + +@item sscofpmf +@tab 1.0 +@tab Count overflow & filtering extension. + +@item ssstateen +@tab 1.0 +@tab State-enable extension for supervisor-mode. + +@item sstc +@tab 1.0 +@tab Supervisor-mode timer interrupts extension. + +@item svinval +@tab 1.0 +@tab Fine-grained address-translation cache invalidation extension. + +@item svnapot +@tab 1.0 +@tab NAPOT translation contiguity extension. + +@item svpbmt +@tab 1.0 +@tab Page-based memory types extension. + +@item xcvmac +@tab 1.0 +@tab Core-V multiply-accumulate extension. + +@item xcvalu +@tab 1.0 +@tab Core-V miscellaneous ALU extension. + +@item xcvelw +@tab 1.0 +@tab Core-V event load word extension. + +@item xtheadba +@tab 1.0 +@tab T-head address calculation extension. + +@item xtheadbb +@tab 1.0 +@tab T-head basic bit-manipulation extension. + +@item xtheadbs +@tab 1.0 +@tab T-head single-bit instructions extension. + +@item xtheadcmo +@tab 1.0 +@tab T-head cache management operations extension. + +@item xtheadcondmov +@tab 1.0 +@tab T-head conditional move extension. + +@item xtheadfmemidx +@tab 1.0 +@tab T-head indexed memory operations for floating-point registers extension. + +@item xtheadfmv +@tab 1.0 +@tab T-head double floating-point high-bit data transmission extension. + +@item xtheadint +@tab 1.0 +@tab T-head acceleration interruption extension. + +@item xtheadmac +@tab 1.0 +@tab T-head multiply-accumulate extension. + +@item xtheadmemidx +@tab 1.0 +@tab T-head indexed memory operation extension. + +@item xtheadmempair +@tab 1.0 +@tab T-head two-GPR memory operation extension. + +@item xtheadsync +@tab 1.0 +@tab T-head multi-core synchronization extension. + +@item xventanacondops +@tab 1.0 +@tab Ventana integer conditional operations extension. + +@end multitable + When @option{-march=} is not specified, use the setting from @option{-mcpu}. If both @option{-march} and @option{-mcpu=} are not specified, the default for