svn commit: r232275 - in head/sys: amd64/include i386/include pc98/include x86/include

Joerg Sonnenberger joerg at britannica.bec.de
Fri Mar 2 15:57:10 UTC 2012


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


More information about the svn-src-all mailing list