This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Restore r31 setting in powerpc32 swapcontext
- From: Florian Weimer <fweimer at redhat dot com>
- To: Joseph Myers <joseph at codesourcery dot com>
- Cc: <libc-alpha at sourceware dot org>, <adhemerval dot zanella at linaro dot org>, <tuliom at linux dot ibm dot com>, Carlos O'Donell <carlos at redhat dot com>
- Date: Tue, 30 Jul 2019 09:17:22 +0200
- Subject: Re: Restore r31 setting in powerpc32 swapcontext
- References: <alpine.DEB.2.21.1907300047220.1468@digraph.polyomino.org.uk>
* Joseph Myers:
> diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S
> index efebb10bba..6fa1ab7d6e 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
Patch looks good to me. Carlos will have to ack it as the RM, though.
Thanks,
Florian