This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Support setjmp in x86-64 psABI with AVX-512
- From: OndÅej BÃlka <neleai at seznam dot cz>
- To: Rich Felker <dalias at aerifal dot cx>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Sun, 28 Jul 2013 08:24:50 +0200
- Subject: Re: Support setjmp in x86-64 psABI with AVX-512
- References: <ddab98c2-bb3b-4d02-b403-e7d5690cfe00 at email dot android dot com> <CAMe9rOpxErCVtE-PDZ3Yb9mL+4E+XQ-are9Df4YBbEioj+MmZA at mail dot gmail dot com> <b9c5d467-834a-4b57-b48c-ac4bb450c9e5 at email dot android dot com> <20130725030655 dot GL14138 at laptop dot redhat dot com> <20130725065538 dot GA18427 at domone dot kolej dot mff dot cuni dot cz> <20130725165053 dot GJ4284 at brightrain dot aerifal dot cx> <20130727154405 dot GA25725 at domone dot kolej dot mff dot cuni dot cz> <20130727161257 dot GY4284 at brightrain dot aerifal dot cx> <20130727182707 dot GA5625 at domone dot kolej dot mff dot cuni dot cz> <20130727200922 dot GA4284 at brightrain dot aerifal dot cx>
On Sat, Jul 27, 2013 at 04:09:22PM -0400, Rich Felker wrote:
> On Sat, Jul 27, 2013 at 08:27:07PM +0200, OndÅej BÃlka wrote:
> > On Sat, Jul 27, 2013 at 12:12:57PM -0400, Rich Felker wrote:
> > > On Sat, Jul 27, 2013 at 05:44:05PM +0200, OndÅej BÃlka wrote:
> > > This required unbounded storage which does not exist. From a practical
> > > standpoint you would either have to reserve a huge amount of storage
> > > (e.g. double the allocated thread stack size and use half of it as
> > > reserved space for jmp_buf) or make the calling program crash when the
> >
> > Standard trick mmap and double.
>
> ??
When you cannot allocate memory by malloc and performance is not concern
use mmap.
> > Next idea would be hack gcc to mark all variables volatile in functions
> > with setjmp.
>
> That does not help. setjmp may not be backing up the caller's
> variables, but rather register values belonging to
>
> (the caller of)^N the caller
So additional saving/restoring that registers at entry/exit would be
needed.
--