From owner-svn-src-all@FreeBSD.ORG Fri Mar 13 17:45:53 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BA825C34; Fri, 13 Mar 2015 17:45:53 +0000 (UTC) Received: from c.mail.sonic.net (c.mail.sonic.net [64.142.111.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9BF60B58; Fri, 13 Mar 2015 17:45:53 +0000 (UTC) Received: from aurora.physics.berkeley.edu (aurora.Physics.Berkeley.EDU [128.32.117.67]) (authenticated bits=0) by c.mail.sonic.net (8.15.1/8.15.1) with ESMTPSA id t2DHjkXu007803 (version=TLSv1.2 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 13 Mar 2015 10:45:46 -0700 Message-ID: <5503224A.3010100@freebsd.org> Date: Fri, 13 Mar 2015 10:45:46 -0700 From: Nathan Whitehorn User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Konstantin Belousov Subject: Re: svn commit: r279937 - in head/sys/powerpc: include powerpc 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> <20150313172345.GY2379@kib.kiev.ua> In-Reply-To: <20150313172345.GY2379@kib.kiev.ua> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Sonic-CAuth: UmFuZG9tSVbxseDHzgDV0Ig8R6UB3KkYvM9x33+X3w2/NIGKGPMEi5cXgS/COBK85TF1V8L3wdeL41GJQPNXp4lKHcaSlW6ay47DnAAmMMg= X-Sonic-ID: C;foMzx6jJ5BGUM+8Jj30JFw== M;VLxlx6jJ5BGUM+8Jj30JFw== X-Spam-Flag: No X-Sonic-Spam-Details: 0.0/5.0 by cerberusd Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Mar 2015 17:45:53 -0000 On 03/13/15 10:23, Konstantin Belousov wrote: > 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. > We'll need to hack the compiler in this case, since it assumes setjmp() saves and restores the vector registers. I'm really not sure which option is worse. -Nathan