From patchwork Mon Jan 8 13:47:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kito Cheng X-Patchwork-Id: 186015 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:37c1:b0:101:2151:f287 with SMTP id y1csp1029522dyq; Mon, 8 Jan 2024 05:51:41 -0800 (PST) X-Google-Smtp-Source: AGHT+IEGsU15IfdOr2v8tijgiNVNTTjlXMepa2S+OrgW1WCCwHCltgWpaZxyGyCb9jnRZLETLut4 X-Received: by 2002:ad4:5bcd:0:b0:681:101:ec40 with SMTP id t13-20020ad45bcd000000b006810101ec40mr3465668qvt.62.1704721901047; Mon, 08 Jan 2024 05:51:41 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1704721901; cv=pass; d=google.com; s=arc-20160816; b=IF/5gb+nfRcE0FKHe+Cp6Y6fF1DdqsdW/5V9DQrLtEwxpCpL6j2NfrFA6iqbtHDyyt SsiBzgLczwirDZ481LaDvErZ5/ubKqBQIXPfmtGEdjaSFdoR16r2/nKYB0i56NBHuVK9 qYNa0UgEOKYvhead0GUOxZGaV0Thip2gi1UrURosHonTSbRf5LfxgJznGdSEAZTnvISn M3lziR98wxAZcjSd7nxbY9x4zl+i0BCm9+GbKXpnnNwBNpm5UJueR70eGZQBNtqHghuE mvGcxQDmRsfwcIqwICLNo7fR2cL2XjjDiznSTvhjwrBS/w/zdZQkVQg0SFVRT0uMFRGf y+qA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to: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 :from:dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=Iz3CLQi3Dhf+fSZ4g/BiG9LD69+jGQx82H0+qMqQpO8=; fh=3Ck16crQUxNabL1wC/NAUZY2nAVZpSKeVH/lwIj1XIE=; b=dMTs889dP8syfkzVSIIHyqbcb07xG6iR1Spl+j59HuzI80054sPFuO9w6mUyHniLFT rpET0vGYmfu19J2YCuGK4X2FRQKHSz6VbvwIfBRV0pQMEPqYL6P2u9efi/CgIn8aKJjy avyosf5G99kFxTna6RyToWqbm43xoYWzlDpcTVDTn1/w2DXJUjDRMoNtlyZTWpiRmZsm T5IJ1zEKECq0KnTnexLpYj0oRK/47fG3+zkI9tl9dfZC16beyBsukqpKBrAfXsCOJdwg KLHOltWhabN9nPNvi9fRrRjc5qrKIGzlxcC4G7DFUwIcpZZ2K63sDHDlrUPc37WoE4dV 9R/g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b="jyXFmS/s"; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=sifive.com Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id h10-20020a0cf20a000000b0068069f398dcsi3941453qvk.90.2024.01.08.05.51.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jan 2024 05:51:41 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b="jyXFmS/s"; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=sifive.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BB0CF385E00F for ; Mon, 8 Jan 2024 13:51:40 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by sourceware.org (Postfix) with ESMTPS id 11670385E459 for ; Mon, 8 Jan 2024 13:48:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 11670385E459 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 11670385E459 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::633 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704721688; cv=none; b=MrSCfPTewWaHltFlgvjlN0yLoh747h03X8q0PfnYdJAiWjjOxNSdjzK4Ya1wsAFld7YfrXhED+D/bIejF/rA6B5o4G5QFqTYU/BT/M8KfkKks9SKo1t43rvNhpnpSjBRIrot1ooEaXFTM4G6oBKaZsHBkkChNIn8duWAPGv0sAE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704721688; c=relaxed/simple; bh=Wn/jWrxlhGRYKUvHBSKpFirEFWEjWodzvWgvaWDajVY=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=pNaD2/+LJPiAXMLrLQiHCBcDgWkm3bLBQIYx8GhkLWwFykNySS+D4yRMvwM006X4pEAkbLFugkbOJmqaa1/3HfsQOmbdtdM1AGqcPriGk8j7KFVLlC3cgjv1fq6LgN+CAKAf8k6HTizFlxYjfvxh8v/p1azS7Xgpz5XmgtoXw88= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x633.google.com with SMTP id d9443c01a7336-1d4df66529bso4589525ad.1 for ; Mon, 08 Jan 2024 05:48:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; t=1704721685; x=1705326485; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Iz3CLQi3Dhf+fSZ4g/BiG9LD69+jGQx82H0+qMqQpO8=; b=jyXFmS/sXRymtNQmk2+ZUQyCB0tCQC/K5HGoaWS5jX2tvRH9sGjzGc/rII3RkNU9s0 HOx1goVk96Cq0aREvLRl8o82hE5+A2f3H5UBHqVzqLreJK4JVkqs0FGioDvL7HqoP7hV ohU8GZtcfnJGP/Y1DAzaF+/W5My+aGqg2R5xg8fqQrbj8lGQtXzkTZxmNBto6xypL0kb uCS/YV3O60lk7u/HOZdFoveoGI8OjXMUtz6L6+1+FTgpVMHdxfHD/vokw1MCD2zNRkfu 95G1w4nMB/1LgI0k5Qq7ymlyis7Hm0jjff8FfcCw0OlU4BQ9aueik/fdjYuij2PQw/SE H91g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704721685; x=1705326485; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Iz3CLQi3Dhf+fSZ4g/BiG9LD69+jGQx82H0+qMqQpO8=; b=lULcBtHIGJ+kOF0Bd8WOs0OT76Su0OM+YDDYDKSl1TnPc9WAkozauzLIYx6tHf3zod /NjUfjGuP8IfcRuzCUfM2GyDLNHVUWalWtLbhK3Zbg8jDiusrbz795x1JExQlW5B3JMp TO+dDZ5xSybLRl5CfPARNLYygznPoD6u7oAZVWAudQyP5Y/vGYyb/o6EFDy/fPFsyNp6 bPPKHRohf6Fyv1jWk9ngJ9z2v1JhLhXdzT7nLjFsCv6WrZ17ncLotCRVV/aup36Kn4mi 15PgBtO8Ce4cRIr52+bEVBprgqRiyV76UOrXsqKQXIB3hzWDNCKie1fC7jnzAvfXHbqx oETA== X-Gm-Message-State: AOJu0YwlKHP92RCOSo9HdCaLyXRQRLVnW3AwJy8AeImlI2xWAqhMFazY Y4FmGV3jQplfNyN+SAF2d3sCCC+9wiwxVqkLp5cD3c99Nt5QkZRTogM9tHBGGJFoHN3Q9aKyOR5 6ULS1QL9CWccrj0IQxMR3EaAjWH1lA6M4fq8wWuG9qMmAqlnoLOlt3c2bV0K9JeG3fkyd3TIc9Y vGroiWv5hTM4s= X-Received: by 2002:a17:903:41c2:b0:1d4:e075:354 with SMTP id u2-20020a17090341c200b001d4e0750354mr1366114ple.24.1704721684697; Mon, 08 Jan 2024 05:48:04 -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 jc20-20020a17090325d400b001d403969b65sm4588056plb.187.2024.01.08.05.48.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jan 2024 05:48:04 -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 Cc: Kito Cheng Subject: [PATCH 5/5] RISC-V: Document the syntax of -march Date: Mon, 8 Jan 2024 21:47:38 +0800 Message-Id: <20240108134738.998804-6-kito.cheng@sifive.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240108134738.998804-1-kito.cheng@sifive.com> References: <20240108134738.998804-1-kito.cheng@sifive.com> 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+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787530471982606315 X-GMAIL-MSGID: 1787530471982606315 --- gcc/doc/invoke.texi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 68d1f364ac0..81ee7ac758a 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -30037,6 +30037,22 @@ 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}. +The syntax of the ISA string is defined as follows: + +@table @code +@item The string must start with @samp{rv32} or @samp{rv64}, followed by +@samp{i}, @samp{e}, or @samp{g}, referred to as the base ISA. +@item The subsequent part of the string is a list of extension names. Extension +names can be categorized as multi-letter (e.g.@: @samp{zba}) and single-letter +(e.g.@: @samp{v}). Single-letter extensions can appear consecutively, +but multi-letter extensions must be separated by underscores. +@item An underscore can appear anywhere after the base ISA. It has no specific +effect but is used to improve readability and can act as a separator. +@item Extension names may include an optional version number, following the +syntax @samp{p} or @samp{}, (e.g.@: @samp{m2p1} or +@samp{m2}). +@end table + 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