Re: [PATCH v3] libgo: Don't use pt_regs member in mcontext_t

2022-03-09 Thread Rich Felker
On Wed, Mar 09, 2022 at 08:26:11AM +0100, Sören Tempel wrote: > Ian Lance Taylor wrote: > > Have you tested this in 32-bit mode? It does not look correct based > > on the glibc definitions. Looking at glibc it seems that it ought to > > be > > As stated in the commit message, I have only tested

Re: [PATCH v3] libgo: Don't use pt_regs member in mcontext_t

2022-03-08 Thread Sören Tempel via Gcc-patches
Ian Lance Taylor wrote: > Have you tested this in 32-bit mode? It does not look correct based > on the glibc definitions. Looking at glibc it seems that it ought to > be As stated in the commit message, I have only tested this on Alpine Linux ppc64le (which uses musl libc). Unfortunately, I don

Re: [PATCH v3] libgo: Don't use pt_regs member in mcontext_t

2022-03-08 Thread Rich Felker
On Mon, Mar 07, 2022 at 02:59:02PM -0800, Ian Lance Taylor wrote: > On Sun, Mar 6, 2022 at 11:11 PM wrote: > > > > +#ifdef __PPC64__ > > + ret.sigpc = ((ucontext_t*)(context))->uc_mcontext.gp_regs[32]; > > +#else > > + ret.sigpc = ((ucontext_t*)(context))->uc_mcontext.gregs[32]; > > +#

Re: [PATCH v3] libgo: Don't use pt_regs member in mcontext_t

2022-03-07 Thread Ian Lance Taylor via Gcc-patches
On Sun, Mar 6, 2022 at 11:11 PM wrote: > > +#ifdef __PPC64__ > + ret.sigpc = ((ucontext_t*)(context))->uc_mcontext.gp_regs[32]; > +#else > + ret.sigpc = ((ucontext_t*)(context))->uc_mcontext.gregs[32]; > +#endif Have you tested this in 32-bit mode? It does not look correct based on t

[PATCH v3] libgo: Don't use pt_regs member in mcontext_t

2022-03-06 Thread soeren--- via Gcc-patches
From: Sören Tempel The .regs member is primarily intended to be used in conjunction with ptrace. Since this code is not using ptrace, using .regs is a bad idea. Furthermore, the code currently fails to compile on musl since the pt_regs type (used by .regs) is in an incomplete type which has to be