freebsd-dev/contrib
Dimitry Andric 630590abbc Pull in r221703 from upstream llvm trunk (by Bill Schmidt):
[PowerPC] Replace foul hackery with real calls to __tls_get_addr

  My original support for the general dynamic and local dynamic TLS
  models contained some fairly obtuse hacks to generate calls to
  __tls_get_addr when lowering a TargetGlobalAddress.  Rather than
  generating real calls, special GET_TLS_ADDR nodes were used to wrap
  the calls and only reveal them at assembly time.  I attempted to
  provide correct parameter and return values by chaining CopyToReg and
  CopyFromReg nodes onto the GET_TLS_ADDR nodes, but this was also not
  fully correct.  Problems were seen with two back-to-back stores to TLS
  variables, where the call sequences ended up overlapping with unhappy
  results.  Additionally, since these weren't real calls, the proper
  register side effects of a call were not recorded, so clobbered values
  were kept live across the calls.

  The proper thing to do is to lower these into calls in the first
  place.  This is relatively straightforward; see the changes to
  PPCTargetLowering::LowerGlobalTLSAddress() in PPCISelLowering.cpp.
  The changes here are standard call lowering, except that we need to
  track the fact that these calls will require a relocation.  This is
  done by adding a machine operand flag of MO_TLSLD or MO_TLSGD to the
  TargetGlobalAddress operand that appears earlier in the sequence.

  The calls to LowerCallTo() eventually find their way to
  LowerCall_64SVR4() or LowerCall_32SVR4(), which call FinishCall(),
  which calls PrepareCall().  In PrepareCall(), we detect the calls to
  __tls_get_addr and immediately snag the TargetGlobalTLSAddress with
  the annotated relocation information.  This becomes an extra operand
  on the call following the callee, which is expected for nodes of type
  tlscall.  We change the call opcode to CALL_TLS for this case.  Back
  in FinishCall(), we change it again to CALL_NOP_TLS for 64-bit only,
  since we require a TOC-restore nop following the call for the 64-bit
  ABIs.

  During selection, patterns in PPCInstrInfo.td and PPCInstr64Bit.td
  convert the CALL_TLS nodes into BL_TLS nodes, and convert the
  CALL_NOP_TLS nodes into BL8_NOP_TLS nodes.  This replaces the code
  removed from PPCAsmPrinter.cpp, as the BL_TLS or BL8_NOP_TLS
  nodes can now be emitted normally using their patterns and the
  associated printTLSCall print method.

  Finally, as a result of these changes, all references to get-tls-addr
  in its various guises are no longer used, so they have been removed.

  There are existing TLS tests to verify the changes haven't messed
  anything up).  I've added one new test that verifies that the problem
  with the original code has been fixed.

This fixes a fatal "Bad machine code" error when compiling parts of
libgomp for 32-bit PowerPC.
2014-12-27 14:50:53 +00:00
..
amd Remove the names of the build host and user and the build date. This 2014-04-12 18:01:25 +00:00
apr Merge apr-1.4.8 -> apr-1.5.1 and update. 2014-05-27 07:15:14 +00:00
apr-util Merge apr-util 1.5.3 -> 1.5.4. A minor bug fix update. 2014-09-24 18:38:51 +00:00
atf MFV: Import atf-0.21. 2014-11-01 11:17:54 +00:00
binutils Make gas parse '__tls_get_addr(foo@tlsgd)'. 2014-12-18 03:12:46 +00:00
bmake Update to bmake-20140620 2014-07-08 22:27:50 +00:00
bsnmp Fix a bug in decoding string indexes in snmp_target(3), thus causing 2014-10-10 00:26:28 +00:00
byacc Regen test cases for yacc(1) after r274460. YYINT is int now. 2014-11-13 17:54:17 +00:00
bzip2 Remove a few files that are not needed for FreeBSD. 2012-09-11 21:16:22 +00:00
com_err - On FreeBSD, com_err.h is installed into /usr/include, not /usr/include/krb5. 2012-05-21 04:29:11 +00:00
compiler-rt Mark __fixdfdi/__aeabi_d2lz with COMPILER_RT_ABI so it uses the correct 2014-04-06 09:14:11 +00:00
dialog Update dialog to 1.2-20130923. 2013-09-24 14:52:43 +00:00
diff Fix a cut and paste error. 2014-01-05 23:28:03 +00:00
dma Fix build on i386 2014-02-21 16:14:40 +00:00
dtc Merge from vendor branch importing dtc git rev 6a15eb2350426d285130e4c9d84c0bdb6575547a 2014-01-27 19:37:35 +00:00
ee Clean some 'svn:executable' properties in the tree. 2013-01-26 22:08:21 +00:00
elftoolchain Do not strip all when stripping an explicit symbol 2014-12-17 14:46:21 +00:00
expat Update base system libexpat to 2.1.0. 2013-02-26 00:58:44 +00:00
file MFV r275696: file 5.21. 2014-12-11 06:52:10 +00:00
flex Enable GNU m4 compatibility mode. 2013-05-21 19:23:49 +00:00
gcc Pull in r174303 from upstream gcc trunk (by Jason Merrill): 2014-12-04 17:26:04 +00:00
gcclibs Avoid "cc1: warning: is shorter than expected" when using GNU cpp in 2014-03-26 19:57:50 +00:00
gdb recognize the FreeBSD ARCH tag that is put on binaries like on armeb 2014-02-12 02:03:37 +00:00
gdtoa Clean up hardcoded ar(1) flags in the tree to use the global ARFLAGS in 2012-12-06 01:31:25 +00:00
gperf gperf: reverse size_type patch from r258115. 2014-01-07 01:40:49 +00:00
groff Pull up vendor changes up to 2014-01-29 2014-01-31 12:26:30 +00:00
hyperv/tools Test errno against EEXIST as well. 2014-11-11 16:49:33 +00:00
ipfilter #552 destination port not zero after parsing nat rule 2014-09-22 16:35:48 +00:00
jemalloc Update jemalloc to version 3.6.0. 2014-03-31 17:04:04 +00:00
ldns Don't cast away the const qualifier. Fixes gcc build. 2014-05-16 15:32:16 +00:00
ldns-host Import Magerya Vitaly's ldns-host, and build it instead of the BIND version 2013-09-08 19:40:32 +00:00
less Revert files with no local changes to their vendor state to ease future 2013-05-31 00:31:45 +00:00
libarchive Fix the following -Werror warning from clang 3.5.0, while building 2014-11-22 12:10:09 +00:00
libbegemot
libc-pwcache Replace our version of the pwcache(3) API with NetBSD's implementation. 2012-10-19 12:44:22 +00:00
libc-vis Merge from NetBSD: 2014-09-08 19:26:21 +00:00
libc++ Pull in r209785 from upstream libc++ trunk (by Marshall Clow): 2014-12-01 15:02:49 +00:00
libcxxrt Fix build by marking the new functions as weak 2014-10-21 12:52:01 +00:00
libexecinfo libexecinfo: Include terminating null in byte count 2013-11-21 14:12:36 +00:00
libgnuregex Fix build for FreeBSD. We do not have alloca.h. 2013-06-05 21:28:33 +00:00
libpcap Add netmap support to libpcap. Tcpdump and other native pcap application can now 2014-10-06 15:48:28 +00:00
libreadline Quiesce warning about unused argument in call to rl_message() by wrapping 2013-11-04 16:52:27 +00:00
libstdc++ Fix EABI unwind function declarations to match the function definitions. 2014-07-22 20:32:24 +00:00
libucl Update libucl to latest version 2014-11-29 00:45:09 +00:00
libxo Upgrade libxo to 0.1.6. 2014-11-18 18:03:40 +00:00
llvm Pull in r221703 from upstream llvm trunk (by Bill Schmidt): 2014-12-27 14:50:53 +00:00
mdocml Add libcuse and libxo. 2014-12-03 18:14:21 +00:00
mknod Add NetBSD's mtree to the tree and install it as nmtree as the first step 2012-12-21 21:00:00 +00:00
mtree Import in latest mtree from NetBSD to fix a bug in parsing group files 2014-10-28 17:52:26 +00:00
ncurses Workaround a GCC warning to unbreak ARM build. 2014-03-03 08:01:36 +00:00
netbsd-tests Only pass 6 arguments to the 'run' function on amd64. amd64's 2014-11-25 12:44:18 +00:00
netcat MFV r273617: netcat from OpenBSD 5.6. 2014-10-25 00:37:35 +00:00
ngatm
ntp Don't reply monlist request when it's not enabled. 2014-05-06 21:34:01 +00:00
nvi Vendor import nvi-2.1.2-c80f493b038 a multikey mapping fix 2013-12-08 00:08:03 +00:00
ofed Fix building of some infiniband utilities by updating some header file 2014-11-30 13:27:58 +00:00
one-true-awk awk: Use random(3) instead of rand(3) 2014-09-19 18:24:02 +00:00
openbsm Fix descriptors leak. 2014-09-14 09:26:33 +00:00
openpam Staticize the test plans. 2014-11-05 20:13:18 +00:00
openresolv According to resolvconf.conf(5) manpage and sources, there is no 2012-08-21 06:14:08 +00:00
opie Last '/' for program name, not first one 2014-08-11 14:46:09 +00:00
pam_modules/pam_passwdqc Make the PAM password strength checking module WARNS=2 safe. 2013-08-27 15:50:26 +00:00
pf Update NetBSD Foundation copyrights to 2-clause BSD 2014-03-18 01:40:25 +00:00
pjdfstest Increase the memory disk size in the following testcases to avoid mount 2014-09-24 22:51:16 +00:00
pnpinfo
sendmail Update for sendmail 8.14.9 import 2014-05-22 04:41:11 +00:00
serf Update serf-1.3.6 -> 1.3.7 2014-08-11 19:41:01 +00:00
smbfs Make it possible to use empty user name ("-U ''") for mount_smbfs(8). 2014-09-08 11:01:57 +00:00
sqlite3 Update sqlite3 to 3.8.7.2 2014-11-22 19:18:08 +00:00
subversion Sync the svn template with the one from ports 2014-12-02 00:23:26 +00:00
tcp_wrappers tcpd.h: add prototype for hosts_ctl 2014-10-11 18:54:37 +00:00
tcpdump Fix comment and sort rights by name 2014-10-06 15:03:08 +00:00
tcsh Update to tcsh 6.18.01. 2012-02-22 03:36:15 +00:00
telnet Add baud rate support to telnet(1) 2014-11-11 04:06:05 +00:00
texinfo
tnftp [SA-14:25] Fix kernel stack disclosure in setlogin(2) / getlogin(2). 2014-11-04 23:29:29 +00:00
top - Add J command to help. 2014-05-02 23:47:14 +00:00
traceroute mdocify and update the traceroute(8) manual page. 2012-06-27 07:41:21 +00:00
tzcode Revert WiP to contrib/tzcode accidentally committed with r274364 2014-11-11 04:07:41 +00:00
tzdata MFV of 274557,tzdata{2014j} 2014-11-16 01:00:39 +00:00
unbound MFV r275844: 2014-12-17 06:55:44 +00:00
unvis Replace our (un)vis(1) commands with implementations from NetBSD to 2013-03-15 00:05:50 +00:00
vis Update NetBSD Foundation copyrights to 2-clause BSD 2014-03-18 01:40:25 +00:00
wpa convert to using pidfile... This prevents multiple wpa_supplicants 2014-06-22 10:00:33 +00:00
xz MFV r273494: xz 5.0.7. 2014-10-23 00:40:56 +00:00