public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Joseph Myers <jsm28@sourceware.org>
To: glibc-cvs@sourceware.org
Subject: [glibc] Restore r31 setting in powerpc32 swapcontext.
Date: Tue, 30 Jul 2019 14:05:00 -0000	[thread overview]
Message-ID: <20190730140537.71759.qmail@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=c86b8e7579ac2c4a1f1f70a56715580ed77b4a79

commit c86b8e7579ac2c4a1f1f70a56715580ed77b4a79
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Tue Jul 30 14:05:11 2019 +0000

    Restore r31 setting in powerpc32 swapcontext.
    
    Commit ffe8a9a8318e1db225b22da8bc067408494bac5c, "powerpc: Remove
    rt_sigreturn usage on context function", removed from powerpc32
    swapcontext a setting of r31 that is relied upon in subsequent code.
    I'm not sure why this didn't produce test failures in Adhemerval's
    32-bit testing; in my (soft-float) testing in preparation for 2.30
    release, I see several context-related failures
    
    FAIL: stdlib/tst-makecontext2
    FAIL: stdlib/tst-makecontext3
    FAIL: stdlib/tst-setcontext
    FAIL: stdlib/tst-setcontext2
    FAIL: stdlib/tst-setcontext4
    FAIL: stdlib/tst-setcontext7
    FAIL: stdlib/tst-setcontext9
    FAIL: stdlib/tst-swapcontext1
    
    that did not appear in 2.29 testing.  This patch restores the removed
    register setting in question, and thus fixes those failures.
    
    Tested for powerpc (soft-float).
    
    	* sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S
    	(__CONTEXT_FUNC_NAME): Restore setting of r31.

Diff:
---
 ChangeLog                                                      | 5 +++++
 sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S | 3 +++
 2 files changed, 8 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index a538454..6b46bfa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2019-07-30  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S
+	(__CONTEXT_FUNC_NAME): Restore setting of r31.
+
 2019-07-30  Florian Weimer  <fweimer@redhat.com>
 
 	* nptl/tst-pthread-getattr.c (allocate_and_test): Change return
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S
index efebb10..6fa1ab7 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S
@@ -276,6 +276,9 @@ ENTRY(__CONTEXT_FUNC_NAME)
 	cmpwi	r3,0
 	bne	3f	/* L(error_exit) */
 
+	lwz	r4,_FRAME_PARM_SAVE2(r1)
+	lwz	r31,_UC_REGS_PTR(r4)
+
 #ifdef __CONTEXT_ENABLE_FPRS
 # ifdef __CONTEXT_ENABLE_VRS


                 reply	other threads:[~2019-07-30 14:05 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=20190730140537.71759.qmail@sourceware.org \
    --to=jsm28@sourceware.org \
    --cc=glibc-cvs@sourceware.org \
    /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).