From owner-svn-src-all@FreeBSD.ORG Fri Mar 2 15:57:09 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E2E761065780 for ; Fri, 2 Mar 2012 15:57:09 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from mo-p00-ob6.rzone.de (mo-p00-ob6.rzone.de [IPv6:2a01:238:20a:202:53f0::1]) by mx1.freebsd.org (Postfix) with ESMTP id 725A08FC1F for ; Fri, 2 Mar 2012 15:57:09 +0000 (UTC) X-RZG-AUTH: :JiIXek6mfvEEUpFQdo7Fj1/zg48CFjWjQv0cW+St/nW/afgnrylsiW+yaTV9ow4J X-RZG-CLASS-ID: mo00 Received: from britannica.bec.de (ip-109-45-146-157.web.vodafone.de [109.45.146.157]) by smtp.strato.de (fruni mo43) (RZmta 27.7 DYNA|AUTH) with (DHE-RSA-AES128-SHA encrypted) ESMTPA id Q02c96o22EHJV9 for ; Fri, 2 Mar 2012 16:55:55 +0100 (MET) Received: by britannica.bec.de (sSMTP sendmail emulation); Fri, 02 Mar 2012 16:55:51 +0100 Date: Fri, 2 Mar 2012 16:55:51 +0100 From: Joerg Sonnenberger To: svn-src-all@freebsd.org Message-ID: <20120302155551.GB31508@britannica.bec.de> References: <201202282217.q1SMHrIk094780@svn.freebsd.org> <20120229151223.K2273@besplex.bde.org> <201203012347.32984.tijl@freebsd.org> <20120302132403.P929@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120302132403.P929@besplex.bde.org> User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: svn commit: r232275 - in head/sys: amd64/include i386/include pc98/include x86/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 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, 02 Mar 2012 15:57:10 -0000 On Fri, Mar 02, 2012 at 03:11:21PM +1100, Bruce Evans wrote: > >If we could add the returns_twice attribute to setjmp() then the > >compiler makes sure all registers are dead before calling it and > >jmp_buf wouldn't have to be that big. > > I think compilers already do stuff like that automatically. They have > to for setjmp() to work. Since there was no way to declare such > attributes 20 years ago, compilers had to know that setjmp() was > special and make it work when it only has a Standard C declaration > (and some magic in its inmplementation). It is an existing bug in FreeBSD that the *kernel* doesn't have such attribution. Since it is using -ffreestanding, interference is incorrect. LLVM recently moved the attribution logic from the LLVM librarie into the C frontend where it belongs, but this does have the negative side effect that it no longer magically fixes up issues for -ffreestanding. Joerg