Skip to content

Commit

Permalink
Restore r31 setting in powerpc32 swapcontext.
Browse files Browse the repository at this point in the history
Commit ffe8a9a, "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.
  • Loading branch information
jsm28 committed Jul 30, 2019
1 parent 8a814e2 commit c86b8e7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2019-07-30 Joseph Myers <[email protected]>

* sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S
(__CONTEXT_FUNC_NAME): Restore setting of r31.

2019-07-30 Florian Weimer <[email protected]>

* nptl/tst-pthread-getattr.c (allocate_and_test): Change return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit c86b8e7

Please sign in to comment.