Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Mar 2012 16:55:51 +0100
From:      Joerg Sonnenberger <joerg@britannica.bec.de>
To:        svn-src-all@freebsd.org
Subject:   Re: svn commit: r232275 - in head/sys: amd64/include i386/include pc98/include x86/include
Message-ID:  <20120302155551.GB31508@britannica.bec.de>
In-Reply-To: <20120302132403.P929@besplex.bde.org>
References:  <201202282217.q1SMHrIk094780@svn.freebsd.org> <20120229151223.K2273@besplex.bde.org> <201203012347.32984.tijl@freebsd.org> <20120302132403.P929@besplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120302155551.GB31508>