public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Lulu Cheng <chenglulu@loongson.cn>
To: gcc-patches@gcc.gnu.org, mliska@suse.cz, dmalcolm@redhat.com
Cc: xry111@xry111.site, xuchenghua@loongson.cn, i@xen0n.name,
	yangyujie@loongson.cn, Lulu Cheng <chenglulu@loongson.cn>
Subject: [PATCH] LoongArch: Fixed a bug in the loongarch architecture of libitm package.
Date: Wed, 12 Oct 2022 11:16:06 +0800	[thread overview]
Message-ID: <20221012031605.2071672-1-chenglulu@loongson.cn> (raw)

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
-- 
2.31.1


                 reply	other threads:[~2022-10-12  3:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221012031605.2071672-1-chenglulu@loongson.cn \
    --to=chenglulu@loongson.cn \
    --cc=dmalcolm@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=i@xen0n.name \
    --cc=mliska@suse.cz \
    --cc=xry111@xry111.site \
    --cc=xuchenghua@loongson.cn \
    --cc=yangyujie@loongson.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).