]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/commit
MFC r245272:
authordim <dim@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sun, 13 Jan 2013 20:35:08 +0000 (20:35 +0000)
committerdim <dim@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sun, 13 Jan 2013 20:35:08 +0000 (20:35 +0000)
commit614a252bd4c4ee2798a73fd6b838f8fc89ae445a
treef7bcf9ba049b68d76b07c0172754d1c26540b2af
parenta353ffba1f7c1cf98640ec533d6fccc5dae1d433
MFC r245272:

Add an ugly hack to libgcc's unwind code, to make it behave properly at
runtime on amd64, when it is compiled by clang.  Some versions of clang
don't save and restore all callee registers, if a __builtin_eh_return()
intrinsic is used in a function.  This is particularly bad on amd64.

Until the problem gets fixed by upstream, use an asm statement to force
clang to assume the registers in question are clobbered, when invoking
__builtin_eh_return(), so it will emit code to save and restore them.

This should fix the crashes reported on -current with some C++ programs,
particularly those that throw exceptions over multiple function
boundaries.

Reported by: stefanf

git-svn-id: svn://svn.freebsd.org/base/stable/9@245384 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
contrib/gcc/unwind-dw2.c