From patchwork Fri Apr 28 19:49:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Palmer Dabbelt X-Patchwork-Id: 1775143 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=rivosinc-com.20221208.gappssmtp.com header.i=@rivosinc-com.20221208.gappssmtp.com header.a=rsa-sha256 header.s=20221208 header.b=yQCnF/nc; dkim-atps=neutral Received: from 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 (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Q7NVM3DjVz23td for ; Sat, 29 Apr 2023 05:49:45 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BFBE23858C54 for ; Fri, 28 Apr 2023 19:49:42 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pf1-x431.google.com (mail-pf1-x431.google.com [IPv6:2607:f8b0:4864:20::431]) by sourceware.org (Postfix) with ESMTPS id 282693858D37 for ; Fri, 28 Apr 2023 19:49:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 282693858D37 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-pf1-x431.google.com with SMTP id d2e1a72fcca58-64115eef620so15048017b3a.1 for ; Fri, 28 Apr 2023 12:49:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20221208.gappssmtp.com; s=20221208; t=1682711370; x=1685303370; h=to:from:cc:content-transfer-encoding:mime-version:message-id:date :subject:from:to:cc:subject:date:message-id:reply-to; bh=aHm9a8wYRa8UnwqL3xigIzxFLvldyKZiHfK1O+bySGo=; b=yQCnF/ncJoo/jDIh66fNLBteQCTt68Wi92A8sNvK4g2bSoPE11oGBDxWo73a7sgTKs Wa49JGSHcMI0atwW1oxar+yQwDWYZrQA2mkuR3mMwlnADaz4gfc7Hwxnj7rHgfUw4A0J INg/6zQ4P9l7iEuNmxQU/IQvV8g6JjWInz/3VBPzZiDLAt4aPbY7h0b7HRkWPxzbizw/ 13pqN6P+2qekGd6Bh185rrGxV+aKgD5lLyYkLnHf/TqQHSJy8Vb3rB3fJskMMiF21q/P lbR6OO1HsyHjCO7cPBdN/P0vxBew2Ik5zyktkCNTmAEvml4AItY+vwkAOGPhsubFS0uN E84A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682711370; x=1685303370; h=to:from:cc:content-transfer-encoding:mime-version:message-id:date :subject:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=aHm9a8wYRa8UnwqL3xigIzxFLvldyKZiHfK1O+bySGo=; b=feCy2QRcASpmiqWMGyBK9ph6tESzQHvib0kHJQvv3nUZkuHsXByR0vNETS3l+kByRb sCm3HUBJ1uiCPX1JNODBYqNkoHTIHTSe+mGEtJl8DyzPIIUqUXsyTZAqfnEnS34dlQTK jBWwSqELV9C3EJwXuUZLhux4Kwwhog01Gmb02Z2eTEq3Kgj1ad7Z2HlqaLQ7qkVnO+Z2 gTqW2DHNKywgn4Ta5a+N8w49nacm94/cFHgB/jcYJMIdilHfm/9v16q6jArWkrhFWWwL FSXQwin22ko2xrM951K7eGDpZExrGA3eIslFgOr3MBSJqMxYJYcFf96J32e+FVMgIZtd ngDA== X-Gm-Message-State: AC+VfDx2HRsBam4gBmYae1hrD16j1oCUV6teqMOnz0ltp5OBGxWvcB04 pzeCFU7XTl9qff8pqvxEAUFPDA== X-Google-Smtp-Source: ACHHUZ6j3zJCzS8+Fq3X0/Hp192RJ41oKQdCbtep56gS0hm8KYJ0lFh7H50aC8quBNrXwizoydRsQA== X-Received: by 2002:a17:902:d4d1:b0:1a6:81ac:c34d with SMTP id o17-20020a170902d4d100b001a681acc34dmr14201601plg.28.1682711370012; Fri, 28 Apr 2023 12:49:30 -0700 (PDT) Received: from localhost ([135.180.227.0]) by smtp.gmail.com with ESMTPSA id k1-20020a170902760100b001a1adbe215asm13597507pll.142.2023.04.28.12.49.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Apr 2023 12:49:29 -0700 (PDT) Subject: [PATCH] WIP: All the -march documentation I got around to writing Date: Fri, 28 Apr 2023 12:49:10 -0700 Message-Id: <20230428194910.18611-1-palmer@rivosinc.com> X-Mailer: git-send-email 2.40.0 MIME-Version: 1.0 Cc: Palmer Dabbelt From: Palmer Dabbelt To: Kito Cheng , gcc-patches@gcc.gnu.org X-Spam-Status: No, score=-11.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, 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.29 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 Sender: "Gcc-patches" Kito and I were talking this morning, he's going to try and find the time to actually write this. Kind of odd to send to the mailing list, but I figure that's the easist way to get it out. It's very much not mergeable as is... --- gcc/doc/invoke.texi | 87 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 83 insertions(+), 4 deletions(-) diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 2f40c58b21c..6155b3d5ce1 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -28968,10 +28968,89 @@ The default is @option{-misa-spec=20191213} unless GCC has been configured with @option{--with-isa-spec=} specifying a different default version. @opindex march -@item -march=@var{ISA-string} -Generate code for given RISC-V ISA (e.g.@: @samp{rv64im}). ISA strings must be -lower-case. Examples include @samp{rv64i}, @samp{rv32g}, @samp{rv32e}, and -@samp{rv32imaf}. +@item -march=@var{feature-string} +Generate code for given feature string. Feature strings are similar in spirit +to RISC-V ISA strings, but are subtly different. Users that just what to +target a specific CPU should consider using the @option{-mcpu} argument, + +Similar to ISA strings, feature strings consist of a single base feature set +along with zero or more extensions. The supported base feature sets are +@samp{rv32i}, @samp{rv64i}, @samp{rv32e}, @samp{rv32g}, and @samp{rv64g}. +These mostly match the cooresponding base ISA for the current +@var{ISA-spec-string} (see @option{-misa-spec}). + +The supported extensions are: + +@table @code +@item m: Generate code for the M extension, +@item a +@item f +@item d +@item c +@item h +@item v +@item zicsr +@item zifencei +@item zawrs +@item zba +@item zbb +@item zbc +@item zbs +@item zfinx +@item zdinx +@item zhinx +@item zhinxmin +@item zbkb +@item zbkc +@item zbkx +@item zkne +@item zknh +@item zkr +@item zksed +@item zksh +@item zkt +@item zicboz +@item zicbom +@item zkcbop +@item zk +@item zkn +@item zks +@item zve32x +@item zve32f +@item zve32d +@item zve64x +@item zve64f +@item zve64d +@item zvl32b +@item zvl64b +@item zvl128b +@item zvl256b +@item zvl512b +@item zvl1024b +@item zvl2048b +@item zvl4096b +@item zvl8192b +@item zvl16384b +@item zvl32768b +@item zvl65536b +@item zfh +@item zfhmin +@item zmmul +@item svinval +@item snapot +@item xtheadba +@item xtheadbb +@item xtheadbs +@item xtheadcmo +@item xtheadcondmov +@item xtheadfmemidx +@item xtheadfmv +@item xtheadint +@item xtheadmac +@item xtheadmemidx +@item xtheadmempair +@item xtheadsync +@end table When @option{-march=} is not specified, use the setting from @option{-mcpu}.