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 9C8013858D37 for ; Wed, 20 Jul 2022 00:40:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9C8013858D37 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 AQAAf9AxKeEST9diVa4pAA--.14663S2; Wed, 20 Jul 2022 08:40:50 +0800 (CST) Subject: Re: [PATCH v1 1/2] LoongArch: Modify the method of obtaining symbolic addresses. To: Xi Ruoyao , gcc-patches@gcc.gnu.org Cc: i@xen0n.name, xuchenghua@loongson.cn References: <20220719130852.2011955-1-chenglulu@loongson.cn> <20220719130852.2011955-2-chenglulu@loongson.cn> <4d470b84a4ddc51236ad22f9069423d360de2c7a.camel@xry111.site> From: Lulu Cheng Message-ID: <6e0afbd6-3e7d-f0de-f24c-9a57bfa8a434@loongson.cn> Date: Wed, 20 Jul 2022 08:40:50 +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: <4d470b84a4ddc51236ad22f9069423d360de2c7a.camel@xry111.site> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-CM-TRANSID: AQAAf9AxKeEST9diVa4pAA--.14663S2 X-Coremail-Antispam: 1UD129KBjvdXoW7Gr4rtFWUtr1kXw4xCr43GFg_yoWDGFb_uF 1Iv34kJa15Ga1xta17GF45XrW7KrWDZa4Ik3y2qrnaqan7Ja1kCFZ09F93AaykGrWYqF9I yFnrta48Ar429jkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbIAFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26cxKx2IYs7xG 6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48ve4kI8w A2z4x0Y4vE2Ix0cI8IcVAFwI0_JFI_Gr1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI0_Gr0_ Cr1l84ACjcxK6I8E87Iv67AKxVW8JVWxJwA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_Gr1j6F 4UJwAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFcxC0VAKzVAqx4xG6I80ewAv7VC0 I7IYx2IY67AKxVWUJVWUGwAv7VC2z280aVAFwI0_Jr0_Gr1lOx8S6xCaFVCjc4AY6r1j6r 4UM4x0Y48IcVAKI48JM4x0x7Aq67IIx4CEVc8vx2IErcIFxwCYjI0SjxkI62AI1cAE67vI Y487MxkIecxEwVCm-wCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s 026c02F40E14v26r1j6r18MI8I3I0E7480Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_ JF0_Jw1lIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWUJVWUCwCI42IY6xIIjxv20x vEc7CjxVAFwI0_Jr0_Gr1lIxAIcVCF04k26cxKx2IYs7xG6rW3Jr0E3s1lIxAIcVC2z280 aVAFwI0_Jr0_Gr1lIxAIcVC2z280aVCY1x0267AKxVWUJVW8JbIYCTnIWIevJa73UjIFyT uYvjfU5WlkUUUUU X-CM-SenderInfo: xfkh0wpoxo3qxorr0wxvrqhubq/ X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00, 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 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, 20 Jul 2022 00:40:54 -0000 在 2022/7/19 下午10:29, Xi Ruoyao 写道: > The change seems too large. It would be better to split it into > multiple commits (for example, just 3 commits for 1,2,3 below). > > On Tue, 2022-07-19 at 21:08 +0800, Lulu Cheng wrote: > >> 1. The original LA macro instruction is split into two instructions to >>    obtain the address of the symbol if enable '-mexplicit-relocs'. > It's better to add some test cases (with dg-final scan-assembler) for > this. The test case will also show humans the intended behavior after > the change. I'm sorry, I'll add the test cases as soon as possible. >> 3. Modify the method that calls global functions. From 'la.global + jirl' >>    to 'bl'. > Why? Does it means we'll rely on the assembler to emit the correct > sequence for -fno-plt? Then it would be better to use a pseudo mnemonic > like "call" instead of "bl" (because it's not a single "bl" > instruction). I have not described the behavior of noplt, but I will do so in the next submission.