Date: Fri, 13 Mar 2015 19:23:45 +0200 From: Konstantin Belousov <kostikbel@gmail.com> To: Nathan Whitehorn <nwhitehorn@freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r279937 - in head/sys/powerpc: include powerpc Message-ID: <20150313172345.GY2379@kib.kiev.ua> In-Reply-To: <550318FD.1070906@freebsd.org> References: <201503122115.t2CLFdmi026986@svn.freebsd.org> <20150312212234.GS2379@kib.kiev.ua> <55020547.7050102@freebsd.org> <20150312213530.GT2379@kib.kiev.ua> <5502094D.5090001@freebsd.org> <20150313084702.GV2379@kib.kiev.ua> <550318FD.1070906@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Mar 13, 2015 at 10:06:05AM -0700, Nathan Whitehorn wrote: > One more thing I'd appreciate advice on: we have a much worse ABI issue > with setjmp(). On 32-bit systems, _JBLEN is too small to hold all the > nonvolatile vector registers. Do you have any ideas how to handle that? There is no solution there. On x86, both 32 and 64 bit, setjmp only saves fpu control word (and mxcsr on amd64, where SSE2 is guaranteed to be presented). So only limited bits of the whole arch state is saved and restored. I suggest to just leave setjmp as it is. In fact, FreeBSD cannot work on 486SX due to this. Shell uses setjmp, and despite kernel carefully handling FPU-less CPU, shell fails from the beginning. Please note that ucontext_t API was designed by System V group to handle this deficiency in the setjmp/longjmp API, to cover the whole machine context and provide almost-portable interface for non-local control flow :/. As usual, SysV produced something which failed. In particular, the size and layout of ucontext_t is user-visible and cannot be changed.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150313172345.GY2379>