From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by sourceware.org (Postfix) with ESMTP id B25F43857C4E for ; Tue, 5 Dec 2023 01:36:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B25F43857C4E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=loongson.cn Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=loongson.cn ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B25F43857C4E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=114.242.206.163 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701740203; cv=none; b=b2oHxoQE2UtFHKAVcsRU2HOAFyFU8HNIenU/F9pAu7h4+GF0N60qUipB/kvaDPVWUDyGWsUAhGs50CbaLVcZbxneO5IMhUVc9F60Ocf1PtNjbQrkvSreE2NDt64dl84in4RyX974efmxMKCf91V4tWrn300lXjwhVMPJdsk92uE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701740203; c=relaxed/simple; bh=VzeRAdHtq6e+wHKpHbRAbDGb9U7pfUuKd15xAxzkBdA=; h=Subject:To:From:Message-ID:Date:MIME-Version; b=H5gnUSQdGVffGoJCqPcRnX5wQp5MjBg1sxKvN7D6cK269oESSc3NPZeDQbkMoLlCYCpdgt1AGkGO1D6+7c9WxP+TEQ80z+PYhPwB+5mrpiWF+8oNHXJT2FVwVrlAb2eCTAwEB/8t8oSRoGxDDa9+Om9yolsYHztUOA4mlBAzF28= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from loongson.cn (unknown [10.20.4.171]) by gateway (Coremail) with SMTP id _____8CxRuibfm5lEus+AA--.6268S3; Tue, 05 Dec 2023 09:36:27 +0800 (CST) Received: from [10.20.4.171] (unknown [10.20.4.171]) by localhost.localdomain (Coremail) with SMTP id AQAAf8CxO9yZfm5lb_xUAA--.56093S3; Tue, 05 Dec 2023 09:36:26 +0800 (CST) Subject: Re: [PATCH v2 3/5] LoongArch: opcodes: Add support for tls le relax. To: Xi Ruoyao , changjiachen , binutils@sourceware.org Cc: xuchenghua@loongson.cn, chenglulu@loongson.cn, liuzhensong@loongson.cn, i.swmail@xen0n.name, maskray@google.com, cailulu@loongson.cn, luweining@loongson.cn, wanglei@loongson.cn, hejinyang@loongson.cn, Lazy_Linux@126.com References: <20231202065334.25904-1-changjiachen@stu.xupt.edu.cn> <20231202065334.25904-4-changjiachen@stu.xupt.edu.cn> <8295edb277bbeae2e5a7e12e1ffb09e33898ba58.camel@xry111.site> From: mengqinggang Message-ID: Date: Tue, 5 Dec 2023 09:36:25 +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: <8295edb277bbeae2e5a7e12e1ffb09e33898ba58.camel@xry111.site> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-CM-TRANSID:AQAAf8CxO9yZfm5lb_xUAA--.56093S3 X-CM-SenderInfo: 5phqw15lqjwttqj6z05rqj20fqof0/ X-Coremail-Antispam: 1Uk129KBj93XoW7Kry3Ww1UtFW7uF1rXrWxZrc_yoW8Cr4Upr 93AFW5Kan5u3Z7Cas2q345Gr1Fya12vFy7J393tw1F9w13XF1DXr48J3y7KFyrJ3yrK342 qF15Zry8uF1kuabCm3ZEXasCq-sJn29KB7ZKAUJUUUU8529EdanIXcx71UUUUU7KY7ZEXa sCq-sGcSsGvfJ3Ic02F40EFcxC0VAKzVAqx4xG6I80ebIjqfuFe4nvWSU5nxnvy29KBjDU 0xBIdaVrnRJUUUv0b4IE77IF4wAFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26cxKx2 IYs7xG6rWj6s0DM7CIcVAFz4kK6r1Y6r17M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48v e4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Jr0_JF4l84ACjcxK6xIIjxv20xvEc7CjxVAFwI 0_Jr0_Gr1l84ACjcxK6I8E87Iv67AKxVW8JVWxJwA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_ Gr0_Gr1UM2AIxVAIcxkEcVAq07x20xvEncxIr21l57IF6xkI12xvs2x26I8E6xACxx1l5I 8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r106r15McIj6I8E87Iv67AK xVWUJVW8JwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IY64vIr41lc7I2V7IY0VAS07AlzV AYIcxG8wCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E 14v26r1j6r18MI8I3I0E7480Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_Jw0_GFylIx kGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWUJVWUCwCI42IY6xIIjxv20xvEc7CjxVAF wI0_Jr0_Gr1lIxAIcVCF04k26cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r1j6r 4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Jr0_GrUvcSsGvfC2KfnxnUUI43ZEXa7IU8j-e5UU UUU== X-Spam-Status: No, score=-14.5 required=5.0 tests=BAYES_00,GIT_PATCH_0,KAM_DMARC_STATUS,NICE_REPLY_A,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 List-Id: 在 2023/12/2 下午3:14, Xi Ruoyao 写道: > On Sat, 2023-12-02 at 14:53 +0800, changjiachen wrote: >> Add new opcode for tls le relax. >> >> opcode/ChangeLog: >> >> * loongarch-opc.c: Add new loongarch opcode. >> --- >>  opcodes/loongarch-opc.c | 1 + >>  1 file changed, 1 insertion(+) >> >> diff --git a/opcodes/loongarch-opc.c b/opcodes/loongarch-opc.c >> index 82b88bdad2a..e9ced5383e5 100644 >> --- a/opcodes/loongarch-opc.c >> +++ b/opcodes/loongarch-opc.c >> @@ -399,6 +399,7 @@ static struct loongarch_opcode loongarch_fix_opcodes[] = >>    { 0x000c0000, 0xfffc0000, "bytepick.d", "r0:5,r5:5,r10:5,u15:3", 0, 0, 0, 0 }, >>    { 0x00100000, 0xffff8000, "add.w", "r0:5,r5:5,r10:5", 0, 0, 0, 0 }, >>    { 0x00108000, 0xffff8000, "add.d", "r0:5,r5:5,r10:5", 0, 0, 0, 0 }, >> +  { 0x00108000, 0xffff8000, "add.d", "r0:5,r5:5,r10:5,s10:5", 0, 0, 0, 0 }, > This is just wrong, as I've pointed out in v1. > > You can always write > > .reloc 0, R_LARCH_LE_ADD_R, a > add.d $t0, $t0, $tp We need to set the offset of .reloc, but gcc may not get a accurate offset relative to the section. https://sourceware.org/binutils/docs/as/Reloc.html > > If you think it looks nasty you can add a new pseudo instruction for > this. Anyway there is not an "add.d" instruction accepting an > immediate. Try not to puzzle people. > > (The trailing ",0" in the sc instructions is already much annoying to > me. Do not make things even worse.) > > And please make the technical discussion public, instead of sending a > private reply (unless you have a good reason). > >>    { 0x00110000, 0xffff8000, "sub.w", "r0:5,r5:5,r10:5", 0, 0, 0, 0 }, >>    { 0x00118000, 0xffff8000, "sub.d", "r0:5,r5:5,r10:5", 0, 0, 0, 0 }, >>    { 0x00120000, 0xffff8000, "slt", "r0:5,r5:5,r10:5", 0, 0, 0, 0 },