From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by sourceware.org (Postfix) with ESMTP id 28EBE3857369 for ; Wed, 27 Jul 2022 08:47:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 28EBE3857369 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=loongson.cn Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=loongson.cn Received: from [10.20.4.52] (unknown [10.20.4.52]) by mail.loongson.cn (Coremail) with SMTP id AQAAf9AxGeGQ++Bipeg7AA--.21033S2; Wed, 27 Jul 2022 16:47:12 +0800 (CST) Subject: Re: [PATCH] LoongArch: document -m[no-]explicit-relocs To: WANG Xuerui , Xi Ruoyao , gcc-patches@gcc.gnu.org Cc: xuchenghua@loongson.cn References: <767f8ddc835151d62ce825b8fe7b2ff7b4e3d2e6.camel@xry111.site> From: Lulu Cheng Message-ID: <889472f0-7b9a-9915-ddb3-acffc466119d@loongson.cn> Date: Wed, 27 Jul 2022 16:47:11 +0800 User-Agent: Mozilla/5.0 (X11; Linux mips64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-CM-TRANSID: AQAAf9AxGeGQ++Bipeg7AA--.21033S2 X-Coremail-Antispam: 1UD129KBjvJXoW7Zw1UCry8trWUAF47AFW7XFb_yoW8uw4rpa y7WwsxJF10qryI9w1Iy3WfZr95Ga92gF47G3yrXr4rAF45KFyFvF4Syr15AryxAF18twnr XFn8ta4xuFn8AaDanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUv214x267AKxVWUJVW8JwAFc2x0x2IEx4CE42xK8VAvwI8IcIk0 rVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2ocxC64kIII0Yj41l84x0c7CEw4AK67xGY2AK02 1l84ACjcxK6xIIjxv20xvE14v26F1j6w1UM28EF7xvwVC0I7IYx2IY6xkF7I0E14v26F4j 6r4UJwA2z4x0Y4vEx4A2jsIE14v26F4UJVW0owA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_Gc CE3s1le2I262IYc4CY6c8Ij28IcVAaY2xG8wAv7VC0I7IYx2IY67AKxVWUJVWUGwAv7VC2 z280aVAFwI0_Jr0_Gr1lOx8S6xCaFVCjc4AY6r1j6r4UM4x0Y48IcVAKI48JM4x0x7Aq67 IIx4CEVc8vx2IErcIFxwCjr7xvwVCIw2I0I7xG6c02F41lc7I2V7IY0VAS07AlzVAYIcxG 8wCY02Avz4vE-syl42xK82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxV Aqx4xG67AKxVWUGVWUWwC20s026x8GjcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r12 6r1DMIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_Jr0_JF4lIxAIcVC0I7IYx2IY6x kF7I0E14v26r1j6r4UMIIF0xvE42xK8VAvwI8IcIk0rVWrZr1j6s0DMIIF0xvEx4A2jsIE 14v26r1j6r4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Jr0_GrUvcSsGvfC2KfnxnUUI43ZEXa 7VUb_gA7UUUUU== X-CM-SenderInfo: xfkh0wpoxo3qxorr0wxvrqhubq/ X-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00, BODY_8BITS, GIT_PATCH_0, HTML_MESSAGE, KAM_DMARC_STATUS, NICE_REPLY_A, 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 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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-List-Received-Date: Wed, 27 Jul 2022 08:47:18 -0000 在 2022/7/27 下午3:21, WANG Xuerui 写道: > Hi, > > On 2022/7/27 15:06, Xi Ruoyao wrote: >> Document newly introduced -m[no-]explicit-relocs options.  Ok for trunk? >> >> -- >8 -- >> >> gcc/ChangeLog: >> >>     * doc/invoke.texi: Document -m[no-]explicit-relocs for >>     LoongArch. >> --- >>   gcc/doc/invoke.texi | 12 ++++++++++++ >>   1 file changed, 12 insertions(+) >> >> diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi >> index 9a3f2d14c5a..04418f80428 100644 >> --- a/gcc/doc/invoke.texi >> +++ b/gcc/doc/invoke.texi >> @@ -24939,6 +24939,18 @@ global symbol: The data got table must be >> within +/-8EiB addressing space. >>   @end itemize >>   @end table >>   The default code model is @code{normal}. >> + >> +@item -mexplicit-relocs >> +@itemx -mno-explicit-relocs >> +@opindex mexplicit-relocs >> +@opindex mno-explicit-relocs >> +Generate (do not generate) explicit symbol relocations instead of >> +assembler macros.  Using explicit relocations can improve code >> generation. >> +GCC detects the capaiblities of the assembler when it is built and sets >> +the default to @code{-mexplicit-relocs} if the assembler supports the >> +syntax for explicit specification of relocations, and >> +@code{-mno-explicit-relocs} otherwise.  This option is mostly useful >> for >> +debugging or using an assembler different from build-time. > > Some text massaging, along with some shameful copying from other > (read: RISC-V) -mexplicit-relocs docs... > > "Use or do not use assembler relocation operators when dealing with > symbolic addresses. The alternative is to use assembler macros > instead, which may limit optimization. > > The default value for the option is determined during GCC build-time > by detecting corresponding assembler support: @code{-mexplicit-relocs} > if said support is present, @code{-mno-explicit-relocs} otherwise. > This option is mostly useful for debugging, or interoperation with > assemblers different from the build-time one." > > What do you think? > >>   @end table >>     @node M32C Options I agree with wangxuerui's idea. The same parameter and the same description information can reduce the user's time to learn how to use this parameter.