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: 88709 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1170939vqo; Fri, 28 Apr 2023 12:50:00 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ78UdvJGQ6xCWja1XX7teZaPT7dPQqcmOJ6trG5PXLtZWo9s8+5jjlZcEXoJHiOwItLKf+N X-Received: by 2002:a17:907:60cc:b0:94e:e97b:c65 with SMTP id hv12-20020a17090760cc00b0094ee97b0c65mr6065184ejc.60.1682711400035; Fri, 28 Apr 2023 12:50:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682711400; cv=none; d=google.com; s=arc-20160816; b=nwI+/vQWgtA1GbhZypQV7dpMITbZWowK/Hz3ZG3qhYXWHqVaUZFYdi39Za/f3omkky eVisO4zkbVCNJp5blrdMvJl8wtxxlOdc1yM+cdVI1x5n1keHuTQSVBgF/4qCU1UhkOUU b+RYmsB/DI0izKWI88YYkMc69Bu2OE9SJb3ZI95ARcVY6fsQNowxtFRHTavbaAPI+jV1 szzGCm+5sFurRMeFcCGHurMl2bBhrKsGQiyQYvVSEEo2ahJHXUEnYsKoyYvQuskkC6ha AJ8UfVwRrIDYPvY3QDCrqhxwGkN9+Z3BfWRZbpa2jbkRe8gqfjAWIOWZlBGiF2FjLdSM 3vAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:to:from:cc :content-transfer-encoding:mime-version:message-id:date:subject :dkim-signature:dmarc-filter:delivered-to; bh=aHm9a8wYRa8UnwqL3xigIzxFLvldyKZiHfK1O+bySGo=; b=RA275MD4xTQ1tlspeBSUam/L2vySiwAikONJen5Ce+chn6HEPwGeHrW3XoFanh1VBM 0yIkt7xBsJv22HMBE+62mrJsSO6dne6CihtGIb/Zw43/7LnE4C1Cy9BNkodhSQk3phgY 4rBKgDpLn3LHgE1xc+BXZwpBus7lkJcQe2BL9VzyrRPI5GOm1EKAs9Avz/EQzfwOPdH3 VMRI1wMDTaczY69JxerARBURAz3ciNijL9sQWzGJkiofwRKOL/FJNSN4f/rUQyrkNH5s gOEhowP0lYUig5VBkbis9ym312mXIlmDXHLYzxFHVCVC0qr2frB9tKZBWKJB9Y3aqz/g 26fQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rivosinc-com.20221208.gappssmtp.com header.s=20221208 header.b="yQCnF/nc"; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id ty20-20020a170907c71400b0094f0647d5d5si16581504ejc.800.2023.04.28.12.49.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Apr 2023 12:50:00 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20221208.gappssmtp.com header.s=20221208 header.b="yQCnF/nc"; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D5A783857715 for ; Fri, 28 Apr 2023 19:49:55 +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-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+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764450789359017416?= X-GMAIL-MSGID: =?utf-8?q?1764450789359017416?= 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}.