From patchwork Wed Oct 12 03:16:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: chenglulu X-Patchwork-Id: 1942 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp2410574wrs; Tue, 11 Oct 2022 20:17:48 -0700 (PDT) X-Google-Smtp-Source: AMsMyM75XGjxz960INEXifTHzgyDaKotdnIOKcQNI2kzchFOcXglQDvn0f0Z5BB9DAVXMobrgVUO X-Received: by 2002:a17:907:271a:b0:78d:d22c:c7d9 with SMTP id w26-20020a170907271a00b0078dd22cc7d9mr5674039ejk.581.1665544668095; Tue, 11 Oct 2022 20:17:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665544668; cv=none; d=google.com; s=arc-20160816; b=ULbhKejP0yFNYPBK5ljEaAvfIiol7UKfVIVY1Nl1yA+D6C7E6PQhKMWVg5NeE6yV32 DjxVIYdDfHduato1Z7IQG1ogZfbaVJuALYI+4qngtTltTcTlpJZnFwwozFvPx7Jytrnj lH5d9cz2S670zRS5ulJzdx2qbDZYBNS+FXt48Lc4mNNw/TPvacVaQSuJYFF8qsNRqLJm PbL3c0+irad3Vw+Mv/DhTpKzZmlvoQuhVUbstXPEYzFCQHq0gZEa5XqIGBqjcLJ8BeKF 1CG0ZcJDVtisnI3wSNpnUH3GMoqavzHgkmQil9TTt/iQBQ9CzKLhi/bazUHdONGN2ygt +NPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:to:from:dmarc-filter :delivered-to; bh=DawBLmahR/+BsuGqfpuYUPCcMeo5Lm9K+F8UF7R8IjU=; b=MTKd4Tm8uFtbaYmZ4EYUTX9PVEFA1sb0wdA9lLLmiGjUUbe1nLdVucshIqyXz8/w5C wgC/X2axmOcC+Im5kYe0vVNQCS7EOdUIktU2mtmVww3dkrQyHrN9R+vWj9DnpncHpc0Q pLfxi6WCGjIV5DCrFzIoDJofQBLuJX6rSijtCDkrb0KosYqEsJGauWsTweVSzAkkeGTg Eq2xKExPsnu6WFe9kF2DPdfcFG4Ltqxf/neqJ810/fGuDcwyqUJBZtz4Dxx0WXYKlIlu aRJ7QE8uHe414R3XfAPwHVUtTogJJY8d0UegDehYs0lvAkubTMDEURMrHfWUOEypTCeQ sinQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id w2-20020a056402268200b004520b01a355si17875359edd.52.2022.10.11.20.17.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Oct 2022 20:17:48 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C9DBE385141D for ; Wed, 12 Oct 2022 03:17:44 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 15B6F3856DC3 for ; Wed, 12 Oct 2022 03:17:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 15B6F3856DC3 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=loongson.cn Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=loongson.cn Received: from mail.loongson.cn ([114.242.206.163]:51104 helo=loongson.cn) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oiSEt-0001AP-CR for gcc-patches@gcc.gnu.org; Tue, 11 Oct 2022 23:17:01 -0400 Received: from 5.5.5 (unknown [10.2.5.5]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Dxvmt_MUZjG4crAA--.14204S2; Wed, 12 Oct 2022 11:16:19 +0800 (CST) From: Lulu Cheng To: gcc-patches@gcc.gnu.org, mliska@suse.cz, dmalcolm@redhat.com Subject: [PATCH] LoongArch: Fixed a bug in the loongarch architecture of libitm package. Date: Wed, 12 Oct 2022 11:16:06 +0800 Message-Id: <20221012031605.2071672-1-chenglulu@loongson.cn> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-CM-TRANSID: AQAAf8Dxvmt_MUZjG4crAA--.14204S2 X-Coremail-Antispam: 1UD129KBjvdXoWrZFyUCrWruFy3AFWDtw1DKFg_yoWDWFX_JF 47GFZ7Kr1kZ34Uta1DWr40kw10van2vF45CryvqrsrWF15trn8ArWUZrn8J390kr4UXrnI y39Y9r1fAw1FgjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUb2AFF20E14v26r4j6ryUM7CY07I20VC2zVCF04k26cxKx2IYs7xG 6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48ve4kI8w A2z4x0Y4vE2Ix0cI8IcVAFwI0_Xr0_Ar1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI0_Cr0_ Gr1UM28EF7xvwVC2z280aVAFwI0_Gr1j6F4UJwA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_Cr 1j6rxdM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj 6xIIjxv20xvE14v26r1j6r18McIj6I8E87Iv67AKxVWUJVW8JwAm72CE4IkC6x0Yz7v_Jr 0_Gr1lF7xvr2IYc2Ij64vIr41lF7I21c0EjII2zVCS5cI20VAGYxC7MxkIecxEwVCm-wCF 04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E14v26r1j6r 18MI8I3I0E7480Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_Jw0_GFylIxkGc2Ij64vI r41lIxAIcVC0I7IYx2IY67AKxVWUJVWUCwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Jr0_Gr 1lIxAIcVCF04k26cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r1j6r4UMIIF0xvE x4A2jsIEc7CjxVAFwI0_Gr0_Gr1UYxBIdaVFxhVjvjDU0xZFpf9x0JUdHUDUUUUU= X-CM-SenderInfo: xfkh0wpoxo3qxorr0wxvrqhubq/ Received-SPF: pass client-ip=114.242.206.163; envelope-from=chenglulu@loongson.cn; helo=loongson.cn X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Status: No, score=-16.4 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_FAIL, SPF_HELO_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: , Cc: Lulu Cheng , xuchenghua@loongson.cn, i@xen0n.name Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1746450165783694962?= X-GMAIL-MSGID: =?utf-8?q?1746450165783694962?= Add a soft floating point condition to the register recovery part of the code. libitm/ChangeLog: * config/loongarch/sjlj.S: Add a soft floating point condition to the register recovery part of the code. --- libitm/config/loongarch/sjlj.S | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libitm/config/loongarch/sjlj.S b/libitm/config/loongarch/sjlj.S index a5f9fadde34..f896e400e6a 100644 --- a/libitm/config/loongarch/sjlj.S +++ b/libitm/config/loongarch/sjlj.S @@ -104,6 +104,8 @@ GTM_longjmp: GPR_L $s7, $r5, 10*SZ_GPR GPR_L $s8, $r5, 11*SZ_GPR +#if !defined(__loongarch_soft_float) + /* Callee-saved scratch FPRs (f24-f31) */ FPR_L $f24, $r5, 12*SZ_GPR + 0*SZ_FPR FPR_L $f25, $r5, 12*SZ_GPR + 1*SZ_FPR FPR_L $f26, $r5, 12*SZ_GPR + 2*SZ_FPR @@ -112,6 +114,7 @@ GTM_longjmp: FPR_L $f29, $r5, 12*SZ_GPR + 5*SZ_FPR FPR_L $f30, $r5, 12*SZ_GPR + 6*SZ_FPR FPR_L $f31, $r5, 12*SZ_GPR + 7*SZ_FPR +#endif GPR_L $r7, $r5, 2*SZ_GPR GPR_L $fp, $r5, 0*SZ_GPR