summaryrefslogtreecommitdiffstats
path: root/usr.sbin/mergemaster
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2013-11-21 23:09:07 +0000
committerdim <dim@FreeBSD.org>2013-11-21 23:09:07 +0000
commit15069c877cd7d53a245e0b37701d29dbaea64996 (patch)
treecce6e563cf584684a353855162fb2c5ac41a68e2 /usr.sbin/mergemaster
parent305492af4723b9c7a9118c02471b58651d2ec999 (diff)
downloadFreeBSD-src-15069c877cd7d53a245e0b37701d29dbaea64996.zip
FreeBSD-src-15069c877cd7d53a245e0b37701d29dbaea64996.tar.gz
Pull in r195318 from upstream llvm trunk:
The basic problem is that some mainstream programs cannot deal with the way clang optimizes tail calls, as in this example: int foo(void); int bar(void) { return foo(); } where the call is transformed to: calll .L0$pb .L0$pb: popl %eax .Ltmp0: addl $_GLOBAL_OFFSET_TABLE_+(.Ltmp0-.L0$pb), %eax movl foo@GOT(%eax), %eax popl %ebp jmpl *%eax # TAILCALL However, the GOT references must all be resolved at dlopen() time, and so this approach cannot be used with lazy dynamic linking (e.g. using RTLD_LAZY), which usually populates the PLT with stubs that perform the actual resolving. This patch changes X86TargetLowering::LowerCall() to skip tail call optimization, if the called function is a global or external symbol. This fixes problems with loading X.org driver modules, which could occur when X.org was compiled on i386 with tailcall optimization on, for which ports r312583 was committed as a workaround. After this change, the workaround can be removed. MFC after: 3 days
Diffstat (limited to 'usr.sbin/mergemaster')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud