From patchwork Fri Sep 20 21:48:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pietro Monteiro X-Patchwork-Id: 97780 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2214B385840F for ; Fri, 20 Sep 2024 21:49:19 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from fout6-smtp.messagingengine.com (fout6-smtp.messagingengine.com [103.168.172.149]) by sourceware.org (Postfix) with ESMTPS id 316283858D35; Fri, 20 Sep 2024 21:48:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 316283858D35 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=sociotechnical.xyz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=sociotechnical.xyz ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 316283858D35 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=103.168.172.149 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1726868921; cv=none; b=VVnoJOD+byhUEyfsObnp7ZXxDxneRYeGTf9MIOjjk7lKjpSFcSr1+8eT9IGfG/xnZ/6/mc8BiUIidblP9zWuAw+4LXtG7i9IlAe0wgkOEpgg7OActUgA5HzurD4bQAJwIuXp3cXSNSdMlVLTPA3pTPvHsGT0jTIIej32TsC/kaE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1726868921; c=relaxed/simple; bh=jhwC+8qnUXxx2xc0FeSfDvvlV4V4k7lPuqpZhzSvla4=; h=DKIM-Signature:DKIM-Signature:MIME-Version:Date:From:To: Message-Id:Subject; b=SCgVX5CnyWJCtzyls31uAEiTgUf2iy3F7zwqhM8xZVkUaNPGH2m5hPPlcF72OO5uris1v/XOCA7kGtYisI/ehEcIIgSItIpzAjUZJ83PP4Bfals7BrXeMLM0vfpkNXz24cLCucE4qGZ8jGCoZavaZgU/gC6SS9LxXCdZUAUtXxM= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from phl-compute-02.internal (phl-compute-02.phl.internal [10.202.2.42]) by mailfout.phl.internal (Postfix) with ESMTP id 92C3713801B4; Fri, 20 Sep 2024 17:48:38 -0400 (EDT) Received: from phl-imap-02 ([10.202.2.81]) by phl-compute-02.internal (MEProxy); Fri, 20 Sep 2024 17:48:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= sociotechnical.xyz; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:from:from:in-reply-to :message-id:mime-version:reply-to:subject:subject:to:to; s=fm3; t=1726868918; x=1726955318; bh=kM+BsAtjfmzvNUAAVta60xNs6VACsGI2 lg3mzhLRv2c=; b=TZj+kqAeNjuuo4EHA3BLWJNA1VEUHC2X9ja2t908+fNIlPo6 Wvfz4l1qs+WTy/OJC6HbfNOxA9SEtNSdWtyzwRy7L3QuadJWX4DDaEm+TOsrhnoW teDtFfgmovhrC1a6n8Sx22BIDnvCDry9e2cDmsNBfQWNe2TmBIjjrGm7vudTmARv 5DxjN2odGU8Hzx1zdhYomJa6AqNPw9nEs5U1EsyPeFDofv8K/gesWyzKYEgrbMW4 MVW3rYYk2Qz/eAYD0T46+Sy525bpdlke2je32dQJ42vCax2WfgA478TUQal/xBuT ByYW2sJA8H2Z/FCNLyBZei7sFcqT8VeFOrOM7A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:message-id:mime-version:reply-to:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1726868918; x=1726955318; bh=kM+BsAtjfmzvN UAAVta60xNs6VACsGI2lg3mzhLRv2c=; b=eefdZ3Va0MciTyY5vnoGYsenaNPQK 0ehpGnfHm+B55KA7outjbSxZtQU+A1N7TE/yfy+RrgQlORmG01+miHSqHNXE+lSr qg8w/5r2Bwu7uKxjuwLJ4GFKsVfSFa5srmm598F/tns3sSMUKl2gUUux4LsN2dLG K4Y7XaQhmjIgeJjHuRdHurRijtI49zDrsYFTTNWW3TeGRwsjE1v4VYGR4adUlgfV G/Qvyxf7YjVLs/uSw1As2X9lyze6YUaVofhLqhA+6Cm6McwqjHssvu2vze2WBp+U Mab9HGHfLD1DnjNQ91roiMDTbx85NLMNyEhxrpsHya1d2PeUV2bDVLTjA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrudelgedgtddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnegfrhhlucfvnfffucdlfeehmdenucfjughrpefoggffhffvvefk ufgtgfesthejredtredttdenucfhrhhomhepfdfrihgvthhrohcuofhonhhtvghirhhofd cuoehpihgvthhrohesshhotghiohhtvggthhhnihgtrghlrdighiiiqeenucggtffrrght thgvrhhnpefghfdvveelteduvdfgkedvvefhueefueejheeileevgfffudduheetteejvd fgteenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehp ihgvthhrohesshhotghiohhtvggthhhnihgtrghlrdighiiipdhnsggprhgtphhtthhope ehpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopegrohhlihhvrgesghgttgdrghhn uhdrohhrghdprhgtphhtthhopehgtggtqdhprghttghhvghssehgtggtrdhgnhhurdhorh hgpdhrtghpthhtohepkhhkohhjihhmrgesghgttgdrghhnuhdrohhrghdprhgtphhtthho peholhgvghgvnhguohesghgttgdrghhnuhdrohhrghdprhgtphhtthhopehpihgvthhroh esshhotghiohhtvggthhhnihgtrghlrdighiii X-ME-Proxy: Feedback-ID: i7f494689:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 48381B00067; Fri, 20 Sep 2024 17:48:38 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface MIME-Version: 1.0 Date: Fri, 20 Sep 2024 17:48:17 -0400 From: "Pietro Monteiro" To: gcc-patches@gcc.gnu.org, "Pietro Monteiro" Cc: "Alexandre Oliva" , "Oleg Endo" , "Kaz Kojima" Message-Id: <216c5bda-76b5-48c7-89e2-431443047c26@app.fastmail.com> Subject: [PATCH] SH: Document extended asm operand modifers X-Spam-Status: No, score=-11.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_INFOUSMEBIZ, RCVD_IN_DNSWL_LOW, SPF_HELO_PASS, SPF_PASS, TXREP 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~patchwork=sourceware.org@gcc.gnu.org From: Pietro Monteiro SH: Document extended asm operand modifers gcc/ChangeLog: * doc/extend.texi (SH Operand Modifiers): New. Signed-off-by: Pietro Monteiro --- Tested by running "make info pdf html" and looking at the pdf and html output. I used the comment on "gcc/config/sh.cc:sh_print_operand()", SH's TARGET_PRINT_OPERAND function, as a guide. gcc/doc/extend.texi | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) -- 2.46.0 diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index c95df845634..f0d8eb59dde 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -12548,6 +12548,35 @@ The list below describes the supported modifiers and their effects for RISC-V. @item @code{i} @tab Print the character ''@code{i}'' if the operand is an immediate. @end multitable +@anchor{shOperandmodifiers} +@subsubsection SH Operand Modifiers + +The list below describes the supported modifiers and their effects for the SH family of processors. + +@multitable @columnfractions .10 .90 +@headitem Modifier @tab Description +@item @code{.} @tab Print ''@code{.s}'' if the instruction needs a delay slot. +@item @code{,} @tab Print ''@code{LOCAL_LABEL_PREFIX}''. +@item @code{@@} @tab Print ''@code{trap}'', ''@code{rte}'' or ''@code{rts}'' depending on the interrupt pragma used. +@item @code{#} @tab Print ''@code{nop}'' if there is nothing to put in the delay slot. +@item @code{'} @tab Print likelihood suffix (''@code{/u}'' for unlikely). +@item @code{>} @tab Print branch target if ''@code{-fverbose-asm}''. +@item @code{O} @tab Require a constant operand and print the constant expression with no punctuation. +@item @code{R} @tab Print the ''@code{LSW}'' of a dp value - changes if in little endian. +@item @code{S} @tab Print the ''@code{MSW}'' of a dp value - changes if in little endian. +@item @code{T} @tab Print the next word of a dp value - same as ''@code{R}'' in big endian mode. +@item @code{M} @tab Print ''@code{.b }'', ''@code{.w}'', ''@code{.l}'', ''@code{.s}'', ''@code{.d}'', suffix if operand is a MEM. +@item @code{N} @tab Print ''@code{r63}'' if the operand is ''@code{const_int 0}''. +@item @code{d} @tab Print a ''@code{V2SF}'' as ''@code{dN}'' instead of ''@code{fpN}''. +@item @code{m} @tab Print the pair ''@code{base,offset}'' or ''@code{base,index}'' for LD and ST. +@item @code{U} @tab Like ''@code{%m}'' for ''@code{LD}'' and ''@code{ST}'', ''@code{HI}'' and ''@code{LO}''. +@item @code{V} @tab Print the position of a single bit set. +@item @code{W} @tab Print the position of a single bit cleared. +@item @code{t} @tab Print a memory address which is a register. +@item @code{u} @tab Print the lowest 16 bits of ''@code{CONST_INT}'', as an unsigned value. +@item @code{o} @tab Print an operator. +@end multitable + @lowersections @include md.texi @raisesections