From patchwork Mon Jul 10 14:19:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kito Cheng X-Patchwork-Id: 1805866 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=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=Butj/ftm; dkim-atps=neutral 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 (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4R05jc5lnyz20bm for ; Tue, 11 Jul 2023 00:19:31 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9E0F13857BB3 for ; Mon, 10 Jul 2023 14:19:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9E0F13857BB3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1688998769; bh=t4A6bT0+g9HPV67XJAm/1TBQiznvsFGGckNF5Nk/jAI=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=Butj/ftm1xqbpw+RXqx47FV4BCr/ABQEX+1R99uPEpZhw+u82KviHdB/d3UWXLtqk ni8GyeD2+8FtlDls5SZNJj4NHx6RcHA1qJ3QWbH/Mwqpyvda3UmBGOcDDdlMxBSGQG XGjy7B/pIC3pnwnW9AxduEV8PKDSxfPi5nfeOlXY= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pg1-x536.google.com (mail-pg1-x536.google.com [IPv6:2607:f8b0:4864:20::536]) by sourceware.org (Postfix) with ESMTPS id 063C63858CDA for ; Mon, 10 Jul 2023 14:19:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 063C63858CDA Received: by mail-pg1-x536.google.com with SMTP id 41be03b00d2f7-55af0a816e4so2228408a12.1 for ; Mon, 10 Jul 2023 07:19:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688998750; x=1691590750; 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=t4A6bT0+g9HPV67XJAm/1TBQiznvsFGGckNF5Nk/jAI=; b=VfZHDCzBjRDUebqimX+pCIyFjacZ6REHP2NAlMPdC63V3VWOKTWJy3f4193ii8Y05K 7OJvAXIVuVW5jfKGRFYWhKLbOKQkMew2v1RA5kvNNz/UPgNCsZq6XVKnZyUSLOsEaDrZ e2t0P53CVurkZzyO79ivXHBCwjNi48lUaMeEUMn+loXmInUxbqHuLAsBXkCokl+yPe+B klUwWYkVVNNQ7qpKpp5i1juty1iLr/5kO9NEMYX9Ld+TbFtdih6tuftE+Zz93ILeSwTO 9IK73Thi8+1XdfI/iLgwJD4rjicht0CY735h9JeyQeC/ca8qSnSsLkf5ajSN+jgtLyvt QDng== X-Gm-Message-State: ABy/qLY+Xl8nJ1GzkK2dkEj/jM1j6mk8cQY8Sus0LOd/qH2t0hH/vsN2 u209RLqtRze8qq9v0HJ7jrpt4ZMRtNOt2eOEMO+ev4sqIZsZr2roi3JsikFRQZKWzH7HEHvdaga T1FX9HsIwKdIwzYKY2SHvqCAyADGtS55HQJDOUeYJDVqpjLvlcSVg94xLA5vE+Yih+mQHkXcc42 m7UL0= X-Google-Smtp-Source: APBJJlFZhzU32fazpl8mM4Nbk8LKFtQ/bdgcCkBnA/vfVK4Gtvkw57azSnxxlQxyZwJAM089OrAuuA== X-Received: by 2002:a17:902:d487:b0:1b6:7f96:42ca with SMTP id c7-20020a170902d48700b001b67f9642camr11657200plg.66.1688998749249; Mon, 10 Jul 2023 07:19:09 -0700 (PDT) Received: from hsinchu02.internal.sifive.com (59-124-168-89.hinet-ip.hinet.net. [59.124.168.89]) by smtp.gmail.com with ESMTPSA id az1-20020a170902a58100b001b9dadf8bd2sm3065685plb.190.2023.07.10.07.19.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jul 2023 07:19:08 -0700 (PDT) To: gcc-patches@gcc.gnu.org, kito.cheng@gmail.com, palmer@dabbelt.com, jeffreyalaw@gmail.com Cc: Kito Cheng Subject: [PATCH] doc: Add doc for RISC-V Operand Modifiers Date: Mon, 10 Jul 2023 22:19:04 +0800 Message-Id: <20230710141904.109665-1-kito.cheng@sifive.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 X-Spam-Status: No, score=-13.0 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.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Kito Cheng via Gcc-patches From: Kito Cheng Reply-To: Kito Cheng Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" Document `z` and `i` operand modifiers, we have much more modifiers other than those two, but they are the only two implement on both GCC and LLVM, consider the compatibility I would like to document those two first, and then review other modifiers later to see if any other should expose and implement on RISC-V LLVM too. gcc/ChangeLog: * doc/extend.texi (RISC-V Operand Modifiers): New. --- gcc/doc/extend.texi | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index bfbc1d6cc9f8..d88fd75e06e6 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -11533,6 +11533,16 @@ The list below describes the supported modifiers and their effects for LoongArch @item @code{z} @tab Print the operand in its unmodified form, followed by a comma. @end multitable +@anchor{riscvOperandmodifiers} +@subsubsection RISC-V Operand Modifiers + +The list below describes the supported modifiers and their effects for RISC-V. + +@multitable @columnfractions .10 .90 +@headitem Modifier @tab Description +@item @code{z} @tab Print ''@code{zero}'' instead of 0 if the operand is an immediate with a value of zero. +@item @code{i} @tab Print the character ''@code{i}'' if the operand is an immediate. +@end multitable @lowersections @include md.texi