From owner-svn-src-vendor@freebsd.org Tue Nov 22 06:28:28 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 302F7C4F70D; Tue, 22 Nov 2016 06:28:28 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F04FA1D4B; Tue, 22 Nov 2016 06:28:27 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAM6SRVH080450; Tue, 22 Nov 2016 06:28:27 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAM6SRtF080447; Tue, 22 Nov 2016 06:28:27 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201611220628.uAM6SRtF080447@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 22 Nov 2016 06:28:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r308954 - in vendor/ntp/dist: . html html/drivers include lib/isc libntp libparse ntpd ntpdc ntpq ntpsnmpd ports/winnt/include ports/winnt/libntp ports/winnt/ntpd ports/winnt/vs2005 por... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2016 06:28:28 -0000 Author: delphij Date: Tue Nov 22 06:28:26 2016 New Revision: 308954 URL: https://svnweb.freebsd.org/changeset/base/308954 Log: Vendor import of ntp-4.2.8p9. Added: vendor/ntp/dist/include/libssl_compat.h (contents, props changed) vendor/ntp/dist/libntp/libssl_compat.c (contents, props changed) vendor/ntp/dist/sntp/unity/ulib_setup.c (contents, props changed) vendor/ntp/dist/sntp/unity/ulib_teardown.c (contents, props changed) Modified: vendor/ntp/dist/ChangeLog vendor/ntp/dist/CommitLog vendor/ntp/dist/NEWS vendor/ntp/dist/configure vendor/ntp/dist/html/drivers/driver40-ja.html vendor/ntp/dist/html/drivers/driver40.html vendor/ntp/dist/html/miscopt.html vendor/ntp/dist/include/Makefile.am vendor/ntp/dist/include/Makefile.in vendor/ntp/dist/include/ntp.h vendor/ntp/dist/include/ntp_intres.h vendor/ntp/dist/include/ntpd.h vendor/ntp/dist/lib/isc/netaddr.c vendor/ntp/dist/libntp/Makefile.am vendor/ntp/dist/libntp/Makefile.in vendor/ntp/dist/libntp/a_md5encrypt.c vendor/ntp/dist/libntp/audio.c vendor/ntp/dist/libntp/ntp_calendar.c vendor/ntp/dist/libntp/ntp_intres.c vendor/ntp/dist/libntp/ssl_init.c vendor/ntp/dist/libntp/work_fork.c vendor/ntp/dist/libparse/clk_hopf6021.c vendor/ntp/dist/ntpd/complete.conf.in vendor/ntp/dist/ntpd/invoke-ntp.conf.texi vendor/ntp/dist/ntpd/invoke-ntp.keys.texi vendor/ntp/dist/ntpd/invoke-ntpd.texi vendor/ntp/dist/ntpd/keyword-gen-utd vendor/ntp/dist/ntpd/keyword-gen.c vendor/ntp/dist/ntpd/ntp.conf.5man vendor/ntp/dist/ntpd/ntp.conf.5mdoc vendor/ntp/dist/ntpd/ntp.conf.def vendor/ntp/dist/ntpd/ntp.conf.html vendor/ntp/dist/ntpd/ntp.conf.man.in vendor/ntp/dist/ntpd/ntp.conf.mdoc.in vendor/ntp/dist/ntpd/ntp.keys.5man vendor/ntp/dist/ntpd/ntp.keys.5mdoc vendor/ntp/dist/ntpd/ntp.keys.html vendor/ntp/dist/ntpd/ntp.keys.man.in vendor/ntp/dist/ntpd/ntp.keys.mdoc.in vendor/ntp/dist/ntpd/ntp_config.c vendor/ntp/dist/ntpd/ntp_control.c vendor/ntp/dist/ntpd/ntp_crypto.c vendor/ntp/dist/ntpd/ntp_keyword.h vendor/ntp/dist/ntpd/ntp_loopfilter.c vendor/ntp/dist/ntpd/ntp_parser.c vendor/ntp/dist/ntpd/ntp_parser.h vendor/ntp/dist/ntpd/ntp_parser.y vendor/ntp/dist/ntpd/ntp_peer.c vendor/ntp/dist/ntpd/ntp_proto.c vendor/ntp/dist/ntpd/ntp_refclock.c vendor/ntp/dist/ntpd/ntpd-opts.c vendor/ntp/dist/ntpd/ntpd-opts.h vendor/ntp/dist/ntpd/ntpd.1ntpdman vendor/ntp/dist/ntpd/ntpd.1ntpdmdoc vendor/ntp/dist/ntpd/ntpd.html vendor/ntp/dist/ntpd/ntpd.man.in vendor/ntp/dist/ntpd/ntpd.mdoc.in vendor/ntp/dist/ntpd/refclock_gpsdjson.c vendor/ntp/dist/ntpd/refclock_jjy.c vendor/ntp/dist/ntpd/refclock_jupiter.c vendor/ntp/dist/ntpdc/invoke-ntpdc.texi vendor/ntp/dist/ntpdc/ntpdc-opts.c vendor/ntp/dist/ntpdc/ntpdc-opts.h vendor/ntp/dist/ntpdc/ntpdc.1ntpdcman vendor/ntp/dist/ntpdc/ntpdc.1ntpdcmdoc vendor/ntp/dist/ntpdc/ntpdc.html vendor/ntp/dist/ntpdc/ntpdc.man.in vendor/ntp/dist/ntpdc/ntpdc.mdoc.in vendor/ntp/dist/ntpq/invoke-ntpq.texi vendor/ntp/dist/ntpq/ntpq-opts.c vendor/ntp/dist/ntpq/ntpq-opts.h vendor/ntp/dist/ntpq/ntpq.1ntpqman vendor/ntp/dist/ntpq/ntpq.1ntpqmdoc vendor/ntp/dist/ntpq/ntpq.c vendor/ntp/dist/ntpq/ntpq.html vendor/ntp/dist/ntpq/ntpq.man.in vendor/ntp/dist/ntpq/ntpq.mdoc.in vendor/ntp/dist/ntpsnmpd/invoke-ntpsnmpd.texi vendor/ntp/dist/ntpsnmpd/ntpsnmpd-opts.c vendor/ntp/dist/ntpsnmpd/ntpsnmpd-opts.h vendor/ntp/dist/ntpsnmpd/ntpsnmpd.1ntpsnmpdman vendor/ntp/dist/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc vendor/ntp/dist/ntpsnmpd/ntpsnmpd.html vendor/ntp/dist/ntpsnmpd/ntpsnmpd.man.in vendor/ntp/dist/ntpsnmpd/ntpsnmpd.mdoc.in vendor/ntp/dist/packageinfo.sh vendor/ntp/dist/ports/winnt/include/ntp_iocompletionport.h vendor/ntp/dist/ports/winnt/include/ntp_iocpltypes.h vendor/ntp/dist/ports/winnt/include/termios.h vendor/ntp/dist/ports/winnt/libntp/termios.c vendor/ntp/dist/ports/winnt/ntpd/ntp_iocompletionport.c vendor/ntp/dist/ports/winnt/ntpd/ntp_iocpltypes.c vendor/ntp/dist/ports/winnt/vs2005/libntp.vcproj vendor/ntp/dist/ports/winnt/vs2008/libntp/libntp.vcproj vendor/ntp/dist/ports/winnt/vs2013/libntp/libntp.vcxproj vendor/ntp/dist/ports/winnt/vs2013/libntp/libntp.vcxproj.filters vendor/ntp/dist/ports/winnt/vs2015/libntp/libntp.vcxproj vendor/ntp/dist/ports/winnt/vs2015/libntp/libntp.vcxproj.filters vendor/ntp/dist/ports/winnt/vs2015/ntp.sln vendor/ntp/dist/scripts/build/genAuthors.in vendor/ntp/dist/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman vendor/ntp/dist/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc vendor/ntp/dist/scripts/calc_tickadj/calc_tickadj.html vendor/ntp/dist/scripts/calc_tickadj/calc_tickadj.man.in vendor/ntp/dist/scripts/calc_tickadj/calc_tickadj.mdoc.in vendor/ntp/dist/scripts/calc_tickadj/invoke-calc_tickadj.texi vendor/ntp/dist/scripts/invoke-plot_summary.texi vendor/ntp/dist/scripts/invoke-summary.texi vendor/ntp/dist/scripts/ntp-wait/invoke-ntp-wait.texi vendor/ntp/dist/scripts/ntp-wait/ntp-wait-opts vendor/ntp/dist/scripts/ntp-wait/ntp-wait.1ntp-waitman vendor/ntp/dist/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc vendor/ntp/dist/scripts/ntp-wait/ntp-wait.html vendor/ntp/dist/scripts/ntp-wait/ntp-wait.man.in vendor/ntp/dist/scripts/ntp-wait/ntp-wait.mdoc.in vendor/ntp/dist/scripts/ntpsweep/invoke-ntpsweep.texi vendor/ntp/dist/scripts/ntpsweep/ntpsweep-opts vendor/ntp/dist/scripts/ntpsweep/ntpsweep.1ntpsweepman vendor/ntp/dist/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc vendor/ntp/dist/scripts/ntpsweep/ntpsweep.html vendor/ntp/dist/scripts/ntpsweep/ntpsweep.man.in vendor/ntp/dist/scripts/ntpsweep/ntpsweep.mdoc.in vendor/ntp/dist/scripts/ntptrace/invoke-ntptrace.texi vendor/ntp/dist/scripts/ntptrace/ntptrace-opts vendor/ntp/dist/scripts/ntptrace/ntptrace.1ntptraceman vendor/ntp/dist/scripts/ntptrace/ntptrace.1ntptracemdoc vendor/ntp/dist/scripts/ntptrace/ntptrace.html vendor/ntp/dist/scripts/ntptrace/ntptrace.man.in vendor/ntp/dist/scripts/ntptrace/ntptrace.mdoc.in vendor/ntp/dist/scripts/plot_summary-opts vendor/ntp/dist/scripts/plot_summary.1plot_summaryman vendor/ntp/dist/scripts/plot_summary.1plot_summarymdoc vendor/ntp/dist/scripts/plot_summary.html vendor/ntp/dist/scripts/plot_summary.man.in vendor/ntp/dist/scripts/plot_summary.mdoc.in vendor/ntp/dist/scripts/summary-opts vendor/ntp/dist/scripts/summary.1summaryman vendor/ntp/dist/scripts/summary.1summarymdoc vendor/ntp/dist/scripts/summary.html vendor/ntp/dist/scripts/summary.man.in vendor/ntp/dist/scripts/summary.mdoc.in vendor/ntp/dist/scripts/update-leap/invoke-update-leap.texi vendor/ntp/dist/scripts/update-leap/update-leap-opts vendor/ntp/dist/scripts/update-leap/update-leap.1update-leapman vendor/ntp/dist/scripts/update-leap/update-leap.1update-leapmdoc vendor/ntp/dist/scripts/update-leap/update-leap.html vendor/ntp/dist/scripts/update-leap/update-leap.in vendor/ntp/dist/scripts/update-leap/update-leap.man.in vendor/ntp/dist/scripts/update-leap/update-leap.mdoc.in vendor/ntp/dist/sntp/configure vendor/ntp/dist/sntp/crypto.c vendor/ntp/dist/sntp/include/version.def vendor/ntp/dist/sntp/include/version.texi vendor/ntp/dist/sntp/invoke-sntp.texi vendor/ntp/dist/sntp/m4/version.m4 vendor/ntp/dist/sntp/sntp-opts.c vendor/ntp/dist/sntp/sntp-opts.h vendor/ntp/dist/sntp/sntp.1sntpman vendor/ntp/dist/sntp/sntp.1sntpmdoc vendor/ntp/dist/sntp/sntp.html vendor/ntp/dist/sntp/sntp.man.in vendor/ntp/dist/sntp/sntp.mdoc.in vendor/ntp/dist/sntp/tests/packetProcessing.c vendor/ntp/dist/sntp/tests/run-packetProcessing.c vendor/ntp/dist/sntp/unity/Makefile.am vendor/ntp/dist/sntp/unity/Makefile.in vendor/ntp/dist/sntp/unity/unity_fixture.c vendor/ntp/dist/sntp/version.c vendor/ntp/dist/tests/libntp/a_md5encrypt.c vendor/ntp/dist/tests/libntp/calendar.c vendor/ntp/dist/tests/libntp/run-calendar.c vendor/ntp/dist/tests/libntp/sfptostr.c vendor/ntp/dist/tests/ntpd/Makefile.am vendor/ntp/dist/tests/ntpd/Makefile.in vendor/ntp/dist/util/invoke-ntp-keygen.texi vendor/ntp/dist/util/ntp-keygen-opts.c vendor/ntp/dist/util/ntp-keygen-opts.h vendor/ntp/dist/util/ntp-keygen.1ntp-keygenman vendor/ntp/dist/util/ntp-keygen.1ntp-keygenmdoc vendor/ntp/dist/util/ntp-keygen.c vendor/ntp/dist/util/ntp-keygen.html vendor/ntp/dist/util/ntp-keygen.man.in vendor/ntp/dist/util/ntp-keygen.mdoc.in Modified: vendor/ntp/dist/ChangeLog ============================================================================== --- vendor/ntp/dist/ChangeLog Tue Nov 22 05:54:37 2016 (r308953) +++ vendor/ntp/dist/ChangeLog Tue Nov 22 06:28:26 2016 (r308954) @@ -1,4 +1,73 @@ --- +(4.2.8p9) 2016/11/21 Released by Harlan Stenn +(4.2.8p9) 2016/MM/DD Released by Harlan Stenn + +* [Sec 3119] Trap crash +* [Sec 3118] Mode 6 information disclosure and DDoS vector + - TRAP config via mode 6 packet requires AUTH now. +* [Sec 3114] Broadcast Mode Replay Prevention DoS + - applied patches by Matthew Van Gundy. + - with bcpollbstep, tweaks and cleanup by stenn@ntp.org +* [Sec 3113] Broadcast Mode Poll Interval Enforcement DoS + - applied fix as suggested by Matthew Van Gundy +* [Sec 3110] Windows: ntpd DoS by oversized UDP packet + - fixed error handling for truncated UDP packets. +* [Sec 3102] Zero origin issues. HStenn. +* [Sec 3082] null pointer dereference in _IO_str_init_static_internal() + - more hardening to read_mru_list(). perlinger@ntp.org +* [Sec 3072] Attack on interface selection + - implemented Miroslav Lichvars suggestion + to skip interface updates based on incoming packets +* [Bug 3142] bug in netmask prefix length detection +* [Bug 3138] gpsdjson refclock should honor fudgetime1. stenn@ntp.org +* [Bug 3129] Unknown hosts can put resolver thread into a hard loop + - moved retry decision where it belongs. +* [Bug 3125] NTPD doesn't fully start when ntp.conf entries are out of order + using the loopback-ppsapi-provider.dll +* [Bug 3116] unit tests for NTP time stamp expansion. +* [Bug 3100] ntpq can't retrieve daemon_version + - fixed extended sysvar lookup (bug introduced with bug 3008 fix) +* [Bug 3095] Compatibility with openssl 1.1 + - applied patches by Kurt Roeckx to source + - added shim layer for SSL API calls with issues (both directions) +* [Bug 3089] Serial Parser does not work anymore for hopfser like device + - simplified / refactored hex-decoding in driver. +* [Bug 3084] update-leap mis-parses the leapfile name. HStenn. +* [Bug 3068] Linker warnings when building on Solaris. perlinger@ntp.org + - applied patch thanks to Andrew Stormont +* [Bug 3067] Root distance calculation needs improvement. HStenn. +* [Bug 3066] NMEA clock ignores pps. perlinger@ntp.org + - PPS-HACK works again. +* [Bug 3059] Potential buffer overrun from oversized hash + - applied patch by Brian Utterback +* [Bug 3053] ntp_loopfilter.c frequency calc precedence error. Sarah White. +* [Bug 3050] Fix for bug #2960 causes [...] spurious error message. + + - patches by Reinhard Max and Havard Eidnes +* [Bug 3047] Fix refclock_jjy C-DEX JST2000. abe@ntp.org + - Patch provided by Kuramatsu. +* [Bug 3021] unity_fixture.c needs pragma weak + - removed unnecessary & harmful decls of 'setUp()' & 'tearDown()' +* [Bug 3019] Windows: ERROR_HOST_UNREACHABLE block packet processing. + DMayer and JPerlinger. +* [Bug 2998] sntp/tests/packetProcessing.c broken without openssl. JPerlinger +* [Bug 2961] sntp/tests/packetProcessing.c assumes AUTOKEY. HStenn. +* [Bug 2959] refclock_jupiter: gps week correction + - fixed GPS week expansion to work based on build date. Special thanks + to Craig Leres for initial patch and testing. +* [Bug 2951] ntpd tests fail: multiple definition of `send_via_ntp_signd' + - fixed Makefile.am +* [Bug 2689] ATOM driver processes last PPS pulse at startup, + even if it is very old + - make sure PPS source is alive before processing samples + - improve stability close to the 500ms phase jump (phase gate) +* Fix typos in include/ntp.h. +* Shim X509_get_signature_nid() if needed. +* git author attribution cleanup +* bk ignore file cleanup +* remove locks in Windows IO, use rpc-like thread synchronisation instead + +--- (4.2.8p8) 2016/06/02 Released by Harlan Stenn * [Sec 3042] Broadcast Interleave. HStenn. @@ -19,7 +88,7 @@ * Fix typo in ntp-wait and plot_summary. HStenn. * Make sure we have an "author" file for git imports. HStenn. * Update the sntp problem tests for MacOS. HStenn. - + --- (4.2.8p7) 2016/04/26 Released by Harlan Stenn Modified: vendor/ntp/dist/CommitLog ============================================================================== --- vendor/ntp/dist/CommitLog Tue Nov 22 05:54:37 2016 (r308953) +++ vendor/ntp/dist/CommitLog Tue Nov 22 06:28:26 2016 (r308954) @@ -1,3 +1,1866 @@ +ChangeSet@1.3720, 2016-11-21 08:08:21-05:00, stenn@deacon.udel.edu + NTP_4_2_8P9 + TAG: NTP_4_2_8P9 + + ChangeLog@1.1852 +1 -0 + NTP_4_2_8P9 + + ntpd/invoke-ntp.conf.texi@1.203 +1 -1 + NTP_4_2_8P9 + + ntpd/invoke-ntp.keys.texi@1.192 +1 -1 + NTP_4_2_8P9 + + ntpd/invoke-ntpd.texi@1.508 +2 -2 + NTP_4_2_8P9 + + ntpd/ntp.conf.5man@1.237 +3 -3 + NTP_4_2_8P9 + + ntpd/ntp.conf.5mdoc@1.237 +2 -2 + NTP_4_2_8P9 + + ntpd/ntp.conf.html@1.187 +157 -154 + NTP_4_2_8P9 + + ntpd/ntp.conf.man.in@1.237 +3 -3 + NTP_4_2_8P9 + + ntpd/ntp.conf.mdoc.in@1.237 +2 -2 + NTP_4_2_8P9 + + ntpd/ntp.keys.5man@1.226 +2 -2 + NTP_4_2_8P9 + + ntpd/ntp.keys.5mdoc@1.226 +3 -3 + NTP_4_2_8P9 + + ntpd/ntp.keys.html@1.188 +21 -33 + NTP_4_2_8P9 + + ntpd/ntp.keys.man.in@1.226 +2 -2 + NTP_4_2_8P9 + + ntpd/ntp.keys.mdoc.in@1.226 +3 -3 + NTP_4_2_8P9 + + ntpd/ntpd-opts.c@1.530 +245 -245 + NTP_4_2_8P9 + + ntpd/ntpd-opts.h@1.529 +3 -3 + NTP_4_2_8P9 + + ntpd/ntpd.1ntpdman@1.337 +3 -3 + NTP_4_2_8P9 + + ntpd/ntpd.1ntpdmdoc@1.337 +2 -2 + NTP_4_2_8P9 + + ntpd/ntpd.html@1.181 +142 -186 + NTP_4_2_8P9 + + ntpd/ntpd.man.in@1.337 +3 -3 + NTP_4_2_8P9 + + ntpd/ntpd.mdoc.in@1.337 +2 -2 + NTP_4_2_8P9 + + ntpdc/invoke-ntpdc.texi@1.505 +2 -2 + NTP_4_2_8P9 + + ntpdc/ntpdc-opts.c@1.523 +106 -106 + NTP_4_2_8P9 + + ntpdc/ntpdc-opts.h@1.522 +3 -3 + NTP_4_2_8P9 + + ntpdc/ntpdc.1ntpdcman@1.336 +3 -3 + NTP_4_2_8P9 + + ntpdc/ntpdc.1ntpdcmdoc@1.336 +2 -2 + NTP_4_2_8P9 + + ntpdc/ntpdc.html@1.349 +75 -95 + NTP_4_2_8P9 + + ntpdc/ntpdc.man.in@1.336 +3 -3 + NTP_4_2_8P9 + + ntpdc/ntpdc.mdoc.in@1.336 +2 -2 + NTP_4_2_8P9 + + ntpq/invoke-ntpq.texi@1.513 +2 -2 + NTP_4_2_8P9 + + ntpq/ntpq-opts.c@1.530 +113 -113 + NTP_4_2_8P9 + + ntpq/ntpq-opts.h@1.528 +3 -3 + NTP_4_2_8P9 + + ntpq/ntpq.1ntpqman@1.341 +3 -3 + NTP_4_2_8P9 + + ntpq/ntpq.1ntpqmdoc@1.341 +2 -2 + NTP_4_2_8P9 + + ntpq/ntpq.html@1.178 +136 -160 + NTP_4_2_8P9 + + ntpq/ntpq.man.in@1.341 +3 -3 + NTP_4_2_8P9 + + ntpq/ntpq.mdoc.in@1.341 +2 -2 + NTP_4_2_8P9 + + ntpsnmpd/invoke-ntpsnmpd.texi@1.507 +2 -2 + NTP_4_2_8P9 + + ntpsnmpd/ntpsnmpd-opts.c@1.525 +67 -67 + NTP_4_2_8P9 + + ntpsnmpd/ntpsnmpd-opts.h@1.524 +3 -3 + NTP_4_2_8P9 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.336 +3 -3 + NTP_4_2_8P9 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.336 +2 -2 + NTP_4_2_8P9 + + ntpsnmpd/ntpsnmpd.html@1.176 +10 -14 + NTP_4_2_8P9 + + ntpsnmpd/ntpsnmpd.man.in@1.336 +3 -3 + NTP_4_2_8P9 + + ntpsnmpd/ntpsnmpd.mdoc.in@1.336 +2 -2 + NTP_4_2_8P9 + + packageinfo.sh@1.532 +2 -2 + NTP_4_2_8P9 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.97 +3 -3 + NTP_4_2_8P9 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.98 +2 -2 + NTP_4_2_8P9 + + scripts/calc_tickadj/calc_tickadj.html@1.99 +30 -42 + NTP_4_2_8P9 + + scripts/calc_tickadj/calc_tickadj.man.in@1.96 +3 -3 + NTP_4_2_8P9 + + scripts/calc_tickadj/calc_tickadj.mdoc.in@1.98 +2 -2 + NTP_4_2_8P9 + + scripts/calc_tickadj/invoke-calc_tickadj.texi@1.101 +1 -1 + NTP_4_2_8P9 + + scripts/invoke-plot_summary.texi@1.119 +2 -2 + NTP_4_2_8P9 + + scripts/invoke-summary.texi@1.118 +2 -2 + NTP_4_2_8P9 + + scripts/ntp-wait/invoke-ntp-wait.texi@1.328 +2 -2 + NTP_4_2_8P9 + + scripts/ntp-wait/ntp-wait-opts@1.64 +2 -2 + NTP_4_2_8P9 + + scripts/ntp-wait/ntp-wait.1ntp-waitman@1.325 +3 -3 + NTP_4_2_8P9 + + scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.326 +2 -2 + NTP_4_2_8P9 + + scripts/ntp-wait/ntp-wait.html@1.345 +41 -59 + NTP_4_2_8P9 + + scripts/ntp-wait/ntp-wait.man.in@1.325 +3 -3 + NTP_4_2_8P9 + + scripts/ntp-wait/ntp-wait.mdoc.in@1.326 +2 -2 + NTP_4_2_8P9 + + scripts/ntpsweep/invoke-ntpsweep.texi@1.116 +2 -2 + NTP_4_2_8P9 + + scripts/ntpsweep/ntpsweep-opts@1.66 +2 -2 + NTP_4_2_8P9 + + scripts/ntpsweep/ntpsweep.1ntpsweepman@1.104 +3 -3 + NTP_4_2_8P9 + + scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.104 +2 -2 + NTP_4_2_8P9 + + scripts/ntpsweep/ntpsweep.html@1.117 +46 -57 + NTP_4_2_8P9 + + scripts/ntpsweep/ntpsweep.man.in@1.104 +3 -3 + NTP_4_2_8P9 + + scripts/ntpsweep/ntpsweep.mdoc.in@1.105 +2 -2 + NTP_4_2_8P9 + + scripts/ntptrace/invoke-ntptrace.texi@1.117 +2 -2 + NTP_4_2_8P9 + + scripts/ntptrace/ntptrace-opts@1.66 +2 -2 + NTP_4_2_8P9 + + scripts/ntptrace/ntptrace.1ntptraceman@1.104 +3 -3 + NTP_4_2_8P9 + + scripts/ntptrace/ntptrace.1ntptracemdoc@1.105 +2 -2 + NTP_4_2_8P9 + + scripts/ntptrace/ntptrace.html@1.118 +38 -47 + NTP_4_2_8P9 + + scripts/ntptrace/ntptrace.man.in@1.104 +3 -3 + NTP_4_2_8P9 + + scripts/ntptrace/ntptrace.mdoc.in@1.106 +2 -2 + NTP_4_2_8P9 + + scripts/plot_summary-opts@1.67 +2 -2 + NTP_4_2_8P9 + + scripts/plot_summary.1plot_summaryman@1.117 +3 -3 + NTP_4_2_8P9 + + scripts/plot_summary.1plot_summarymdoc@1.117 +2 -2 + NTP_4_2_8P9 + + scripts/plot_summary.html@1.120 +40 -58 + NTP_4_2_8P9 + + scripts/plot_summary.man.in@1.117 +3 -3 + NTP_4_2_8P9 + + scripts/plot_summary.mdoc.in@1.117 +2 -2 + NTP_4_2_8P9 + + scripts/summary-opts@1.66 +2 -2 + NTP_4_2_8P9 + + scripts/summary.1summaryman@1.116 +3 -3 + NTP_4_2_8P9 + + scripts/summary.1summarymdoc@1.116 +2 -2 + NTP_4_2_8P9 + + scripts/summary.html@1.119 +37 -49 + NTP_4_2_8P9 + + scripts/summary.man.in@1.116 +3 -3 + NTP_4_2_8P9 + + scripts/summary.mdoc.in@1.116 +2 -2 + NTP_4_2_8P9 + + scripts/update-leap/invoke-update-leap.texi@1.17 +1 -1 + NTP_4_2_8P9 + + scripts/update-leap/update-leap-opts@1.17 +2 -2 + NTP_4_2_8P9 + + scripts/update-leap/update-leap.1update-leapman@1.17 +3 -3 + NTP_4_2_8P9 + + scripts/update-leap/update-leap.1update-leapmdoc@1.17 +2 -2 + NTP_4_2_8P9 + + scripts/update-leap/update-leap.html@1.17 +48 -72 + NTP_4_2_8P9 + + scripts/update-leap/update-leap.man.in@1.17 +3 -3 + NTP_4_2_8P9 + + scripts/update-leap/update-leap.mdoc.in@1.17 +2 -2 + NTP_4_2_8P9 + + sntp/invoke-sntp.texi@1.505 +2 -2 + NTP_4_2_8P9 + + sntp/sntp-opts.c@1.524 +158 -158 + NTP_4_2_8P9 + + sntp/sntp-opts.h@1.522 +3 -3 + NTP_4_2_8P9 + + sntp/sntp.1sntpman@1.340 +3 -3 + NTP_4_2_8P9 + + sntp/sntp.1sntpmdoc@1.340 +2 -2 + NTP_4_2_8P9 + + sntp/sntp.html@1.520 +111 -135 + NTP_4_2_8P9 + + sntp/sntp.man.in@1.340 +3 -3 + NTP_4_2_8P9 + + sntp/sntp.mdoc.in@1.340 +2 -2 + NTP_4_2_8P9 + + util/invoke-ntp-keygen.texi@1.508 +2 -2 + NTP_4_2_8P9 + + util/ntp-keygen-opts.c@1.526 +172 -172 + NTP_4_2_8P9 + + util/ntp-keygen-opts.h@1.524 +3 -3 + NTP_4_2_8P9 + + util/ntp-keygen.1ntp-keygenman@1.336 +3 -3 + NTP_4_2_8P9 + + util/ntp-keygen.1ntp-keygenmdoc@1.336 +2 -2 + NTP_4_2_8P9 + + util/ntp-keygen.html@1.182 +157 -216 + NTP_4_2_8P9 + + util/ntp-keygen.man.in@1.336 +3 -3 + NTP_4_2_8P9 + + util/ntp-keygen.mdoc.in@1.336 +2 -2 + NTP_4_2_8P9 + +ChangeSet@1.3719, 2016-11-21 07:07:04-05:00, stenn@deacon.udel.edu + ntp-4.2.8p9 + + packageinfo.sh@1.531 +1 -1 + ntp-4.2.8p9 + +ChangeSet@1.3718, 2016-11-21 03:47:58+00:00, stenn@psp-deb1.ntp.org + NEWS updates, final p9 testing + + NEWS@1.203 +25 -17 + NEWS updates, final p9 testing + + packageinfo.sh@1.530 +2 -2 + NEWS updates, final p9 testing + +ChangeSet@1.3717, 2016-11-18 10:33:02+00:00, stenn@psp-deb1.ntp.org + NEWS update for 3142 + + NEWS@1.202 +2 -1 + NEWS update for 3142 + +ChangeSet@1.3686.23.1, 2016-11-18 08:55:13+01:00, perlinger@ntp.org + [Bug 3142] bug in netmask prefix length detection + + ChangeLog@1.1834.23.1 +3 -0 + [Bug 3142] bug in netmask prefix length detection + + lib/isc/netaddr.c@1.15 +0 -1 + [Bug 3142] bug in netmask prefix length detection + +ChangeSet@1.3715, 2016-11-16 21:25:49-08:00, harlan@fb-x86-a.pfcs.com + NEWS file update + + NEWS@1.201 +7 -22 + NEWS file update + +ChangeSet@1.3707.1.1, 2016-11-13 21:59:31-08:00, harlan@fb-x86-a.pfcs.com + cleanup + + NEWS@1.197.1.1 +201 -77 + cleanup + +ChangeSet@1.3713, 2016-11-13 21:56:18-08:00, harlan@hms-mbp11.pfcs.com + cleanip + + ChangeLog@1.1850 +2 -0 + cleanip + +ChangeSet@1.3712, 2016-11-13 02:43:02+00:00, stenn@psp-deb1.ntp.org + NEWS updates + + NEWS@1.199 +17 -0 + NEWS updates + +ChangeSet@1.3710, 2016-11-13 02:30:31+00:00, stenn@psp-deb1.ntp.org + NEWS cleanup + + NEWS@1.198 +2 -0 + NEWS cleanup + +ChangeSet@1.3707, 2016-11-12 17:36:54-08:00, harlan@fb-x86-a.pfcs.com + NEWS cleanup + + NEWS@1.197 +41 -6 + NEWS cleanup + +ChangeSet@1.3706, 2016-11-12 16:55:59-08:00, harlan@fb-x86-a.pfcs.com + [Bug 3067] Root distance calculation needs improvement. HStenn + + ChangeLog@1.1846.1.2 +1 -0 + [Bug 3067] Root distance calculation needs improvement. HStenn + + NEWS@1.196 +1 -0 + [Bug 3067] Root distance calculation needs improvement. HStenn + + ntpd/ntp_proto.c@1.396 +16 -11 + [Bug 3067] Root distance calculation needs improvement. HStenn + +ChangeSet@1.3705, 2016-11-12 15:57:34-08:00, harlan@fb-x86-a.pfcs.com + [Bug 3138] gpsdjson refclock should honor fudgetime1. stenn@ntp.org + + ChangeLog@1.1846.1.1 +1 -0 + [Bug 3138] gpsdjson refclock should honor fudgetime1. stenn@ntp.org + + NEWS@1.195 +1 -0 + [Bug 3138] gpsdjson refclock should honor fudgetime1. stenn@ntp.org + + ntpd/refclock_gpsdjson.c@1.25 +1 -1 + [Bug 3138] gpsdjson refclock should honor fudgetime1. stenn@ntp.org + +ChangeSet@1.3686.22.1, 2016-11-12 05:54:39+01:00, perlinger@ntp.org + [Bug 3129] Unknown hosts can put resolver thread into a hard loop + + ChangeLog@1.1834.22.1 +4 -0 + [Bug 3129] Unknown hosts can put resolver thread into a hard loop + + include/ntp_intres.h@1.2 +6 -0 + [Bug 3129] Unknown hosts can put resolver thread into a hard loop + - add flags and prototype for 'getaddrinfo_sometime_ex()' + + libntp/ntp_intres.c@1.101 +48 -14 + [Bug 3129] Unknown hosts can put resolver thread into a hard loop + - implement 'getaddrinfo_sometime_ex()', support ignoring all errors + + ntpd/ntp_config.c@1.338.1.1 +11 -10 + [Bug 3129] Unknown hosts can put resolver thread into a hard loop + - move decison about igoring DNS errors to resolver code + +ChangeSet@1.3703.1.2, 2016-11-09 12:32:07+00:00, stenn@psp-deb1.ntp.org + [Bug 3114] bcpollbstep, tweaks and cleanup + + ChangeLog@1.1848 +1 -1 + [Bug 3114] bcpollbstep, tweaks and cleanup + + html/miscopt.html@1.87 +4 -2 + [Bug 3114] bcpollbstep, tweaks and cleanup + + include/ntp.h@1.223 +1 -0 + [Bug 3114] bcpollbstep, tweaks and cleanup + + include/ntpd.h@1.194 +1 -0 + [Bug 3114] bcpollbstep, tweaks and cleanup + + ntpd/complete.conf.in@1.32 +1 -1 + [Bug 3114] bcpollbstep, tweaks and cleanup + + ntpd/invoke-ntp.conf.texi@1.202 +16 -1 + [Bug 3114] bcpollbstep, tweaks and cleanup + + ntpd/keyword-gen-utd@1.29 +1 -1 + [Bug 3114] bcpollbstep, tweaks and cleanup + + ntpd/keyword-gen.c@1.35 +1 -0 + [Bug 3114] bcpollbstep, tweaks and cleanup + + ntpd/ntp.conf.5man@1.236 +29 -8 + [Bug 3114] bcpollbstep, tweaks and cleanup + + ntpd/ntp.conf.5mdoc@1.236 +21 -2 + [Bug 3114] bcpollbstep, tweaks and cleanup + + ntpd/ntp.conf.def@1.25 +19 -0 + [Bug 3114] bcpollbstep, tweaks and cleanup + + ntpd/ntp.conf.man.in@1.236 +29 -8 + [Bug 3114] bcpollbstep, tweaks and cleanup + + ntpd/ntp.conf.mdoc.in@1.236 +21 -2 + [Bug 3114] bcpollbstep, tweaks and cleanup + + ntpd/ntp_config.c@1.339 +15 -0 + [Bug 3114] bcpollbstep, tweaks and cleanup + + ntpd/ntp_keyword.h@1.31 +1068 -1058 + [Bug 3114] bcpollbstep, tweaks and cleanup + + ntpd/ntp_parser.c@1.103 +1196 -1193 + [Bug 3114] bcpollbstep, tweaks and cleanup + + ntpd/ntp_parser.h@1.67 +373 -371 + [Bug 3114] bcpollbstep, tweaks and cleanup + + ntpd/ntp_parser.y@1.93 +3 -1 + [Bug 3114] bcpollbstep, tweaks and cleanup + + ntpd/ntp_proto.c@1.394.1.2 +43 -26 + [Bug 3114] bcpollbstep, tweaks and cleanup + +ChangeSet@1.3703, 2016-11-09 06:06:04+00:00, stenn@psp-deb1.ntp.org + typo + + ChangeLog@1.1846 +1 -1 + typo + +ChangeSet@1.3686.21.1, 2016-11-08 20:01:41+01:00, perlinger@ntp.org + [Bug 3089] Serial Parser does not work anymore for hopfser like device + + ChangeLog@1.1834.21.1 +4 -0 + [Bug 3089] Serial Parser does not work anymore for hopfser like device + + libparse/clk_hopf6021.c@1.13 +43 -25 + [Bug 3089] Serial Parser does not work anymore for hopfser like device + - simplified / refactored hex-decoding in driver. + +ChangeSet@1.3698.2.1, 2016-11-03 17:02:24-07:00, harlan@max.pfcs.com + Added leap smear/root dispersion comment + + ntpd/ntp_proto.c@1.393.1.1 +4 -0 + Added leap smear/root dispersion comment + +ChangeSet@1.3699.1.2, 2016-10-31 10:56:33+00:00, stenn@psp-deb1.ntp.org + Add bug 3125 to the NEWS file + + NEWS@1.194 +2 -0 + Add bug 3125 to the NEWS file + +ChangeSet@1.3701, 2016-10-24 07:37:25+02:00, perlinger@ntp.org + [winio2 - unlocked] + - the great lock removal + - the great renaming + + ChangeLog@1.1844 +1 -0 + [winio2 - unlocked] notes on changes + + ntpd/ntp_refclock.c@1.123 +1 -1 + [winio2 - unlocked] + - whitespace at EOL + + ports/winnt/include/ntp_iocpltypes.h@1.3 +21 -24 + [winio2 - unlocked] + - eliminate critical section, simplify API + - the great renaming + + ports/winnt/ntpd/ntp_iocompletionport.c@1.77 +331 -209 + [winio2 - unlocked] + - the great lock removal + - handle context objects are only manipulated by IOCPL thread + - closing handles is done by main thread after informing IOCPL thread (RPC-style) + - the great renaming + - restructured UNIX line mode emulation + + ports/winnt/ntpd/ntp_iocpltypes.c@1.3 +31 -95 + [winio2 - unlocked] + - eliminate critical section, simplify API + - the great renaming + + +ChangeSet@1.3698.1.7, 2016-10-23 05:18:04+00:00, stenn@psp-deb1.ntp.org + ntp-4.2.8p9-PRE + + ntpd/invoke-ntp.conf.texi@1.201 +1 -1 + ntp-4.2.8p9-PRE + + ntpd/invoke-ntp.keys.texi@1.191 +1 -1 + ntp-4.2.8p9-PRE + + ntpd/invoke-ntpd.texi@1.507 +2 -2 + ntp-4.2.8p9-PRE + + ntpd/ntp.conf.5man@1.235 +3 -3 + ntp-4.2.8p9-PRE + + ntpd/ntp.conf.5mdoc@1.235 +2 -2 + ntp-4.2.8p9-PRE + + ntpd/ntp.conf.html@1.186 +104 -91 + ntp-4.2.8p9-PRE + + ntpd/ntp.conf.man.in@1.235 +3 -3 + ntp-4.2.8p9-PRE + + ntpd/ntp.conf.mdoc.in@1.235 +2 -2 + ntp-4.2.8p9-PRE + + ntpd/ntp.keys.5man@1.225 +2 -2 + ntp-4.2.8p9-PRE + + ntpd/ntp.keys.5mdoc@1.225 +3 -3 + ntp-4.2.8p9-PRE + + ntpd/ntp.keys.html@1.187 +29 -17 + ntp-4.2.8p9-PRE + + ntpd/ntp.keys.man.in@1.225 +2 -2 + ntp-4.2.8p9-PRE + + ntpd/ntp.keys.mdoc.in@1.225 +3 -3 + ntp-4.2.8p9-PRE + + ntpd/ntpd-opts.c@1.529 +245 -245 + ntp-4.2.8p9-PRE + + ntpd/ntpd-opts.h@1.528 +3 -3 + ntp-4.2.8p9-PRE + + ntpd/ntpd.1ntpdman@1.336 +3 -3 + ntp-4.2.8p9-PRE + + ntpd/ntpd.1ntpdmdoc@1.336 +2 -2 + ntp-4.2.8p9-PRE + + ntpd/ntpd.html@1.180 +146 -102 + ntp-4.2.8p9-PRE + + ntpd/ntpd.man.in@1.336 +3 -3 + ntp-4.2.8p9-PRE + + ntpd/ntpd.mdoc.in@1.336 +2 -2 + ntp-4.2.8p9-PRE + + ntpdc/invoke-ntpdc.texi@1.504 +2 -2 + ntp-4.2.8p9-PRE + + ntpdc/ntpdc-opts.c@1.522 +106 -106 + ntp-4.2.8p9-PRE + + ntpdc/ntpdc-opts.h@1.521 +3 -3 + ntp-4.2.8p9-PRE + + ntpdc/ntpdc.1ntpdcman@1.335 +3 -3 + ntp-4.2.8p9-PRE + + ntpdc/ntpdc.1ntpdcmdoc@1.335 +2 -2 + ntp-4.2.8p9-PRE + + ntpdc/ntpdc.html@1.348 +77 -57 + ntp-4.2.8p9-PRE + + ntpdc/ntpdc.man.in@1.335 +3 -3 + ntp-4.2.8p9-PRE + + ntpdc/ntpdc.mdoc.in@1.335 +2 -2 + ntp-4.2.8p9-PRE + + ntpq/invoke-ntpq.texi@1.512 +2 -2 + ntp-4.2.8p9-PRE + + ntpq/ntpq-opts.c@1.529 +113 -113 + ntp-4.2.8p9-PRE + + ntpq/ntpq-opts.h@1.527 +3 -3 + ntp-4.2.8p9-PRE + + ntpq/ntpq.1ntpqman@1.340 +3 -3 + ntp-4.2.8p9-PRE + + ntpq/ntpq.1ntpqmdoc@1.340 +2 -2 + ntp-4.2.8p9-PRE + + ntpq/ntpq.html@1.177 +129 -105 + ntp-4.2.8p9-PRE + + ntpq/ntpq.man.in@1.340 +3 -3 + ntp-4.2.8p9-PRE + + ntpq/ntpq.mdoc.in@1.340 +2 -2 + ntp-4.2.8p9-PRE + + ntpsnmpd/invoke-ntpsnmpd.texi@1.506 +2 -2 + ntp-4.2.8p9-PRE + + ntpsnmpd/ntpsnmpd-opts.c@1.524 +67 -67 + ntp-4.2.8p9-PRE + + ntpsnmpd/ntpsnmpd-opts.h@1.523 +3 -3 + ntp-4.2.8p9-PRE + + ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.335 +3 -3 + ntp-4.2.8p9-PRE + + ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.335 +2 -2 + ntp-4.2.8p9-PRE + + ntpsnmpd/ntpsnmpd.html@1.175 +14 -10 + ntp-4.2.8p9-PRE + + ntpsnmpd/ntpsnmpd.man.in@1.335 +3 -3 + ntp-4.2.8p9-PRE + + ntpsnmpd/ntpsnmpd.mdoc.in@1.335 +2 -2 + ntp-4.2.8p9-PRE + + packageinfo.sh@1.529 +2 -2 + ntp-4.2.8p9-PRE + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.96 +3 -3 + ntp-4.2.8p9-PRE + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.97 +2 -2 + ntp-4.2.8p9-PRE + + scripts/calc_tickadj/calc_tickadj.html@1.98 +34 -22 + ntp-4.2.8p9-PRE + + scripts/calc_tickadj/calc_tickadj.man.in@1.95 +3 -3 + ntp-4.2.8p9-PRE + + scripts/calc_tickadj/calc_tickadj.mdoc.in@1.97 +2 -2 + ntp-4.2.8p9-PRE + + scripts/calc_tickadj/invoke-calc_tickadj.texi@1.100 +1 -1 + ntp-4.2.8p9-PRE + + scripts/invoke-plot_summary.texi@1.118 +2 -2 + ntp-4.2.8p9-PRE + + scripts/invoke-summary.texi@1.117 +2 -2 + ntp-4.2.8p9-PRE + + scripts/ntp-wait/invoke-ntp-wait.texi@1.327 +2 -2 + ntp-4.2.8p9-PRE + + scripts/ntp-wait/ntp-wait-opts@1.63 +2 -2 + ntp-4.2.8p9-PRE + + scripts/ntp-wait/ntp-wait.1ntp-waitman@1.324 +3 -3 + ntp-4.2.8p9-PRE + + scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.325 +2 -2 + ntp-4.2.8p9-PRE + + scripts/ntp-wait/ntp-wait.html@1.344 +49 -31 + ntp-4.2.8p9-PRE + + scripts/ntp-wait/ntp-wait.man.in@1.324 +3 -3 + ntp-4.2.8p9-PRE + + scripts/ntp-wait/ntp-wait.mdoc.in@1.325 +2 -2 + ntp-4.2.8p9-PRE + + scripts/ntpsweep/invoke-ntpsweep.texi@1.115 +2 -2 + ntp-4.2.8p9-PRE + + scripts/ntpsweep/ntpsweep-opts@1.65 +2 -2 + ntp-4.2.8p9-PRE + + scripts/ntpsweep/ntpsweep.1ntpsweepman@1.103 +3 -3 + ntp-4.2.8p9-PRE + + scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.103 +2 -2 + ntp-4.2.8p9-PRE + + scripts/ntpsweep/ntpsweep.html@1.116 +44 -33 + ntp-4.2.8p9-PRE + + scripts/ntpsweep/ntpsweep.man.in@1.103 +3 -3 + ntp-4.2.8p9-PRE + + scripts/ntpsweep/ntpsweep.mdoc.in@1.104 +2 -2 + ntp-4.2.8p9-PRE + + scripts/ntptrace/invoke-ntptrace.texi@1.116 +2 -2 + ntp-4.2.8p9-PRE + + scripts/ntptrace/ntptrace-opts@1.65 +2 -2 + ntp-4.2.8p9-PRE + + scripts/ntptrace/ntptrace.1ntptraceman@1.103 +3 -3 + ntp-4.2.8p9-PRE + + scripts/ntptrace/ntptrace.1ntptracemdoc@1.104 +2 -2 + ntp-4.2.8p9-PRE + + scripts/ntptrace/ntptrace.html@1.117 +36 -27 + ntp-4.2.8p9-PRE + + scripts/ntptrace/ntptrace.man.in@1.103 +3 -3 + ntp-4.2.8p9-PRE + + scripts/ntptrace/ntptrace.mdoc.in@1.105 +2 -2 + ntp-4.2.8p9-PRE + + scripts/plot_summary-opts@1.66 +2 -2 + ntp-4.2.8p9-PRE + + scripts/plot_summary.1plot_summaryman@1.116 +3 -3 + ntp-4.2.8p9-PRE + + scripts/plot_summary.1plot_summarymdoc@1.116 +2 -2 + ntp-4.2.8p9-PRE + + scripts/plot_summary.html@1.119 +47 -29 + ntp-4.2.8p9-PRE + + scripts/plot_summary.man.in@1.116 +3 -3 + ntp-4.2.8p9-PRE + + scripts/plot_summary.mdoc.in@1.116 +2 -2 + ntp-4.2.8p9-PRE + + scripts/summary-opts@1.65 +2 -2 + ntp-4.2.8p9-PRE + + scripts/summary.1summaryman@1.115 +3 -3 + ntp-4.2.8p9-PRE + + scripts/summary.1summarymdoc@1.115 +2 -2 + ntp-4.2.8p9-PRE + + scripts/summary.html@1.118 +39 -27 + ntp-4.2.8p9-PRE + + scripts/summary.man.in@1.115 +3 -3 + ntp-4.2.8p9-PRE + + scripts/summary.mdoc.in@1.115 +2 -2 + ntp-4.2.8p9-PRE + + scripts/update-leap/invoke-update-leap.texi@1.16 +1 -1 + ntp-4.2.8p9-PRE + + scripts/update-leap/update-leap-opts@1.16 +2 -2 + ntp-4.2.8p9-PRE + + scripts/update-leap/update-leap.1update-leapman@1.16 +3 -3 + ntp-4.2.8p9-PRE + + scripts/update-leap/update-leap.1update-leapmdoc@1.16 +2 -2 + ntp-4.2.8p9-PRE + + scripts/update-leap/update-leap.html@1.16 +59 -35 + ntp-4.2.8p9-PRE + + scripts/update-leap/update-leap.man.in@1.16 +3 -3 + ntp-4.2.8p9-PRE + + scripts/update-leap/update-leap.mdoc.in@1.16 +2 -2 + ntp-4.2.8p9-PRE + + sntp/invoke-sntp.texi@1.504 +2 -2 + ntp-4.2.8p9-PRE + + sntp/sntp-opts.c@1.523 +158 -158 + ntp-4.2.8p9-PRE + + sntp/sntp-opts.h@1.521 +3 -3 + ntp-4.2.8p9-PRE + + sntp/sntp.1sntpman@1.339 +3 -3 + ntp-4.2.8p9-PRE + + sntp/sntp.1sntpmdoc@1.339 +2 -2 + ntp-4.2.8p9-PRE + + sntp/sntp.html@1.519 +109 -85 + ntp-4.2.8p9-PRE + + sntp/sntp.man.in@1.339 +3 -3 + ntp-4.2.8p9-PRE + + sntp/sntp.mdoc.in@1.339 +2 -2 + ntp-4.2.8p9-PRE + + util/invoke-ntp-keygen.texi@1.507 +2 -2 + ntp-4.2.8p9-PRE + + util/ntp-keygen-opts.c@1.525 +172 -172 + ntp-4.2.8p9-PRE + + util/ntp-keygen-opts.h@1.523 +3 -3 + ntp-4.2.8p9-PRE + + util/ntp-keygen.1ntp-keygenman@1.335 +3 -3 + ntp-4.2.8p9-PRE + + util/ntp-keygen.1ntp-keygenmdoc@1.335 +2 -2 + ntp-4.2.8p9-PRE + + util/ntp-keygen.html@1.181 +183 -124 + ntp-4.2.8p9-PRE + + util/ntp-keygen.man.in@1.335 +3 -3 + ntp-4.2.8p9-PRE + + util/ntp-keygen.mdoc.in@1.335 +2 -2 + ntp-4.2.8p9-PRE + +ChangeSet@1.3688.4.1, 2016-10-20 19:28:06+00:00, stenn@psp-deb1.ntp.org + cleanup + + ChangeLog@1.1836.4.1 +1 -0 + cleanup + +ChangeSet@1.3686.20.1, 2016-10-20 20:13:40+02:00, perlinger@ntp.org + [Sec 3114] Broadcast Mode Replay Prevention DoS + + ChangeLog@1.1834.20.1 +4 -0 + [Sec 3114] Broadcast Mode Replay Prevention DoS + + ntpd/ntp_proto.c@1.392.2.1 +39 -6 + [Sec 3114] Broadcast Mode Replay Prevention DoS + - applied patches by Matthew Van Gundy, with some rework. + +ChangeSet@1.3686.19.1, 2016-10-20 09:21:04+02:00, perlinger@ntp.org + [Sec 3113] Broadcast Mode Poll Interval Enforcement DoS + + ChangeLog@1.1834.19.1 +4 -0 + [Sec 3113] Broadcast Mode Poll Interval Enforcement DoS *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Tue Nov 22 06:29:10 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1F8D3C4F78F; Tue, 22 Nov 2016 06:29:10 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C6A4A1EF9; Tue, 22 Nov 2016 06:29:09 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAM6T8JG080515; Tue, 22 Nov 2016 06:29:08 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAM6T87c080514; Tue, 22 Nov 2016 06:29:08 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201611220629.uAM6T87c080514@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 22 Nov 2016 06:29:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r308955 - vendor/ntp/4.2.8p9 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2016 06:29:10 -0000 Author: delphij Date: Tue Nov 22 06:29:08 2016 New Revision: 308955 URL: https://svnweb.freebsd.org/changeset/base/308955 Log: Tag ntp 4.2.8p9. Added: vendor/ntp/4.2.8p9/ - copied from r308954, vendor/ntp/dist/ From owner-svn-src-vendor@freebsd.org Tue Nov 22 11:46:23 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E9B60C4FCA2; Tue, 22 Nov 2016 11:46:23 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A1E96ACD; Tue, 22 Nov 2016 11:46:23 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAMBkMgt012231; Tue, 22 Nov 2016 11:46:22 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAMBkM47012230; Tue, 22 Nov 2016 11:46:22 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201611221146.uAMBkM47012230@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 22 Nov 2016 11:46:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r308986 - vendor/illumos/dist/lib/libzfs/common X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2016 11:46:24 -0000 Author: avg Date: Tue Nov 22 11:46:22 2016 New Revision: 308986 URL: https://svnweb.freebsd.org/changeset/base/308986 Log: 6412 zfs receive: -u can be ignored sometimes illumos/illumos-gate@9185393f2919d8b897f6142d8a9fa0429c285dc1 https://github.com/illumos/illumos-gate/commit/9185393f2919d8b897f6142d8a9fa0429c285dc1 https://www.illumos.org/issues/6412 It seems that zfs receive -F -u would mount a received filesystem after receiving a full stream if a destination filesystem already existed (and, thus, got destroyed and re-created) and was mounted. How to reproduce: $ zfs create rpool/sandbox $ zfs create rpool/sandbox/from $ zfs create rpool/sandbox/to $ zfs snap rpool/sandbox/from@snap $ zfs send rpool/sandbox/from@snap | zfs recv -v -F -u rpool/sandbox/to receiving full stream of rpool/sandbox/from@snap into rpool/sandbox/to@snap received 41.7KB stream in 1 seconds (41.7KB/sec) $ zfs get mounted rpool/sandbox/to NAME PROPERTY VALUE SOURCE rpool/tmp/sandbox/to mounted yes - This behavior can be problematic if the mountpoint property changes either because it had a non-inherited value or the stream contains properties because it has been generated with either -R or -p. Reviewed by: Matthew Ahrens Reviewed by: Paul Dagnelie Approved by: Richard Lowe Author: Andriy Gapon Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_sendrecv.c Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_sendrecv.c ============================================================================== --- vendor/illumos/dist/lib/libzfs/common/libzfs_sendrecv.c Tue Nov 22 11:44:30 2016 (r308985) +++ vendor/illumos/dist/lib/libzfs/common/libzfs_sendrecv.c Tue Nov 22 11:46:22 2016 (r308986) @@ -3533,7 +3533,8 @@ zfs_receive_one(libzfs_handle_t *hdl, in } if (clp) { - err |= changelist_postfix(clp); + if (!flags->nomount) + err |= changelist_postfix(clp); changelist_free(clp); } From owner-svn-src-vendor@freebsd.org Tue Nov 22 11:47:28 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E2C6EC4FD13; Tue, 22 Nov 2016 11:47:28 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B6BF9C3A; Tue, 22 Nov 2016 11:47:28 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAMBlRCU012313; Tue, 22 Nov 2016 11:47:27 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAMBlRI0012310; Tue, 22 Nov 2016 11:47:27 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201611221147.uAMBlRI0012310@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 22 Nov 2016 11:47:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r308987 - in vendor-sys/illumos/dist/uts/common/fs/zfs: . sys X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2016 11:47:29 -0000 Author: avg Date: Tue Nov 22 11:47:27 2016 New Revision: 308987 URL: https://svnweb.freebsd.org/changeset/base/308987 Log: 7180 potential race between zfs_suspend_fs+zfs_resume_fs and zfs_ioc_rename illumos/illumos-gate@690041b9caf801816f2d0bac90bc7cecefb73523 https://github.com/illumos/illumos-gate/commit/690041b9caf801816f2d0bac90bc7cecefb73523 https://www.illumos.org/issues/7180 If a filesystem is not unmounted while the rename is being performed, then, for example, a concurrect zfs rollback may call zfs_suspend_fs followed by zfs_resume_fs on the same filesystem. The latter takes the filesystem's name as an argument. If the filesystem name changes as a result of the rename, then dmu_objset_hold(osname, zfsvfs, &os) call in zfs_resume_fs would fail resulting in a kernel panic. So far I have been able to reproduce this problem on FreeBSD where zfs rename has -u option that skips the unmounting before doing the renaming. But I think that in theory the same problem can occur on illumos as well, because the unmounting is done in userland before invoking the rename ioctl and there could be a race with, e.g., zfs mount. panic: solaris assert: dmu_objset_hold(osname, zfsvfs, &zfsvfs->z_os) == 0 (0x2 == 0x0), file: /usr/devel/svn/head/sys/cddl/contrib/opensolaris/uts/common/fs/ zfs/zfs_vfsops.c, line: 2210 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe004df30710 vpanic() at vpanic+0x182/frame 0xfffffe004df30790 panic() at panic+0x43/frame 0xfffffe004df307f0 assfail3() at assfail3+0x2c/frame 0xfffffe004df30810 zfs_resume_fs() at zfs_resume_fs+0xb9/frame 0xfffffe004df30860 zfs_ioc_rollback() at zfs_ioc_rollback+0x61/frame 0xfffffe004df308a0 zfsdev_ioctl() at zfsdev_ioctl+0x65c/frame 0xfffffe004df30940 devfs_ioctl_f() at devfs_ioctl_f+0x156/frame 0xfffffe004df309a0 kern_ioctl() at kern_ioctl+0x246/frame 0xfffffe004df30a00 sys_ioctl() at sys_ioctl+0x171/frame 0xfffffe004df30ae0 amd64_syscall() at amd64_syscall+0x2db/frame 0xfffffe004df30bf0 Xfast_syscall() at Xfast_syscall+0xfb/frame 0xfffffe004df30bf0 Reviewed by: Matt Ahrens Reviewed by: Pavel Zakharov Approved by: Richard Lowe Author: Andriy Gapon Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zfs_vfsops.h vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_vfsops.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zfs_vfsops.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zfs_vfsops.h Tue Nov 22 11:46:22 2016 (r308986) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zfs_vfsops.h Tue Nov 22 11:47:27 2016 (r308987) @@ -137,7 +137,7 @@ typedef struct zfid_long { extern uint_t zfs_fsyncer_key; extern int zfs_suspend_fs(zfsvfs_t *zfsvfs); -extern int zfs_resume_fs(zfsvfs_t *zfsvfs, const char *osname); +extern int zfs_resume_fs(zfsvfs_t *zfsvfs, struct dsl_dataset *ds); extern int zfs_userspace_one(zfsvfs_t *zfsvfs, zfs_userquota_prop_t type, const char *domain, uint64_t rid, uint64_t *valuep); extern int zfs_userspace_many(zfsvfs_t *zfsvfs, zfs_userquota_prop_t type, Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c Tue Nov 22 11:46:22 2016 (r308986) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c Tue Nov 22 11:47:27 2016 (r308987) @@ -3645,12 +3645,15 @@ zfs_ioc_rollback(const char *fsname, nvl int error; if (getzfsvfs(fsname, &zfsvfs) == 0) { + dsl_dataset_t *ds; + + ds = dmu_objset_ds(zfsvfs->z_os); error = zfs_suspend_fs(zfsvfs); if (error == 0) { int resume_err; error = dsl_dataset_rollback(fsname, zfsvfs, outnvl); - resume_err = zfs_resume_fs(zfsvfs, fsname); + resume_err = zfs_resume_fs(zfsvfs, ds); error = error ? error : resume_err; } VFS_RELE(zfsvfs->z_vfs); @@ -4275,8 +4278,10 @@ zfs_ioc_recv(zfs_cmd_t *zc) if (getzfsvfs(tofs, &zfsvfs) == 0) { /* online recv */ + dsl_dataset_t *ds; int end_err; + ds = dmu_objset_ds(zfsvfs->z_os); error = zfs_suspend_fs(zfsvfs); /* * If the suspend fails, then the recv_end will @@ -4284,7 +4289,7 @@ zfs_ioc_recv(zfs_cmd_t *zc) */ end_err = dmu_recv_end(&drc, zfsvfs); if (error == 0) - error = zfs_resume_fs(zfsvfs, tofs); + error = zfs_resume_fs(zfsvfs, ds); error = error ? error : end_err; VFS_RELE(zfsvfs->z_vfs); } else { @@ -4808,11 +4813,14 @@ zfs_ioc_userspace_upgrade(zfs_cmd_t *zc) * objset needs to be closed & reopened (to grow the * objset_phys_t). Suspend/resume the fs will do that. */ + dsl_dataset_t *ds; + + ds = dmu_objset_ds(zfsvfs->z_os); error = zfs_suspend_fs(zfsvfs); if (error == 0) { dmu_objset_refresh_ownership(zfsvfs->z_os, zfsvfs); - error = zfs_resume_fs(zfsvfs, zc->zc_name); + error = zfs_resume_fs(zfsvfs, ds); } } if (error == 0) Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_vfsops.c Tue Nov 22 11:46:22 2016 (r308986) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_vfsops.c Tue Nov 22 11:47:27 2016 (r308987) @@ -2020,7 +2020,7 @@ zfs_suspend_fs(zfsvfs_t *zfsvfs) * zfsvfs, held, and long held on entry. */ int -zfs_resume_fs(zfsvfs_t *zfsvfs, const char *osname) +zfs_resume_fs(zfsvfs_t *zfsvfs, dsl_dataset_t *ds) { int err; znode_t *zp; @@ -2029,14 +2029,13 @@ zfs_resume_fs(zfsvfs_t *zfsvfs, const ch ASSERT(RW_WRITE_HELD(&zfsvfs->z_teardown_inactive_lock)); /* - * We already own this, so just hold and rele it to update the - * objset_t, as the one we had before may have been evicted. + * We already own this, so just update the objset_t, as the one we + * had before may have been evicted. */ objset_t *os; - VERIFY0(dmu_objset_hold(osname, zfsvfs, &os)); - VERIFY3P(os->os_dsl_dataset->ds_owner, ==, zfsvfs); - VERIFY(dsl_dataset_long_held(os->os_dsl_dataset)); - dmu_objset_rele(os, zfsvfs); + VERIFY3P(ds->ds_owner, ==, zfsvfs); + VERIFY(dsl_dataset_long_held(ds)); + VERIFY0(dmu_objset_from_ds(ds, &os)); err = zfsvfs_init(zfsvfs, os); if (err != 0) From owner-svn-src-vendor@freebsd.org Tue Nov 22 11:49:57 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 63ADAC4FDD6; Tue, 22 Nov 2016 11:49:57 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 25C7CDC8; Tue, 22 Nov 2016 11:49:57 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAMBnumo012439; Tue, 22 Nov 2016 11:49:56 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAMBnurB012436; Tue, 22 Nov 2016 11:49:56 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201611221149.uAMBnurB012436@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 22 Nov 2016 11:49:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r308988 - in vendor-sys/illumos/dist/uts/common/fs/zfs: . sys X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2016 11:49:57 -0000 Author: avg Date: Tue Nov 22 11:49:55 2016 New Revision: 308988 URL: https://svnweb.freebsd.org/changeset/base/308988 Log: 7199, 7200 dsl_dataset_rollback_sync may try to free already free blocks 7199 dsl_dataset_rollback_sync may try to free already free blocks 7200 no blocks must be born in a txg after a snaphot is created illumos/illumos-gate@bfaed0b91e57062c38bc16b4f89db3c8f0052a9b https://github.com/illumos/illumos-gate/commit/bfaed0b91e57062c38bc16b4f89db3c8f0052a9b https://www.illumos.org/issues/7199 dsl_dataset_rollback_sync may try to free already freed blocks when it calls dsl_destroy_head_sync_impl to destroy a temporary clone. That happens if a snapshot to which we are rolling back and from which the clone is created has some ZIL records. https://www.illumos.org/issues/7200 No new blocks must be born in a dataset in the same TXG after a snapshot of the dataset is taken. Those blocks would have the same blk_birth as the dataset's ds_prev_snap_txg and as such they would be presumed to belong o the snapshot while in fact they do not. All the datasets must be clean before sync tasks are run, so the described scenario may happen only if one of the sync tasks dirties the dataset and another sync task takes its snapshot. Then, there will be another sync pass because of the dirty data and the new blocks will be born in the same TXG when the data is written out. It seems that almost all of the existing sync tasks modify only MOS and do not dirty any objsets. The only exception that I've been able to identify so far is the rollback which can modify an objset when it zeroes out the objset's ZIL. Reviewed by: Matthew Ahrens Reviewed by: Brad Lewis Approved by: Gordon Ross Author: Andriy Gapon Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_pool.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_dataset.h Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c Tue Nov 22 11:47:27 2016 (r308987) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c Tue Nov 22 11:49:55 2016 (r308988) @@ -81,6 +81,8 @@ extern inline dsl_dataset_phys_t *dsl_da extern int spa_asize_inflation; +static zil_header_t zero_zil; + /* * Figure out how much of this delta should be propogated to the dsl_dir * layer. If there's a refreservation, that space has already been @@ -125,6 +127,7 @@ dsl_dataset_block_born(dsl_dataset_t *ds return; } + ASSERT3U(bp->blk_birth, >, dsl_dataset_phys(ds)->ds_prev_snap_txg); dmu_buf_will_dirty(ds->ds_dbuf, tx); mutex_enter(&ds->ds_lock); delta = parent_delta(ds, used); @@ -889,8 +892,20 @@ dsl_dataset_zero_zil(dsl_dataset_t *ds, objset_t *os; VERIFY0(dmu_objset_from_ds(ds, &os)); - bzero(&os->os_zil_header, sizeof (os->os_zil_header)); - dsl_dataset_dirty(ds, tx); + if (bcmp(&os->os_zil_header, &zero_zil, sizeof (zero_zil)) != 0) { + dsl_pool_t *dp = ds->ds_dir->dd_pool; + zio_t *zio; + + bzero(&os->os_zil_header, sizeof (os->os_zil_header)); + + zio = zio_root(dp->dp_spa, NULL, NULL, ZIO_FLAG_MUSTSUCCEED); + dsl_dataset_sync(ds, zio, tx); + VERIFY0(zio_wait(zio)); + + /* dsl_dataset_sync_done will drop this reference. */ + dmu_buf_add_ref(ds->ds_dbuf, ds); + dsl_dataset_sync_done(ds, tx); + } } uint64_t @@ -1030,8 +1045,10 @@ dsl_dataset_dirty(dsl_dataset_t *ds, dmu if (dsl_dataset_phys(ds)->ds_next_snap_obj != 0) panic("dirtying snapshot!"); - dp = ds->ds_dir->dd_pool; + /* Must not dirty a dataset in the same txg where it got snapshotted. */ + ASSERT3U(tx->tx_txg, >, dsl_dataset_phys(ds)->ds_prev_snap_txg); + dp = ds->ds_dir->dd_pool; if (txg_list_add(&dp->dp_dirty_datasets, ds, tx->tx_txg)) { /* up the hold count until we can be written out */ dmu_buf_add_ref(ds->ds_dbuf, ds); @@ -1286,8 +1303,6 @@ void dsl_dataset_snapshot_sync_impl(dsl_dataset_t *ds, const char *snapname, dmu_tx_t *tx) { - static zil_header_t zero_zil; - dsl_pool_t *dp = ds->ds_dir->dd_pool; dmu_buf_t *dbuf; dsl_dataset_phys_t *dsphys; @@ -1306,6 +1321,10 @@ dsl_dataset_snapshot_sync_impl(dsl_datas bcmp(&os->os_phys->os_zil_header, &zero_zil, sizeof (zero_zil)) == 0); + /* Should not snapshot a dirty dataset. */ + ASSERT(!txg_list_member(&ds->ds_dir->dd_pool->dp_dirty_datasets, + ds, tx->tx_txg)); + dsl_fs_ss_count_adjust(ds->ds_dir, 1, DD_FIELD_SNAPSHOT_COUNT, tx); /* @@ -1652,6 +1671,27 @@ dsl_dataset_sync(dsl_dataset_t *ds, zio_ } } +static int +deadlist_enqueue_cb(void *arg, const blkptr_t *bp, dmu_tx_t *tx) +{ + dsl_deadlist_t *dl = arg; + dsl_deadlist_insert(dl, bp, tx); + return (0); +} + +void +dsl_dataset_sync_done(dsl_dataset_t *ds, dmu_tx_t *tx) +{ + objset_t *os = ds->ds_objset; + + bplist_iterate(&ds->ds_pending_deadlist, + deadlist_enqueue_cb, &ds->ds_deadlist, tx); + + ASSERT(!dmu_objset_is_dirty(os, dmu_tx_get_txg(tx))); + + dmu_buf_rele(ds->ds_dbuf, ds); +} + static void get_clones_stat(dsl_dataset_t *ds, nvlist_t *nv) { @@ -2151,6 +2191,18 @@ dsl_dataset_rollback_check(void *arg, dm return (SET_ERROR(EINVAL)); } + /* + * No rollback to a snapshot created in the current txg, because + * the rollback may dirty the dataset and create blocks that are + * not reachable from the rootbp while having a birth txg that + * falls into the snapshot's range. + */ + if (dmu_tx_is_syncing(tx) && + dsl_dataset_phys(ds)->ds_prev_snap_txg >= tx->tx_txg) { + dsl_dataset_rele(ds, FTAG); + return (SET_ERROR(EAGAIN)); + } + /* must not have any bookmarks after the most recent snapshot */ nvlist_t *proprequest = fnvlist_alloc(); fnvlist_add_boolean(proprequest, zfs_prop_to_name(ZFS_PROP_CREATETXG)); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_pool.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_pool.c Tue Nov 22 11:47:27 2016 (r308987) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_pool.c Tue Nov 22 11:49:55 2016 (r308988) @@ -424,14 +424,6 @@ dsl_pool_mos_diduse_space(dsl_pool_t *dp mutex_exit(&dp->dp_lock); } -static int -deadlist_enqueue_cb(void *arg, const blkptr_t *bp, dmu_tx_t *tx) -{ - dsl_deadlist_t *dl = arg; - dsl_deadlist_insert(dl, bp, tx); - return (0); -} - static void dsl_pool_sync_mos(dsl_pool_t *dp, dmu_tx_t *tx) { @@ -532,11 +524,7 @@ dsl_pool_sync(dsl_pool_t *dp, uint64_t t * - release hold from dsl_dataset_dirty() */ while ((ds = list_remove_head(&synced_datasets)) != NULL) { - objset_t *os = ds->ds_objset; - bplist_iterate(&ds->ds_pending_deadlist, - deadlist_enqueue_cb, &ds->ds_deadlist, tx); - ASSERT(!dmu_objset_is_dirty(os, txg)); - dmu_buf_rele(ds->ds_dbuf, ds); + dsl_dataset_sync_done(ds, tx); } while ((dd = txg_list_remove(&dp->dp_dirty_dirs, txg)) != NULL) { dsl_dir_sync(dd, tx); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_dataset.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_dataset.h Tue Nov 22 11:47:27 2016 (r308987) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_dataset.h Tue Nov 22 11:49:55 2016 (r308988) @@ -274,6 +274,7 @@ boolean_t dsl_dataset_modified_since_sna dsl_dataset_t *snap); void dsl_dataset_sync(dsl_dataset_t *os, zio_t *zio, dmu_tx_t *tx); +void dsl_dataset_sync_done(dsl_dataset_t *os, dmu_tx_t *tx); void dsl_dataset_block_born(dsl_dataset_t *ds, const blkptr_t *bp, dmu_tx_t *tx); From owner-svn-src-vendor@freebsd.org Tue Nov 22 11:50:54 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2F8C7C4FFC4; Tue, 22 Nov 2016 11:50:54 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D4049F69; Tue, 22 Nov 2016 11:50:53 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAMBoqe5013247; Tue, 22 Nov 2016 11:50:52 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAMBoqJg013246; Tue, 22 Nov 2016 11:50:52 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201611221150.uAMBoqJg013246@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 22 Nov 2016 11:50:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r308989 - vendor/illumos/dist/lib/libzfs/common X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2016 11:50:54 -0000 Author: avg Date: Tue Nov 22 11:50:52 2016 New Revision: 308989 URL: https://svnweb.freebsd.org/changeset/base/308989 Log: 6428 set canmount=off on unmounted filesystem tries to unmount children illumos/illumos-gate@c079fa4d202eff15e318131c52755d214ffa2da7 https://github.com/illumos/illumos-gate/commit/c079fa4d202eff15e318131c52755d214ffa2da7 https://www.illumos.org/issues/6428 Scenario: $ zfs create rpool/p $ zfs set canmount=noauto rpool/p $ zfs umount rpool/p $ zfs create rpool/p/c $ zfs get -r mounted,canmount rpool/p NAME PROPERTY VALUE SOURCE rpool/p mounted no - rpool/p canmount noauto local rpool/p/c mounted yes - rpool/p/c canmount on default In another shell ensure that rpool/p/c is in use, for example: $ cd /rpool/p/c Then: $ zfs set canmount=off rpool/p cannot unmount '/rpool/p/c': Device busy But there is no reason to try to unmount rpool/p/c in this scenario. Reviewed by: Matthew Ahrens Approved by: Gordon Ross Author: Andriy Gapon Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c Tue Nov 22 11:49:55 2016 (r308988) +++ vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c Tue Nov 22 11:50:52 2016 (r308989) @@ -1597,8 +1597,9 @@ zfs_prop_set_list(zfs_handle_t *zhp, nvl * its canmount property to 'on' or 'noauto'. We only use * the changelist logic to unmount when setting canmount=off. */ - if (!(prop == ZFS_PROP_CANMOUNT && - fnvpair_value_uint64(elem) != ZFS_CANMOUNT_OFF)) { + if (prop != ZFS_PROP_CANMOUNT || + (fnvpair_value_uint64(elem) == ZFS_CANMOUNT_OFF && + zfs_is_mounted(zhp, NULL))) { cls[cl_idx] = changelist_gather(zhp, prop, 0, 0); if (cls[cl_idx] == NULL) goto error; From owner-svn-src-vendor@freebsd.org Tue Nov 22 11:51:56 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E3FF6C4F06D; Tue, 22 Nov 2016 11:51:56 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9BA1A1309; Tue, 22 Nov 2016 11:51:56 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAMBptn9013970; Tue, 22 Nov 2016 11:51:55 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAMBpt3s013969; Tue, 22 Nov 2016 11:51:55 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201611221151.uAMBpt3s013969@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 22 Nov 2016 11:51:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r308990 - vendor-sys/illumos/dist/uts/common/fs/zfs X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2016 11:51:57 -0000 Author: avg Date: Tue Nov 22 11:51:55 2016 New Revision: 308990 URL: https://svnweb.freebsd.org/changeset/base/308990 Log: 7181 race between zfs_mount and zfs_ioc_rollback illumos/illumos-gate@90f2c094b3822f4825f21cef2c2faf7d03b55139 https://github.com/illumos/illumos-gate/commit/90f2c094b3822f4825f21cef2c2faf7d03b55139 https://www.illumos.org/issues/7181 zfsvfs_setup() is called in both zfs_mount and zfs_resume_fs paths. dmu_objset_set_user(zfsvfs->z_os, zfsvfs) is called early in zfsvfs_setup() before the setup is actually completed, thus an under-constructed zfsvfs becomes visible. Additionally, there is nothing to serialize the two call paths. As a result two threads can step on each other's toes. assertion failed: zilog->zl_clean_taskq == NULL, file: ../../common/fs/zfs/zil.c, line: 1772 > $c vpanic() 0xfffffffffbdf6928() zil_open+0x45(ffffff1bbc5dd000, fffffffff7993880) zfsvfs_setup+0x84(ffffffb378d77000, 0) zfs_resume_fs+0x132(ffffffb378d77000, ffffffb37ddcf000) zfs_ioc_rollback+0x96(ffffffb37ddcf000, ffffff01dcdc4cd0, ffffff01aa091000) zfsdev_ioctl+0x215(10a00000000, 5a19, 80465f8, 100003, ffffff01ab318368, ffffff0004b59e58) cdev_ioctl+0x39(10a00000000, 5a19, 80465f8, 100003, ffffff01ab318368, ffffff0004b59e58) spec_ioctl+0x60(ffffff0197737700, 5a19, 80465f8, 100003, ffffff01ab318368, ffffff0004b59e58) fop_ioctl+0x55(ffffff0197737700, 5a19, 80465f8, 100003, ffffff01ab318368, ffffff0004b59e58) ioctl+0x9b(7, 5a19, 80465f8) sys_syscall32+0x1f7() > ffffff1bbc5dd000::print objset_t os_zil os_zil = 0xffffff1c053cf7c0 > 0xffffff1c053cf7c0::print zilog_t zl_clean_taskq Reviewed by: Matthew Ahrens Approved by: Gordon Ross Author: Andriy Gapon Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_vfsops.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_vfsops.c Tue Nov 22 11:50:52 2016 (r308989) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_vfsops.c Tue Nov 22 11:51:55 2016 (r308990) @@ -1019,13 +1019,6 @@ zfsvfs_setup(zfsvfs_t *zfsvfs, boolean_t if (error) return (error); - /* - * Set the objset user_ptr to track its zfsvfs. - */ - mutex_enter(&zfsvfs->z_os->os_user_ptr_lock); - dmu_objset_set_user(zfsvfs->z_os, zfsvfs); - mutex_exit(&zfsvfs->z_os->os_user_ptr_lock); - zfsvfs->z_log = zil_open(zfsvfs->z_os, zfs_get_data); /* @@ -1086,6 +1079,13 @@ zfsvfs_setup(zfsvfs_t *zfsvfs, boolean_t zfsvfs->z_vfs->vfs_flag |= readonly; /* restore readonly bit */ } + /* + * Set the objset user_ptr to track its zfsvfs. + */ + mutex_enter(&zfsvfs->z_os->os_user_ptr_lock); + dmu_objset_set_user(zfsvfs->z_os, zfsvfs); + mutex_exit(&zfsvfs->z_os->os_user_ptr_lock); + return (0); } From owner-svn-src-vendor@freebsd.org Fri Nov 25 19:06:03 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B11C0C5412D; Fri, 25 Nov 2016 19:06:03 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 55876E50; Fri, 25 Nov 2016 19:06:03 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAPJ626M071716; Fri, 25 Nov 2016 19:06:02 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAPJ60lh071692; Fri, 25 Nov 2016 19:06:00 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201611251906.uAPJ60lh071692@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 25 Nov 2016 19:06:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r309152 - in vendor/llvm/dist: . include/llvm/Analysis include/llvm/ExecutionEngine include/llvm/IR lib/Analysis lib/CodeGen lib/Linker lib/Support/Unix lib/Target/ARM lib/Target/ARM/As... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2016 19:06:03 -0000 Author: dim Date: Fri Nov 25 19:05:59 2016 New Revision: 309152 URL: https://svnweb.freebsd.org/changeset/base/309152 Log: Vendor import of llvm release_39 branch r287912: https://llvm.org/svn/llvm-project/llvm/branches/release_39@287912 Added: vendor/llvm/dist/test/Analysis/LoopAccessAnalysis/memcheck-off-by-one-error.ll vendor/llvm/dist/test/CodeGen/PowerPC/atomic-minmax.ll vendor/llvm/dist/test/CodeGen/PowerPC/pr30451.ll vendor/llvm/dist/test/CodeGen/X86/branchfolding-undef.mir vendor/llvm/dist/test/CodeGen/X86/no-and8ri8.ll vendor/llvm/dist/test/CodeGen/X86/pr30298.ll vendor/llvm/dist/test/LTO/X86/Inputs/type-mapping-src.ll vendor/llvm/dist/test/LTO/X86/type-mapping-bug.ll vendor/llvm/dist/test/MC/ARM/ldr-pseudo-wide.s (contents, props changed) vendor/llvm/dist/test/ThinLTO/X86/Inputs/crash_debuginfo.ll vendor/llvm/dist/test/ThinLTO/X86/Inputs/import_opaque_type.ll vendor/llvm/dist/test/ThinLTO/X86/crash_debuginfo.ll vendor/llvm/dist/test/ThinLTO/X86/import_opaque_type.ll vendor/llvm/dist/test/Transforms/GVN/2016-08-30-MaskedScatterGather.ll vendor/llvm/dist/test/Transforms/JumpThreading/pr27840.ll Modified: vendor/llvm/dist/CMakeLists.txt vendor/llvm/dist/include/llvm/Analysis/LoopAccessAnalysis.h vendor/llvm/dist/include/llvm/ExecutionEngine/RTDyldMemoryManager.h vendor/llvm/dist/include/llvm/IR/Intrinsics.td vendor/llvm/dist/include/llvm/IR/TypeFinder.h vendor/llvm/dist/lib/Analysis/LoopAccessAnalysis.cpp vendor/llvm/dist/lib/CodeGen/BranchFolding.cpp vendor/llvm/dist/lib/Linker/IRMover.cpp vendor/llvm/dist/lib/Support/Unix/Signals.inc vendor/llvm/dist/lib/Target/ARM/ARMInstrThumb2.td vendor/llvm/dist/lib/Target/ARM/AsmParser/ARMAsmParser.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCISelLowering.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCISelLowering.h vendor/llvm/dist/lib/Target/PowerPC/PPCInstr64Bit.td vendor/llvm/dist/lib/Target/PowerPC/PPCInstrInfo.td vendor/llvm/dist/lib/Target/X86/X86ISelLowering.cpp vendor/llvm/dist/lib/Target/X86/X86InstrAVX512.td vendor/llvm/dist/lib/Transforms/Scalar/JumpThreading.cpp vendor/llvm/dist/test/Analysis/LoopAccessAnalysis/number-of-memchecks.ll vendor/llvm/dist/test/Analysis/LoopAccessAnalysis/reverse-memcheck-bounds.ll vendor/llvm/dist/test/CodeGen/PowerPC/p9-xxinsertw-xxextractuw.ll vendor/llvm/dist/test/CodeGen/X86/avx-vbroadcast.ll vendor/llvm/dist/test/Transforms/LoopVectorize/runtime-check-readonly.ll vendor/llvm/dist/test/Transforms/LoopVectorize/tbaa-nodep.ll vendor/llvm/dist/test/Transforms/LoopVersioningLICM/loopversioningLICM1.ll Modified: vendor/llvm/dist/CMakeLists.txt ============================================================================== --- vendor/llvm/dist/CMakeLists.txt Fri Nov 25 18:57:14 2016 (r309151) +++ vendor/llvm/dist/CMakeLists.txt Fri Nov 25 19:05:59 2016 (r309152) @@ -27,7 +27,7 @@ if(NOT DEFINED LLVM_VERSION_MINOR) set(LLVM_VERSION_MINOR 9) endif() if(NOT DEFINED LLVM_VERSION_PATCH) - set(LLVM_VERSION_PATCH 0) + set(LLVM_VERSION_PATCH 1) endif() if(NOT DEFINED LLVM_VERSION_SUFFIX) set(LLVM_VERSION_SUFFIX "") Modified: vendor/llvm/dist/include/llvm/Analysis/LoopAccessAnalysis.h ============================================================================== --- vendor/llvm/dist/include/llvm/Analysis/LoopAccessAnalysis.h Fri Nov 25 18:57:14 2016 (r309151) +++ vendor/llvm/dist/include/llvm/Analysis/LoopAccessAnalysis.h Fri Nov 25 19:05:59 2016 (r309152) @@ -334,9 +334,11 @@ public: struct PointerInfo { /// Holds the pointer value that we need to check. TrackingVH PointerValue; - /// Holds the pointer value at the beginning of the loop. + /// Holds the smallest byte address accessed by the pointer throughout all + /// iterations of the loop. const SCEV *Start; - /// Holds the pointer value at the end of the loop. + /// Holds the largest byte address accessed by the pointer throughout all + /// iterations of the loop, plus 1. const SCEV *End; /// Holds the information if this pointer is used for writing to memory. bool IsWritePtr; Modified: vendor/llvm/dist/include/llvm/ExecutionEngine/RTDyldMemoryManager.h ============================================================================== --- vendor/llvm/dist/include/llvm/ExecutionEngine/RTDyldMemoryManager.h Fri Nov 25 18:57:14 2016 (r309151) +++ vendor/llvm/dist/include/llvm/ExecutionEngine/RTDyldMemoryManager.h Fri Nov 25 19:05:59 2016 (r309152) @@ -72,7 +72,7 @@ public: } void deregisterEHFrames(uint8_t *Addr, uint64_t LoadAddr, size_t Size) override { - registerEHFramesInProcess(Addr, Size); + deregisterEHFramesInProcess(Addr, Size); } /// This method returns the address of the specified function or variable in Modified: vendor/llvm/dist/include/llvm/IR/Intrinsics.td ============================================================================== --- vendor/llvm/dist/include/llvm/IR/Intrinsics.td Fri Nov 25 18:57:14 2016 (r309151) +++ vendor/llvm/dist/include/llvm/IR/Intrinsics.td Fri Nov 25 19:05:59 2016 (r309152) @@ -668,13 +668,12 @@ def int_masked_gather: Intrinsic<[llvm_a [LLVMVectorOfPointersToElt<0>, llvm_i32_ty, LLVMVectorSameWidth<0, llvm_i1_ty>, LLVMMatchType<0>], - [IntrReadMem, IntrArgMemOnly]>; + [IntrReadMem]>; def int_masked_scatter: Intrinsic<[], [llvm_anyvector_ty, LLVMVectorOfPointersToElt<0>, llvm_i32_ty, - LLVMVectorSameWidth<0, llvm_i1_ty>], - [IntrArgMemOnly]>; + LLVMVectorSameWidth<0, llvm_i1_ty>]>; // Test whether a pointer is associated with a type metadata identifier. def int_type_test : Intrinsic<[llvm_i1_ty], [llvm_ptr_ty, llvm_metadata_ty], Modified: vendor/llvm/dist/include/llvm/IR/TypeFinder.h ============================================================================== --- vendor/llvm/dist/include/llvm/IR/TypeFinder.h Fri Nov 25 18:57:14 2016 (r309151) +++ vendor/llvm/dist/include/llvm/IR/TypeFinder.h Fri Nov 25 19:05:59 2016 (r309152) @@ -59,6 +59,8 @@ public: StructType *&operator[](unsigned Idx) { return StructTypes[Idx]; } + DenseSet &getVisitedMetadata() { return VisitedMetadata; } + private: /// incorporateType - This method adds the type to the list of used /// structures if it's not in there already. Modified: vendor/llvm/dist/lib/Analysis/LoopAccessAnalysis.cpp ============================================================================== --- vendor/llvm/dist/lib/Analysis/LoopAccessAnalysis.cpp Fri Nov 25 18:57:14 2016 (r309151) +++ vendor/llvm/dist/lib/Analysis/LoopAccessAnalysis.cpp Fri Nov 25 19:05:59 2016 (r309152) @@ -148,6 +148,19 @@ const SCEV *llvm::replaceSymbolicStrideS return OrigSCEV; } +/// Calculate Start and End points of memory access. +/// Let's assume A is the first access and B is a memory access on N-th loop +/// iteration. Then B is calculated as: +/// B = A + Step*N . +/// Step value may be positive or negative. +/// N is a calculated back-edge taken count: +/// N = (TripCount > 0) ? RoundDown(TripCount -1 , VF) : 0 +/// Start and End points are calculated in the following way: +/// Start = UMIN(A, B) ; End = UMAX(A, B) + SizeOfElt, +/// where SizeOfElt is the size of single memory access in bytes. +/// +/// There is no conflict when the intervals are disjoint: +/// NoConflict = (P2.Start >= P1.End) || (P1.Start >= P2.End) void RuntimePointerChecking::insert(Loop *Lp, Value *Ptr, bool WritePtr, unsigned DepSetId, unsigned ASId, const ValueToValueMap &Strides, @@ -176,12 +189,17 @@ void RuntimePointerChecking::insert(Loop if (CStep->getValue()->isNegative()) std::swap(ScStart, ScEnd); } else { - // Fallback case: the step is not constant, but the we can still + // Fallback case: the step is not constant, but we can still // get the upper and lower bounds of the interval by using min/max // expressions. ScStart = SE->getUMinExpr(ScStart, ScEnd); ScEnd = SE->getUMaxExpr(AR->getStart(), ScEnd); } + // Add the size of the pointed element to ScEnd. + unsigned EltSize = + Ptr->getType()->getPointerElementType()->getScalarSizeInBits() / 8; + const SCEV *EltSizeSCEV = SE->getConstant(ScEnd->getType(), EltSize); + ScEnd = SE->getAddExpr(ScEnd, EltSizeSCEV); } Pointers.emplace_back(Ptr, ScStart, ScEnd, WritePtr, DepSetId, ASId, Sc); @@ -1863,9 +1881,17 @@ std::pair Value *End0 = ChkBuilder.CreateBitCast(A.End, PtrArithTy1, "bc"); Value *End1 = ChkBuilder.CreateBitCast(B.End, PtrArithTy0, "bc"); - Value *Cmp0 = ChkBuilder.CreateICmpULE(Start0, End1, "bound0"); + // [A|B].Start points to the first accessed byte under base [A|B]. + // [A|B].End points to the last accessed byte, plus one. + // There is no conflict when the intervals are disjoint: + // NoConflict = (B.Start >= A.End) || (A.Start >= B.End) + // + // bound0 = (B.Start < A.End) + // bound1 = (A.Start < B.End) + // IsConflict = bound0 & bound1 + Value *Cmp0 = ChkBuilder.CreateICmpULT(Start0, End1, "bound0"); FirstInst = getFirstInst(FirstInst, Cmp0, Loc); - Value *Cmp1 = ChkBuilder.CreateICmpULE(Start1, End0, "bound1"); + Value *Cmp1 = ChkBuilder.CreateICmpULT(Start1, End0, "bound1"); FirstInst = getFirstInst(FirstInst, Cmp1, Loc); Value *IsConflict = ChkBuilder.CreateAnd(Cmp0, Cmp1, "found.conflict"); FirstInst = getFirstInst(FirstInst, IsConflict, Loc); Modified: vendor/llvm/dist/lib/CodeGen/BranchFolding.cpp ============================================================================== --- vendor/llvm/dist/lib/CodeGen/BranchFolding.cpp Fri Nov 25 18:57:14 2016 (r309151) +++ vendor/llvm/dist/lib/CodeGen/BranchFolding.cpp Fri Nov 25 19:05:59 2016 (r309152) @@ -776,9 +776,8 @@ bool BranchFolder::CreateCommonTailOnlyB } static void -mergeMMOsFromMemoryOperations(MachineBasicBlock::iterator MBBIStartPos, - MachineBasicBlock &MBBCommon) { - // Merge MMOs from memory operations in the common block. +mergeOperations(MachineBasicBlock::iterator MBBIStartPos, + MachineBasicBlock &MBBCommon) { MachineBasicBlock *MBB = MBBIStartPos->getParent(); // Note CommonTailLen does not necessarily matches the size of // the common BB nor all its instructions because of debug @@ -808,8 +807,18 @@ mergeMMOsFromMemoryOperations(MachineBas "Reached BB end within common tail length!"); assert(MBBICommon->isIdenticalTo(*MBBI) && "Expected matching MIIs!"); + // Merge MMOs from memory operations in the common block. if (MBBICommon->mayLoad() || MBBICommon->mayStore()) MBBICommon->setMemRefs(MBBICommon->mergeMemRefsWith(*MBBI)); + // Drop undef flags if they aren't present in all merged instructions. + for (unsigned I = 0, E = MBBICommon->getNumOperands(); I != E; ++I) { + MachineOperand &MO = MBBICommon->getOperand(I); + if (MO.isReg() && MO.isUndef()) { + const MachineOperand &OtherMO = MBBI->getOperand(I); + if (!OtherMO.isUndef()) + MO.setIsUndef(false); + } + } ++MBBI; ++MBBICommon; @@ -928,8 +937,8 @@ bool BranchFolder::TryTailMergeBlocks(Ma continue; DEBUG(dbgs() << "BB#" << SameTails[i].getBlock()->getNumber() << (i == e-1 ? "" : ", ")); - // Merge MMOs from memory operations as needed. - mergeMMOsFromMemoryOperations(SameTails[i].getTailStartPos(), *MBB); + // Merge operations (MMOs, undef flags) + mergeOperations(SameTails[i].getTailStartPos(), *MBB); // Hack the end off BB i, making it jump to BB commonTailIndex instead. ReplaceTailWithBranchTo(SameTails[i].getTailStartPos(), MBB); // BB i is no longer a predecessor of SuccBB; remove it from the worklist. Modified: vendor/llvm/dist/lib/Linker/IRMover.cpp ============================================================================== --- vendor/llvm/dist/lib/Linker/IRMover.cpp Fri Nov 25 18:57:14 2016 (r309151) +++ vendor/llvm/dist/lib/Linker/IRMover.cpp Fri Nov 25 19:05:59 2016 (r309152) @@ -694,6 +694,14 @@ void IRLinker::computeTypeMapping() { if (!ST->hasName()) continue; + if (TypeMap.DstStructTypesSet.hasType(ST)) { + // This is actually a type from the destination module. + // getIdentifiedStructTypes() can have found it by walking debug info + // metadata nodes, some of which get linked by name when ODR Type Uniquing + // is enabled on the Context, from the source to the destination module. + continue; + } + // Check to see if there is a dot in the name followed by a digit. size_t DotPos = ST->getName().rfind('.'); if (DotPos == 0 || DotPos == StringRef::npos || @@ -1336,13 +1344,19 @@ bool IRMover::IdentifiedStructTypeSet::h IRMover::IRMover(Module &M) : Composite(M) { TypeFinder StructTypes; - StructTypes.run(M, true); + StructTypes.run(M, /* OnlyNamed */ false); for (StructType *Ty : StructTypes) { if (Ty->isOpaque()) IdentifiedStructTypes.addOpaque(Ty); else IdentifiedStructTypes.addNonOpaque(Ty); } + // Self-map metadatas in the destination module. This is needed when + // DebugTypeODRUniquing is enabled on the LLVMContext, since metadata in the + // destination module may be reached from the source module. + for (auto *MD : StructTypes.getVisitedMetadata()) { + SharedMDs[MD].reset(const_cast(MD)); + } } Error IRMover::move( Modified: vendor/llvm/dist/lib/Support/Unix/Signals.inc ============================================================================== --- vendor/llvm/dist/lib/Support/Unix/Signals.inc Fri Nov 25 18:57:14 2016 (r309151) +++ vendor/llvm/dist/lib/Support/Unix/Signals.inc Fri Nov 25 19:05:59 2016 (r309152) @@ -412,7 +412,7 @@ void llvm::sys::PrintStackTrace(raw_ostr if (printSymbolizedStackTrace(Argv0, StackTrace, depth, OS)) return; -#if HAVE_DLFCN_H && __GNUG__ +#if HAVE_DLFCN_H && __GNUG__ && !defined(__CYGWIN__) int width = 0; for (int i = 0; i < depth; ++i) { Dl_info dlinfo; Modified: vendor/llvm/dist/lib/Target/ARM/ARMInstrThumb2.td ============================================================================== --- vendor/llvm/dist/lib/Target/ARM/ARMInstrThumb2.td Fri Nov 25 18:57:14 2016 (r309151) +++ vendor/llvm/dist/lib/Target/ARM/ARMInstrThumb2.td Fri Nov 25 19:05:59 2016 (r309152) @@ -4819,6 +4819,10 @@ def : t2InstAlias<"add${p} $Rd, pc, $imm def t2LDRConstPool : t2AsmPseudo<"ldr${p} $Rt, $immediate", (ins GPRnopc:$Rt, const_pool_asm_imm:$immediate, pred:$p)>; +// Version w/ the .w suffix. +def : t2InstAlias<"ldr${p}.w $Rt, $immediate", + (t2LDRConstPool GPRnopc:$Rt, + const_pool_asm_imm:$immediate, pred:$p)>; // PLD/PLDW/PLI with alternate literal form. def : t2InstAlias<"pld${p} $addr", Modified: vendor/llvm/dist/lib/Target/ARM/AsmParser/ARMAsmParser.cpp ============================================================================== --- vendor/llvm/dist/lib/Target/ARM/AsmParser/ARMAsmParser.cpp Fri Nov 25 18:57:14 2016 (r309151) +++ vendor/llvm/dist/lib/Target/ARM/AsmParser/ARMAsmParser.cpp Fri Nov 25 19:05:59 2016 (r309152) @@ -6933,6 +6933,9 @@ bool ARMAsmParser::processInstruction(MC else if (Inst.getOpcode() == ARM::t2LDRConstPool) TmpInst.setOpcode(ARM::t2LDRpci); const ARMOperand &PoolOperand = + (static_cast(*Operands[2]).isToken() && + static_cast(*Operands[2]).getToken() == ".w") ? + static_cast(*Operands[4]) : static_cast(*Operands[3]); const MCExpr *SubExprVal = PoolOperand.getConstantPoolImm(); // If SubExprVal is a constant we may be able to use a MOV Modified: vendor/llvm/dist/lib/Target/PowerPC/PPCISelLowering.cpp ============================================================================== --- vendor/llvm/dist/lib/Target/PowerPC/PPCISelLowering.cpp Fri Nov 25 18:57:14 2016 (r309151) +++ vendor/llvm/dist/lib/Target/PowerPC/PPCISelLowering.cpp Fri Nov 25 19:05:59 2016 (r309152) @@ -665,9 +665,10 @@ PPCTargetLowering::PPCTargetLowering(con addRegisterClass(MVT::v2i64, &PPC::VRRCRegClass); addRegisterClass(MVT::v1i128, &PPC::VRRCRegClass); } + if (Subtarget.hasP9Vector()) { - setOperationAction(ISD::INSERT_VECTOR_ELT, MVT::v4i32, Legal); - setOperationAction(ISD::INSERT_VECTOR_ELT, MVT::v4f32, Legal); + setOperationAction(ISD::INSERT_VECTOR_ELT, MVT::v4i32, Custom); + setOperationAction(ISD::INSERT_VECTOR_ELT, MVT::v4f32, Custom); } } @@ -7846,6 +7847,17 @@ SDValue PPCTargetLowering::LowerSCALAR_T return DAG.getLoad(Op.getValueType(), dl, Store, FIdx, MachinePointerInfo()); } +SDValue PPCTargetLowering::LowerINSERT_VECTOR_ELT(SDValue Op, + SelectionDAG &DAG) const { + assert(Op.getOpcode() == ISD::INSERT_VECTOR_ELT && + "Should only be called for ISD::INSERT_VECTOR_ELT"); + ConstantSDNode *C = dyn_cast(Op.getOperand(2)); + // We have legal lowering for constant indices but not for variable ones. + if (C) + return Op; + return SDValue(); +} + SDValue PPCTargetLowering::LowerEXTRACT_VECTOR_ELT(SDValue Op, SelectionDAG &DAG) const { SDLoc dl(Op); @@ -8248,6 +8260,7 @@ SDValue PPCTargetLowering::LowerOperatio case ISD::SCALAR_TO_VECTOR: return LowerSCALAR_TO_VECTOR(Op, DAG); case ISD::SIGN_EXTEND_INREG: return LowerSIGN_EXTEND_INREG(Op, DAG); case ISD::EXTRACT_VECTOR_ELT: return LowerEXTRACT_VECTOR_ELT(Op, DAG); + case ISD::INSERT_VECTOR_ELT: return LowerINSERT_VECTOR_ELT(Op, DAG); case ISD::MUL: return LowerMUL(Op, DAG); // For counter-based loop handling. @@ -8372,7 +8385,9 @@ Instruction* PPCTargetLowering::emitTrai MachineBasicBlock * PPCTargetLowering::EmitAtomicBinary(MachineInstr &MI, MachineBasicBlock *BB, unsigned AtomicSize, - unsigned BinOpcode) const { + unsigned BinOpcode, + unsigned CmpOpcode, + unsigned CmpPred) const { // This also handles ATOMIC_SWAP, indicated by BinOpcode==0. const TargetInstrInfo *TII = Subtarget.getInstrInfo(); @@ -8412,8 +8427,12 @@ PPCTargetLowering::EmitAtomicBinary(Mach DebugLoc dl = MI.getDebugLoc(); MachineBasicBlock *loopMBB = F->CreateMachineBasicBlock(LLVM_BB); + MachineBasicBlock *loop2MBB = + CmpOpcode ? F->CreateMachineBasicBlock(LLVM_BB) : nullptr; MachineBasicBlock *exitMBB = F->CreateMachineBasicBlock(LLVM_BB); F->insert(It, loopMBB); + if (CmpOpcode) + F->insert(It, loop2MBB); F->insert(It, exitMBB); exitMBB->splice(exitMBB->begin(), BB, std::next(MachineBasicBlock::iterator(MI)), BB->end()); @@ -8435,11 +8454,40 @@ PPCTargetLowering::EmitAtomicBinary(Mach // st[wd]cx. r0, ptr // bne- loopMBB // fallthrough --> exitMBB + + // For max/min... + // loopMBB: + // l[wd]arx dest, ptr + // cmpl?[wd] incr, dest + // bgt exitMBB + // loop2MBB: + // st[wd]cx. dest, ptr + // bne- loopMBB + // fallthrough --> exitMBB + BB = loopMBB; BuildMI(BB, dl, TII->get(LoadMnemonic), dest) .addReg(ptrA).addReg(ptrB); if (BinOpcode) BuildMI(BB, dl, TII->get(BinOpcode), TmpReg).addReg(incr).addReg(dest); + if (CmpOpcode) { + // Signed comparisons of byte or halfword values must be sign-extended. + if (CmpOpcode == PPC::CMPW && AtomicSize < 4) { + unsigned ExtReg = RegInfo.createVirtualRegister(&PPC::GPRCRegClass); + BuildMI(BB, dl, TII->get(AtomicSize == 1 ? PPC::EXTSB : PPC::EXTSH), + ExtReg).addReg(dest); + BuildMI(BB, dl, TII->get(CmpOpcode), PPC::CR0) + .addReg(incr).addReg(ExtReg); + } else + BuildMI(BB, dl, TII->get(CmpOpcode), PPC::CR0) + .addReg(incr).addReg(dest); + + BuildMI(BB, dl, TII->get(PPC::BCC)) + .addImm(CmpPred).addReg(PPC::CR0).addMBB(exitMBB); + BB->addSuccessor(loop2MBB); + BB->addSuccessor(exitMBB); + BB = loop2MBB; + } BuildMI(BB, dl, TII->get(StoreMnemonic)) .addReg(TmpReg).addReg(ptrA).addReg(ptrB); BuildMI(BB, dl, TII->get(PPC::BCC)) @@ -8457,10 +8505,13 @@ MachineBasicBlock * PPCTargetLowering::EmitPartwordAtomicBinary(MachineInstr &MI, MachineBasicBlock *BB, bool is8bit, // operation - unsigned BinOpcode) const { + unsigned BinOpcode, + unsigned CmpOpcode, + unsigned CmpPred) const { // If we support part-word atomic mnemonics, just use them if (Subtarget.hasPartwordAtomics()) - return EmitAtomicBinary(MI, BB, is8bit ? 1 : 2, BinOpcode); + return EmitAtomicBinary(MI, BB, is8bit ? 1 : 2, BinOpcode, + CmpOpcode, CmpPred); // This also handles ATOMIC_SWAP, indicated by BinOpcode==0. const TargetInstrInfo *TII = Subtarget.getInstrInfo(); @@ -8482,8 +8533,12 @@ PPCTargetLowering::EmitPartwordAtomicBin DebugLoc dl = MI.getDebugLoc(); MachineBasicBlock *loopMBB = F->CreateMachineBasicBlock(LLVM_BB); + MachineBasicBlock *loop2MBB = + CmpOpcode ? F->CreateMachineBasicBlock(LLVM_BB) : nullptr; MachineBasicBlock *exitMBB = F->CreateMachineBasicBlock(LLVM_BB); F->insert(It, loopMBB); + if (CmpOpcode) + F->insert(It, loop2MBB); F->insert(It, exitMBB); exitMBB->splice(exitMBB->begin(), BB, std::next(MachineBasicBlock::iterator(MI)), BB->end()); @@ -8568,6 +8623,32 @@ PPCTargetLowering::EmitPartwordAtomicBin .addReg(TmpDestReg).addReg(MaskReg); BuildMI(BB, dl, TII->get(is64bit ? PPC::AND8 : PPC::AND), Tmp3Reg) .addReg(TmpReg).addReg(MaskReg); + if (CmpOpcode) { + // For unsigned comparisons, we can directly compare the shifted values. + // For signed comparisons we shift and sign extend. + unsigned SReg = RegInfo.createVirtualRegister(RC); + BuildMI(BB, dl, TII->get(is64bit ? PPC::AND8 : PPC::AND), SReg) + .addReg(TmpDestReg).addReg(MaskReg); + unsigned ValueReg = SReg; + unsigned CmpReg = Incr2Reg; + if (CmpOpcode == PPC::CMPW) { + ValueReg = RegInfo.createVirtualRegister(RC); + BuildMI(BB, dl, TII->get(PPC::SRW), ValueReg) + .addReg(SReg).addReg(ShiftReg); + unsigned ValueSReg = RegInfo.createVirtualRegister(RC); + BuildMI(BB, dl, TII->get(is8bit ? PPC::EXTSB : PPC::EXTSH), ValueSReg) + .addReg(ValueReg); + ValueReg = ValueSReg; + CmpReg = incr; + } + BuildMI(BB, dl, TII->get(CmpOpcode), PPC::CR0) + .addReg(CmpReg).addReg(ValueReg); + BuildMI(BB, dl, TII->get(PPC::BCC)) + .addImm(CmpPred).addReg(PPC::CR0).addMBB(exitMBB); + BB->addSuccessor(loop2MBB); + BB->addSuccessor(exitMBB); + BB = loop2MBB; + } BuildMI(BB, dl, TII->get(is64bit ? PPC::OR8 : PPC::OR), Tmp4Reg) .addReg(Tmp3Reg).addReg(Tmp2Reg); BuildMI(BB, dl, TII->get(PPC::STWCX)) @@ -9074,6 +9155,42 @@ PPCTargetLowering::EmitInstrWithCustomIn else if (MI.getOpcode() == PPC::ATOMIC_LOAD_SUB_I64) BB = EmitAtomicBinary(MI, BB, 8, PPC::SUBF8); + else if (MI.getOpcode() == PPC::ATOMIC_LOAD_MIN_I8) + BB = EmitPartwordAtomicBinary(MI, BB, true, 0, PPC::CMPW, PPC::PRED_GE); + else if (MI.getOpcode() == PPC::ATOMIC_LOAD_MIN_I16) + BB = EmitPartwordAtomicBinary(MI, BB, false, 0, PPC::CMPW, PPC::PRED_GE); + else if (MI.getOpcode() == PPC::ATOMIC_LOAD_MIN_I32) + BB = EmitAtomicBinary(MI, BB, 4, 0, PPC::CMPW, PPC::PRED_GE); + else if (MI.getOpcode() == PPC::ATOMIC_LOAD_MIN_I64) + BB = EmitAtomicBinary(MI, BB, 8, 0, PPC::CMPD, PPC::PRED_GE); + + else if (MI.getOpcode() == PPC::ATOMIC_LOAD_MAX_I8) + BB = EmitPartwordAtomicBinary(MI, BB, true, 0, PPC::CMPW, PPC::PRED_LE); + else if (MI.getOpcode() == PPC::ATOMIC_LOAD_MAX_I16) + BB = EmitPartwordAtomicBinary(MI, BB, false, 0, PPC::CMPW, PPC::PRED_LE); + else if (MI.getOpcode() == PPC::ATOMIC_LOAD_MAX_I32) + BB = EmitAtomicBinary(MI, BB, 4, 0, PPC::CMPW, PPC::PRED_LE); + else if (MI.getOpcode() == PPC::ATOMIC_LOAD_MAX_I64) + BB = EmitAtomicBinary(MI, BB, 8, 0, PPC::CMPD, PPC::PRED_LE); + + else if (MI.getOpcode() == PPC::ATOMIC_LOAD_UMIN_I8) + BB = EmitPartwordAtomicBinary(MI, BB, true, 0, PPC::CMPLW, PPC::PRED_GE); + else if (MI.getOpcode() == PPC::ATOMIC_LOAD_UMIN_I16) + BB = EmitPartwordAtomicBinary(MI, BB, false, 0, PPC::CMPLW, PPC::PRED_GE); + else if (MI.getOpcode() == PPC::ATOMIC_LOAD_UMIN_I32) + BB = EmitAtomicBinary(MI, BB, 4, 0, PPC::CMPLW, PPC::PRED_GE); + else if (MI.getOpcode() == PPC::ATOMIC_LOAD_UMIN_I64) + BB = EmitAtomicBinary(MI, BB, 8, 0, PPC::CMPLD, PPC::PRED_GE); + + else if (MI.getOpcode() == PPC::ATOMIC_LOAD_UMAX_I8) + BB = EmitPartwordAtomicBinary(MI, BB, true, 0, PPC::CMPLW, PPC::PRED_LE); + else if (MI.getOpcode() == PPC::ATOMIC_LOAD_UMAX_I16) + BB = EmitPartwordAtomicBinary(MI, BB, false, 0, PPC::CMPLW, PPC::PRED_LE); + else if (MI.getOpcode() == PPC::ATOMIC_LOAD_UMAX_I32) + BB = EmitAtomicBinary(MI, BB, 4, 0, PPC::CMPLW, PPC::PRED_LE); + else if (MI.getOpcode() == PPC::ATOMIC_LOAD_UMAX_I64) + BB = EmitAtomicBinary(MI, BB, 8, 0, PPC::CMPLD, PPC::PRED_LE); + else if (MI.getOpcode() == PPC::ATOMIC_SWAP_I8) BB = EmitPartwordAtomicBinary(MI, BB, true, 0); else if (MI.getOpcode() == PPC::ATOMIC_SWAP_I16) Modified: vendor/llvm/dist/lib/Target/PowerPC/PPCISelLowering.h ============================================================================== --- vendor/llvm/dist/lib/Target/PowerPC/PPCISelLowering.h Fri Nov 25 18:57:14 2016 (r309151) +++ vendor/llvm/dist/lib/Target/PowerPC/PPCISelLowering.h Fri Nov 25 19:05:59 2016 (r309152) @@ -585,11 +585,15 @@ namespace llvm { MachineBasicBlock *EmitAtomicBinary(MachineInstr &MI, MachineBasicBlock *MBB, unsigned AtomicSize, - unsigned BinOpcode) const; + unsigned BinOpcode, + unsigned CmpOpcode = 0, + unsigned CmpPred = 0) const; MachineBasicBlock *EmitPartwordAtomicBinary(MachineInstr &MI, MachineBasicBlock *MBB, bool is8bit, - unsigned Opcode) const; + unsigned Opcode, + unsigned CmpOpcode = 0, + unsigned CmpPred = 0) const; MachineBasicBlock *emitEHSjLjSetJmp(MachineInstr &MI, MachineBasicBlock *MBB) const; @@ -824,6 +828,7 @@ namespace llvm { SDValue LowerSRA_PARTS(SDValue Op, SelectionDAG &DAG) const; SDValue LowerBUILD_VECTOR(SDValue Op, SelectionDAG &DAG) const; SDValue LowerVECTOR_SHUFFLE(SDValue Op, SelectionDAG &DAG) const; + SDValue LowerINSERT_VECTOR_ELT(SDValue Op, SelectionDAG &DAG) const; SDValue LowerEXTRACT_VECTOR_ELT(SDValue Op, SelectionDAG &DAG) const; SDValue LowerINTRINSIC_WO_CHAIN(SDValue Op, SelectionDAG &DAG) const; SDValue LowerSCALAR_TO_VECTOR(SDValue Op, SelectionDAG &DAG) const; Modified: vendor/llvm/dist/lib/Target/PowerPC/PPCInstr64Bit.td ============================================================================== --- vendor/llvm/dist/lib/Target/PowerPC/PPCInstr64Bit.td Fri Nov 25 18:57:14 2016 (r309151) +++ vendor/llvm/dist/lib/Target/PowerPC/PPCInstr64Bit.td Fri Nov 25 19:05:59 2016 (r309152) @@ -224,6 +224,18 @@ let usesCustomInserter = 1 in { def ATOMIC_LOAD_NAND_I64 : Pseudo< (outs g8rc:$dst), (ins memrr:$ptr, g8rc:$incr), "#ATOMIC_LOAD_NAND_I64", [(set i64:$dst, (atomic_load_nand_64 xoaddr:$ptr, i64:$incr))]>; + def ATOMIC_LOAD_MIN_I64 : Pseudo< + (outs g8rc:$dst), (ins memrr:$ptr, g8rc:$incr), "#ATOMIC_LOAD_MIN_I64", + [(set i64:$dst, (atomic_load_min_64 xoaddr:$ptr, i64:$incr))]>; + def ATOMIC_LOAD_MAX_I64 : Pseudo< + (outs g8rc:$dst), (ins memrr:$ptr, g8rc:$incr), "#ATOMIC_LOAD_MAX_I64", + [(set i64:$dst, (atomic_load_max_64 xoaddr:$ptr, i64:$incr))]>; + def ATOMIC_LOAD_UMIN_I64 : Pseudo< + (outs g8rc:$dst), (ins memrr:$ptr, g8rc:$incr), "#ATOMIC_LOAD_UMIN_I64", + [(set i64:$dst, (atomic_load_umin_64 xoaddr:$ptr, i64:$incr))]>; + def ATOMIC_LOAD_UMAX_I64 : Pseudo< + (outs g8rc:$dst), (ins memrr:$ptr, g8rc:$incr), "#ATOMIC_LOAD_UMAX_I64", + [(set i64:$dst, (atomic_load_umax_64 xoaddr:$ptr, i64:$incr))]>; def ATOMIC_CMP_SWAP_I64 : Pseudo< (outs g8rc:$dst), (ins memrr:$ptr, g8rc:$old, g8rc:$new), "#ATOMIC_CMP_SWAP_I64", Modified: vendor/llvm/dist/lib/Target/PowerPC/PPCInstrInfo.td ============================================================================== --- vendor/llvm/dist/lib/Target/PowerPC/PPCInstrInfo.td Fri Nov 25 18:57:14 2016 (r309151) +++ vendor/llvm/dist/lib/Target/PowerPC/PPCInstrInfo.td Fri Nov 25 19:05:59 2016 (r309152) @@ -1509,6 +1509,18 @@ let usesCustomInserter = 1 in { def ATOMIC_LOAD_NAND_I8 : Pseudo< (outs gprc:$dst), (ins memrr:$ptr, gprc:$incr), "#ATOMIC_LOAD_NAND_I8", [(set i32:$dst, (atomic_load_nand_8 xoaddr:$ptr, i32:$incr))]>; + def ATOMIC_LOAD_MIN_I8 : Pseudo< + (outs gprc:$dst), (ins memrr:$ptr, gprc:$incr), "#ATOMIC_LOAD_MIN_I8", + [(set i32:$dst, (atomic_load_min_8 xoaddr:$ptr, i32:$incr))]>; + def ATOMIC_LOAD_MAX_I8 : Pseudo< + (outs gprc:$dst), (ins memrr:$ptr, gprc:$incr), "#ATOMIC_LOAD_MAX_I8", + [(set i32:$dst, (atomic_load_max_8 xoaddr:$ptr, i32:$incr))]>; + def ATOMIC_LOAD_UMIN_I8 : Pseudo< + (outs gprc:$dst), (ins memrr:$ptr, gprc:$incr), "#ATOMIC_LOAD_UMIN_I8", + [(set i32:$dst, (atomic_load_umin_8 xoaddr:$ptr, i32:$incr))]>; + def ATOMIC_LOAD_UMAX_I8 : Pseudo< + (outs gprc:$dst), (ins memrr:$ptr, gprc:$incr), "#ATOMIC_LOAD_UMAX_I8", + [(set i32:$dst, (atomic_load_umax_8 xoaddr:$ptr, i32:$incr))]>; def ATOMIC_LOAD_ADD_I16 : Pseudo< (outs gprc:$dst), (ins memrr:$ptr, gprc:$incr), "#ATOMIC_LOAD_ADD_I16", [(set i32:$dst, (atomic_load_add_16 xoaddr:$ptr, i32:$incr))]>; @@ -1527,6 +1539,18 @@ let usesCustomInserter = 1 in { def ATOMIC_LOAD_NAND_I16 : Pseudo< (outs gprc:$dst), (ins memrr:$ptr, gprc:$incr), "#ATOMIC_LOAD_NAND_I16", [(set i32:$dst, (atomic_load_nand_16 xoaddr:$ptr, i32:$incr))]>; + def ATOMIC_LOAD_MIN_I16 : Pseudo< + (outs gprc:$dst), (ins memrr:$ptr, gprc:$incr), "#ATOMIC_LOAD_MIN_I16", + [(set i32:$dst, (atomic_load_min_16 xoaddr:$ptr, i32:$incr))]>; + def ATOMIC_LOAD_MAX_I16 : Pseudo< + (outs gprc:$dst), (ins memrr:$ptr, gprc:$incr), "#ATOMIC_LOAD_MAX_I16", + [(set i32:$dst, (atomic_load_max_16 xoaddr:$ptr, i32:$incr))]>; + def ATOMIC_LOAD_UMIN_I16 : Pseudo< + (outs gprc:$dst), (ins memrr:$ptr, gprc:$incr), "#ATOMIC_LOAD_UMIN_I16", + [(set i32:$dst, (atomic_load_umin_16 xoaddr:$ptr, i32:$incr))]>; + def ATOMIC_LOAD_UMAX_I16 : Pseudo< + (outs gprc:$dst), (ins memrr:$ptr, gprc:$incr), "#ATOMIC_LOAD_UMAX_I16", + [(set i32:$dst, (atomic_load_umax_16 xoaddr:$ptr, i32:$incr))]>; def ATOMIC_LOAD_ADD_I32 : Pseudo< (outs gprc:$dst), (ins memrr:$ptr, gprc:$incr), "#ATOMIC_LOAD_ADD_I32", [(set i32:$dst, (atomic_load_add_32 xoaddr:$ptr, i32:$incr))]>; @@ -1545,6 +1569,18 @@ let usesCustomInserter = 1 in { def ATOMIC_LOAD_NAND_I32 : Pseudo< (outs gprc:$dst), (ins memrr:$ptr, gprc:$incr), "#ATOMIC_LOAD_NAND_I32", [(set i32:$dst, (atomic_load_nand_32 xoaddr:$ptr, i32:$incr))]>; + def ATOMIC_LOAD_MIN_I32 : Pseudo< + (outs gprc:$dst), (ins memrr:$ptr, gprc:$incr), "#ATOMIC_LOAD_MIN_I32", + [(set i32:$dst, (atomic_load_min_32 xoaddr:$ptr, i32:$incr))]>; + def ATOMIC_LOAD_MAX_I32 : Pseudo< + (outs gprc:$dst), (ins memrr:$ptr, gprc:$incr), "#ATOMIC_LOAD_MAX_I32", + [(set i32:$dst, (atomic_load_max_32 xoaddr:$ptr, i32:$incr))]>; + def ATOMIC_LOAD_UMIN_I32 : Pseudo< + (outs gprc:$dst), (ins memrr:$ptr, gprc:$incr), "#ATOMIC_LOAD_UMIN_I32", + [(set i32:$dst, (atomic_load_umin_32 xoaddr:$ptr, i32:$incr))]>; + def ATOMIC_LOAD_UMAX_I32 : Pseudo< + (outs gprc:$dst), (ins memrr:$ptr, gprc:$incr), "#ATOMIC_LOAD_UMAX_I32", + [(set i32:$dst, (atomic_load_umax_32 xoaddr:$ptr, i32:$incr))]>; def ATOMIC_CMP_SWAP_I8 : Pseudo< (outs gprc:$dst), (ins memrr:$ptr, gprc:$old, gprc:$new), "#ATOMIC_CMP_SWAP_I8", Modified: vendor/llvm/dist/lib/Target/X86/X86ISelLowering.cpp ============================================================================== --- vendor/llvm/dist/lib/Target/X86/X86ISelLowering.cpp Fri Nov 25 18:57:14 2016 (r309151) +++ vendor/llvm/dist/lib/Target/X86/X86ISelLowering.cpp Fri Nov 25 19:05:59 2016 (r309152) @@ -8656,6 +8656,17 @@ static SDValue lowerVectorShuffleAsBroad V = DAG.getLoad(SVT, DL, Ld->getChain(), NewAddr, DAG.getMachineFunction().getMachineMemOperand( Ld->getMemOperand(), Offset, SVT.getStoreSize())); + + // Make sure the newly-created LOAD is in the same position as Ld in + // terms of dependency. We create a TokenFactor for Ld and V, + // and update uses of Ld's output chain to use the TokenFactor. + if (Ld->hasAnyUseOfValue(1)) { + SDValue NewChain = DAG.getNode(ISD::TokenFactor, DL, MVT::Other, + SDValue(Ld, 1), SDValue(V.getNode(), 1)); + DAG.ReplaceAllUsesOfValueWith(SDValue(Ld, 1), NewChain); + DAG.UpdateNodeOperands(NewChain.getNode(), SDValue(Ld, 1), + SDValue(V.getNode(), 1)); + } } else if (!BroadcastFromReg) { // We can't broadcast from a vector register. return SDValue(); @@ -27516,7 +27527,8 @@ static SDValue reduceVMULWidth(SDNode *N const X86Subtarget &Subtarget) { // pmulld is supported since SSE41. It is better to use pmulld // instead of pmullw+pmulhw. - if (Subtarget.hasSSE41()) + // pmullw/pmulhw are not supported by SSE. + if (Subtarget.hasSSE41() || !Subtarget.hasSSE2()) return SDValue(); ShrinkMode Mode; Modified: vendor/llvm/dist/lib/Target/X86/X86InstrAVX512.td ============================================================================== --- vendor/llvm/dist/lib/Target/X86/X86InstrAVX512.td Fri Nov 25 18:57:14 2016 (r309151) +++ vendor/llvm/dist/lib/Target/X86/X86InstrAVX512.td Fri Nov 25 19:05:59 2016 (r309152) @@ -2124,7 +2124,7 @@ let Predicates = [HasAVX512] in { (COPY_TO_REGCLASS (i16 (EXTRACT_SUBREG $src, sub_16bit)), VK1)>; def : Pat<(i1 (trunc (i8 GR8:$src))), - (COPY_TO_REGCLASS (i16 (SUBREG_TO_REG (i64 0), (AND8ri8 $src, (i8 1)), + (COPY_TO_REGCLASS (i16 (SUBREG_TO_REG (i64 0), (AND8ri $src, (i8 1)), sub_8bit)), VK1)>; def : Pat<(i1 (trunc (i8 (assertzext_i1 GR8:$src)))), Modified: vendor/llvm/dist/lib/Transforms/Scalar/JumpThreading.cpp ============================================================================== --- vendor/llvm/dist/lib/Transforms/Scalar/JumpThreading.cpp Fri Nov 25 18:57:14 2016 (r309151) +++ vendor/llvm/dist/lib/Transforms/Scalar/JumpThreading.cpp Fri Nov 25 19:05:59 2016 (r309152) @@ -1322,6 +1322,10 @@ bool JumpThreadingPass::ProcessBranchOnX if (!isa(BB->front())) return false; + // If this BB is a landing pad, we won't be able to split the edge into it. + if (BB->isEHPad()) + return false; + // If we have a xor as the branch input to this block, and we know that the // LHS or RHS of the xor in any predecessor is true/false, then we can clone // the condition into the predecessor and fix that value to true, saving some Added: vendor/llvm/dist/test/Analysis/LoopAccessAnalysis/memcheck-off-by-one-error.ll ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm/dist/test/Analysis/LoopAccessAnalysis/memcheck-off-by-one-error.ll Fri Nov 25 19:05:59 2016 (r309152) @@ -0,0 +1,51 @@ +; RUN: opt -analyze --loop-accesses %s | FileCheck %s + +; This test verifies run-time boundary check of memory accesses. +; The original loop: +; void fastCopy(const char* src, char* op) { +; int len = 32; +; while (len > 0) { +; *(reinterpret_cast(op)) = *(reinterpret_cast(src)); +; src += 8; +; op += 8; +; len -= 8; +; } +; } +; Boundaries calculations before this patch: +; (Low: %src High: (24 + %src)) +; and the actual distance between two pointers was 31, (%op - %src = 31) +; IsConflict = (24 > 31) = false -> execution is directed to the vectorized loop. +; The loop was vectorized to 4, 32 byte memory access ( <4 x i64> ), +; store a value at *%op touched memory under *%src. + +;CHECK: Printing analysis 'Loop Access Analysis' for function 'fastCopy' +;CHECK: (Low: %op High: (32 + %op)) +;CHECK: (Low: %src High: (32 + %src)) + +define void @fastCopy(i8* nocapture readonly %src, i8* nocapture %op) { +entry: + br label %while.body.preheader + +while.body.preheader: ; preds = %entry + br label %while.body + +while.body: ; preds = %while.body.preheader, %while.body + %len.addr.07 = phi i32 [ %sub, %while.body ], [ 32, %while.body.preheader ] + %op.addr.06 = phi i8* [ %add.ptr1, %while.body ], [ %op, %while.body.preheader ] + %src.addr.05 = phi i8* [ %add.ptr, %while.body ], [ %src, %while.body.preheader ] + %0 = bitcast i8* %src.addr.05 to i64* + %1 = load i64, i64* %0, align 8 + %2 = bitcast i8* %op.addr.06 to i64* + store i64 %1, i64* %2, align 8 + %add.ptr = getelementptr inbounds i8, i8* %src.addr.05, i64 8 + %add.ptr1 = getelementptr inbounds i8, i8* %op.addr.06, i64 8 + %sub = add nsw i32 %len.addr.07, -8 + %cmp = icmp sgt i32 %len.addr.07, 8 + br i1 %cmp, label %while.body, label %while.end.loopexit + +while.end.loopexit: ; preds = %while.body + br label %while.end + +while.end: ; preds = %while.end.loopexit, %entry + ret void +} Modified: vendor/llvm/dist/test/Analysis/LoopAccessAnalysis/number-of-memchecks.ll ============================================================================== --- vendor/llvm/dist/test/Analysis/LoopAccessAnalysis/number-of-memchecks.ll Fri Nov 25 18:57:14 2016 (r309151) +++ vendor/llvm/dist/test/Analysis/LoopAccessAnalysis/number-of-memchecks.ll Fri Nov 25 19:05:59 2016 (r309152) @@ -96,15 +96,15 @@ for.end: ; CHECK-NEXT: %arrayidxB = getelementptr inbounds i16, i16* %b, i64 %ind ; CHECK-NEXT: Grouped accesses: ; CHECK-NEXT: Group {{.*}}[[ZERO]]: -; CHECK-NEXT: (Low: %c High: (78 + %c)) +; CHECK-NEXT: (Low: %c High: (80 + %c)) ; CHECK-NEXT: Member: {(2 + %c),+,4} ; CHECK-NEXT: Member: {%c,+,4} ; CHECK-NEXT: Group {{.*}}[[ONE]]: -; CHECK-NEXT: (Low: %a High: (40 + %a)) +; CHECK-NEXT: (Low: %a High: (42 + %a)) ; CHECK-NEXT: Member: {(2 + %a),+,2} ; CHECK-NEXT: Member: {%a,+,2} ; CHECK-NEXT: Group {{.*}}[[TWO]]: -; CHECK-NEXT: (Low: %b High: (38 + %b)) +; CHECK-NEXT: (Low: %b High: (40 + %b)) ; CHECK-NEXT: Member: {%b,+,2} define void @testg(i16* %a, @@ -168,15 +168,15 @@ for.end: ; CHECK-NEXT: %arrayidxB = getelementptr i16, i16* %b, i64 %ind ; CHECK-NEXT: Grouped accesses: ; CHECK-NEXT: Group {{.*}}[[ZERO]]: -; CHECK-NEXT: (Low: %c High: (78 + %c)) +; CHECK-NEXT: (Low: %c High: (80 + %c)) ; CHECK-NEXT: Member: {(2 + %c),+,4} ; CHECK-NEXT: Member: {%c,+,4} ; CHECK-NEXT: Group {{.*}}[[ONE]]: -; CHECK-NEXT: (Low: %a High: (40 + %a)) +; CHECK-NEXT: (Low: %a High: (42 + %a)) ; CHECK-NEXT: Member: {(2 + %a),+,2} ; CHECK-NEXT: Member: {%a,+,2} ; CHECK-NEXT: Group {{.*}}[[TWO]]: -; CHECK-NEXT: (Low: %b High: (38 + %b)) +; CHECK-NEXT: (Low: %b High: (40 + %b)) ; CHECK-NEXT: Member: {%b,+,2} define void @testh(i16* %a, @@ -247,13 +247,13 @@ for.end: ; CHECK-NEXT: %arrayidxA2 = getelementptr i16, i16* %a, i64 %ind2 ; CHECK-NEXT: Grouped accesses: ; CHECK-NEXT: Group {{.*}}[[ZERO]]: -; CHECK-NEXT: (Low: ((2 * %offset) + %a) High: (9998 + (2 * %offset) + %a)) +; CHECK-NEXT: (Low: ((2 * %offset) + %a) High: (10000 + (2 * %offset) + %a)) ; CHECK-NEXT: Member: {((2 * %offset) + %a),+,2}<%for.body> ; CHECK-NEXT: Group {{.*}}[[ONE]]: -; CHECK-NEXT: (Low: %a High: (9998 + %a)) +; CHECK-NEXT: (Low: %a High: (10000 + %a)) ; CHECK-NEXT: Member: {%a,+,2}<%for.body> ; CHECK-NEXT: Group {{.*}}[[TWO]]: -; CHECK-NEXT: (Low: (20000 + %a) High: (29998 + %a)) +; CHECK-NEXT: (Low: (20000 + %a) High: (30000 + %a)) ; CHECK-NEXT: Member: {(20000 + %a),+,2}<%for.body> define void @testi(i16* %a, Modified: vendor/llvm/dist/test/Analysis/LoopAccessAnalysis/reverse-memcheck-bounds.ll ============================================================================== --- vendor/llvm/dist/test/Analysis/LoopAccessAnalysis/reverse-memcheck-bounds.ll Fri Nov 25 18:57:14 2016 (r309151) +++ vendor/llvm/dist/test/Analysis/LoopAccessAnalysis/reverse-memcheck-bounds.ll Fri Nov 25 19:05:59 2016 (r309152) @@ -16,7 +16,7 @@ target datalayout = "e-m:e-i64:64-i128:1 target triple = "aarch64--linux-gnueabi" ; CHECK: function 'f': -; CHECK: (Low: (20000 + %a) High: (60000 + %a)) +; CHECK: (Low: (20000 + %a) High: (60004 + %a)) @B = common global i32* null, align 8 @A = common global i32* null, align 8 @@ -59,7 +59,7 @@ for.end: ; Here it is not obvious what the limits are, since 'step' could be negative. ; CHECK: Low: (-1 + (-1 * ((-60001 + (-1 * %a)) umax (-60001 + (40000 * %step) + (-1 * %a))))) -; CHECK: High: ((60000 + %a) umax (60000 + (-40000 * %step) + %a)) +; CHECK: High: (4 + ((60000 + %a) umax (60000 + (-40000 * %step) + %a))) define void @g(i64 %step) { entry: Added: vendor/llvm/dist/test/CodeGen/PowerPC/atomic-minmax.ll ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm/dist/test/CodeGen/PowerPC/atomic-minmax.ll Fri Nov 25 19:05:59 2016 (r309152) @@ -0,0 +1,435 @@ +; RUN: llc < %s | FileCheck %s +target datalayout = "E-m:e-i64:64-n32:64" +target triple = "powerpc64-unknown-linux-gnu" + +define void @a32min(i32* nocapture dereferenceable(4) %minimum, i32 %val) #0 { +entry: + %0 = atomicrmw min i32* %minimum, i32 %val monotonic + ret void + +; CHECK-LABEL: @a32min +; CHECK: lwarx [[OLDV:[0-9]+]], 0, 3 +; CHECK: cmpw 4, [[OLDV]] +; CHECK: bgelr 0 +; CHECK: stwcx. 4, 0, 3 +; CHECK: bne 0, +; CHECK: blr +} + +define void @a32max(i32* nocapture dereferenceable(4) %minimum, i32 %val) #0 { +entry: + %0 = atomicrmw max i32* %minimum, i32 %val monotonic + ret void + +; CHECK-LABEL: @a32max +; CHECK: lwarx [[OLDV:[0-9]+]], 0, 3 +; CHECK: cmpw 4, [[OLDV]] +; CHECK: blelr 0 +; CHECK: stwcx. 4, 0, 3 +; CHECK: bne 0, +; CHECK: blr +} + +define void @a32umin(i32* nocapture dereferenceable(4) %minimum, i32 %val) #0 { +entry: + %0 = atomicrmw umin i32* %minimum, i32 %val monotonic + ret void + +; CHECK-LABEL: @a32umin +; CHECK: lwarx [[OLDV:[0-9]+]], 0, 3 +; CHECK: cmplw 4, [[OLDV]] +; CHECK: bgelr 0 +; CHECK: stwcx. 4, 0, 3 +; CHECK: bne 0, +; CHECK: blr +} + +define void @a32umax(i32* nocapture dereferenceable(4) %minimum, i32 %val) #0 { +entry: + %0 = atomicrmw umax i32* %minimum, i32 %val monotonic + ret void + +; CHECK-LABEL: @a32umax +; CHECK: lwarx [[OLDV:[0-9]+]], 0, 3 +; CHECK: cmplw 4, [[OLDV]] +; CHECK: blelr 0 +; CHECK: stwcx. 4, 0, 3 +; CHECK: bne 0, +; CHECK: blr +} + +define void @a16min(i16* nocapture dereferenceable(4) %minimum, i16 %val) #1 { +entry: + %0 = atomicrmw min i16* %minimum, i16 %val monotonic + ret void + +; CHECK-LABEL: @a16min +; CHECK: lharx [[OLDV:[0-9]+]], 0, 3 +; CHECK: cmpw 4, [[OLDV]] +; CHECK: bgelr 0 +; CHECK: sthcx. 4, 0, 3 +; CHECK: bne 0, +; CHECK: blr +} + +define void @a16max(i16* nocapture dereferenceable(4) %minimum, i16 %val) #1 { +entry: + %0 = atomicrmw max i16* %minimum, i16 %val monotonic + ret void + +; CHECK-LABEL: @a16max +; CHECK: lharx [[OLDV:[0-9]+]], 0, 3 +; CHECK: cmpw 4, [[OLDV]] +; CHECK: blelr 0 +; CHECK: sthcx. 4, 0, 3 +; CHECK: bne 0, +; CHECK: blr +} + +define void @a16umin(i16* nocapture dereferenceable(4) %minimum, i16 %val) #1 { +entry: + %0 = atomicrmw umin i16* %minimum, i16 %val monotonic + ret void + +; CHECK-LABEL: @a16umin +; CHECK: lharx [[OLDV:[0-9]+]], 0, 3 +; CHECK: cmplw 4, [[OLDV]] +; CHECK: bgelr 0 +; CHECK: sthcx. 4, 0, 3 +; CHECK: bne 0, +; CHECK: blr +} + +define void @a16umax(i16* nocapture dereferenceable(4) %minimum, i16 %val) #1 { +entry: + %0 = atomicrmw umax i16* %minimum, i16 %val monotonic + ret void + +; CHECK-LABEL: @a16umax +; CHECK: lharx [[OLDV:[0-9]+]], 0, 3 +; CHECK: cmplw 4, [[OLDV]] +; CHECK: blelr 0 +; CHECK: sthcx. 4, 0, 3 +; CHECK: bne 0, +; CHECK: blr +} + +define void @a8min(i8* nocapture dereferenceable(4) %minimum, i8 %val) #1 { +entry: + %0 = atomicrmw min i8* %minimum, i8 %val monotonic + ret void + +; CHECK-LABEL: @a8min +; CHECK: lbarx [[OLDV:[0-9]+]], 0, 3 +; CHECK: cmpw 4, [[OLDV]] +; CHECK: bgelr 0 +; CHECK: stbcx. 4, 0, 3 +; CHECK: bne 0, +; CHECK: blr +} + +define void @a8max(i8* nocapture dereferenceable(4) %minimum, i8 %val) #1 { +entry: + %0 = atomicrmw max i8* %minimum, i8 %val monotonic + ret void + +; CHECK-LABEL: @a8max +; CHECK: lbarx [[OLDV:[0-9]+]], 0, 3 +; CHECK: cmpw 4, [[OLDV]] +; CHECK: blelr 0 +; CHECK: stbcx. 4, 0, 3 +; CHECK: bne 0, +; CHECK: blr +} + +define void @a8umin(i8* nocapture dereferenceable(4) %minimum, i8 %val) #1 { +entry: + %0 = atomicrmw umin i8* %minimum, i8 %val monotonic + ret void + +; CHECK-LABEL: @a8umin +; CHECK: lbarx [[OLDV:[0-9]+]], 0, 3 +; CHECK: cmplw 4, [[OLDV]] +; CHECK: bgelr 0 +; CHECK: stbcx. 4, 0, 3 +; CHECK: bne 0, +; CHECK: blr +} + +define void @a8umax(i8* nocapture dereferenceable(4) %minimum, i8 %val) #1 { +entry: + %0 = atomicrmw umax i8* %minimum, i8 %val monotonic + ret void + +; CHECK-LABEL: @a8umax +; CHECK: lbarx [[OLDV:[0-9]+]], 0, 3 +; CHECK: cmplw 4, [[OLDV]] +; CHECK: blelr 0 +; CHECK: stbcx. 4, 0, 3 +; CHECK: bne 0, +; CHECK: blr +} + +define void @a64min(i64* nocapture dereferenceable(4) %minimum, i64 %val) #0 { +entry: + %0 = atomicrmw min i64* %minimum, i64 %val monotonic + ret void + +; CHECK-LABEL: @a64min +; CHECK: ldarx [[OLDV:[0-9]+]], 0, 3 +; CHECK: cmpd 4, [[OLDV]] +; CHECK: bgelr 0 +; CHECK: stdcx. 4, 0, 3 +; CHECK: bne 0, +; CHECK: blr +} + +define void @a64max(i64* nocapture dereferenceable(4) %minimum, i64 %val) #0 { +entry: + %0 = atomicrmw max i64* %minimum, i64 %val monotonic + ret void + +; CHECK-LABEL: @a64max +; CHECK: ldarx [[OLDV:[0-9]+]], 0, 3 +; CHECK: cmpd 4, [[OLDV]] +; CHECK: blelr 0 +; CHECK: stdcx. 4, 0, 3 +; CHECK: bne 0, +; CHECK: blr +} + +define void @a64umin(i64* nocapture dereferenceable(4) %minimum, i64 %val) #0 { +entry: + %0 = atomicrmw umin i64* %minimum, i64 %val monotonic + ret void + +; CHECK-LABEL: @a64umin +; CHECK: ldarx [[OLDV:[0-9]+]], 0, 3 +; CHECK: cmpld 4, [[OLDV]] +; CHECK: bgelr 0 +; CHECK: stdcx. 4, 0, 3 +; CHECK: bne 0, +; CHECK: blr +} + +define void @a64umax(i64* nocapture dereferenceable(4) %minimum, i64 %val) #0 { +entry: + %0 = atomicrmw umax i64* %minimum, i64 %val monotonic + ret void + +; CHECK-LABEL: @a64umax +; CHECK: ldarx [[OLDV:[0-9]+]], 0, 3 +; CHECK: cmpld 4, [[OLDV]] +; CHECK: blelr 0 +; CHECK: stdcx. 4, 0, 3 +; CHECK: bne 0, +; CHECK: blr +} + +define void @ae16min(i16* nocapture dereferenceable(4) %minimum, i16 %val) #0 { +entry: + %0 = atomicrmw min i16* %minimum, i16 %val monotonic + ret void + +; CHECK-LABEL: @ae16min +; CHECK-DAG: rlwinm [[SA1:[0-9]+]], 3, 3, 27, 27 +; CHECK-DAG: li [[M1:[0-9]+]], 0 +; CHECK-DAG: rldicr 3, 3, 0, 61 +; CHECK-DAG: xori [[SA:[0-9]+]], [[SA1]], 16 +; CHECK-DAG: ori [[M2:[0-9]+]], [[M1]], 65535 +; CHECK-DAG: slw [[SV:[0-9]+]], 4, [[SA]] +; CHECK-DAG: slw [[M:[0-9]+]], [[M2]], [[SA]] +; CHECK-DAG: and [[SMV:[0-9]+]], [[SV]], [[M]] +; CHECK: lwarx [[OLDV:[0-9]+]], 0, 3 +; CHECK: and [[MOLDV:[0-9]+]], [[OLDV]], [[M]] +; CHECK: srw [[SMOLDV:[0-9]+]], [[MOLDV]], [[SA]] +; CHECK: extsh [[SESMOLDV:[0-9]+]], [[SMOLDV]] +; CHECK: cmpw 0, 4, [[SESMOLDV]] *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Fri Nov 25 19:06:25 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 95C57C5417A; Fri, 25 Nov 2016 19:06:25 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 44F22F9F; Fri, 25 Nov 2016 19:06:25 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAPJ6Ocp071775; Fri, 25 Nov 2016 19:06:24 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAPJ6O7F071774; Fri, 25 Nov 2016 19:06:24 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201611251906.uAPJ6O7F071774@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 25 Nov 2016 19:06:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r309153 - vendor/llvm/llvm-release_3939-r287912 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2016 19:06:25 -0000 Author: dim Date: Fri Nov 25 19:06:24 2016 New Revision: 309153 URL: https://svnweb.freebsd.org/changeset/base/309153 Log: Tag llvm release_39 branch r287912. Added: vendor/llvm/llvm-release_3939-r287912/ - copied from r309152, vendor/llvm/dist/ From owner-svn-src-vendor@freebsd.org Fri Nov 25 19:07:44 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DADADC54282; Fri, 25 Nov 2016 19:07:44 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 91587198; Fri, 25 Nov 2016 19:07:44 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAPJ7hNi071881; Fri, 25 Nov 2016 19:07:43 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAPJ7fp2071857; Fri, 25 Nov 2016 19:07:41 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201611251907.uAPJ7fp2071857@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 25 Nov 2016 19:07:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r309154 - in vendor/clang/dist: include/clang/AST include/clang/Basic include/clang/Sema lib/Basic lib/CodeGen lib/Driver lib/Sema lib/Serialization test/CodeGenCXX test/CodeGenOpenCL t... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2016 19:07:45 -0000 Author: dim Date: Fri Nov 25 19:07:40 2016 New Revision: 309154 URL: https://svnweb.freebsd.org/changeset/base/309154 Log: Vendor import of clang release_39 branch r287912: https://llvm.org/svn/llvm-project/cfe/branches/release_39@287912 Added: vendor/clang/dist/test/CodeGenCXX/PR28523.cpp (contents, props changed) vendor/clang/dist/test/CodeGenOpenCL/kernel-arg-info-single-as.cl vendor/clang/dist/test/Modules/Inputs/static_assert/ vendor/clang/dist/test/Modules/Inputs/static_assert/a.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/static_assert/module.modulemap vendor/clang/dist/test/Modules/static_assert.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/debug-info-openmp-array.cpp (contents, props changed) Modified: vendor/clang/dist/include/clang/AST/DeclTemplate.h vendor/clang/dist/include/clang/Basic/DiagnosticDriverKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td vendor/clang/dist/include/clang/Sema/Sema.h vendor/clang/dist/lib/Basic/Targets.cpp vendor/clang/dist/lib/Basic/Version.cpp vendor/clang/dist/lib/CodeGen/CGExpr.cpp vendor/clang/dist/lib/CodeGen/CGStmt.cpp vendor/clang/dist/lib/CodeGen/CGStmtOpenMP.cpp vendor/clang/dist/lib/CodeGen/CodeGenFunction.cpp vendor/clang/dist/lib/CodeGen/CodeGenFunction.h vendor/clang/dist/lib/Driver/ToolChains.cpp vendor/clang/dist/lib/Driver/Tools.cpp vendor/clang/dist/lib/Sema/Sema.cpp vendor/clang/dist/lib/Sema/SemaCXXScopeSpec.cpp vendor/clang/dist/lib/Sema/SemaDecl.cpp vendor/clang/dist/lib/Sema/SemaExpr.cpp vendor/clang/dist/lib/Sema/SemaExprCXX.cpp vendor/clang/dist/lib/Sema/SemaLambda.cpp vendor/clang/dist/lib/Sema/SemaOpenMP.cpp vendor/clang/dist/lib/Sema/SemaTemplate.cpp vendor/clang/dist/lib/Sema/SemaTemplateInstantiate.cpp vendor/clang/dist/lib/Sema/SemaTemplateInstantiateDecl.cpp vendor/clang/dist/lib/Serialization/ASTReaderDecl.cpp vendor/clang/dist/test/CodeGenCXX/captured-statements.cpp vendor/clang/dist/test/CodeGenCXX/switch-case-folding-2.cpp vendor/clang/dist/test/Driver/darwin-ld-lto.c vendor/clang/dist/test/Frontend/darwin-version.c vendor/clang/dist/test/OpenMP/atomic_write_codegen.c vendor/clang/dist/test/OpenMP/cancel_codegen.cpp vendor/clang/dist/test/OpenMP/distribute_parallel_for_reduction_messages.cpp vendor/clang/dist/test/OpenMP/distribute_parallel_for_simd_reduction_messages.cpp vendor/clang/dist/test/OpenMP/distribute_simd_reduction_messages.cpp vendor/clang/dist/test/OpenMP/for_lastprivate_codegen.cpp vendor/clang/dist/test/OpenMP/for_reduction_codegen.cpp vendor/clang/dist/test/OpenMP/for_reduction_codegen_UDR.cpp vendor/clang/dist/test/OpenMP/for_reduction_messages.cpp vendor/clang/dist/test/OpenMP/for_simd_reduction_messages.cpp vendor/clang/dist/test/OpenMP/parallel_codegen.cpp vendor/clang/dist/test/OpenMP/parallel_for_reduction_messages.cpp vendor/clang/dist/test/OpenMP/parallel_for_simd_reduction_messages.cpp vendor/clang/dist/test/OpenMP/parallel_reduction_messages.cpp vendor/clang/dist/test/OpenMP/parallel_sections_reduction_messages.cpp vendor/clang/dist/test/OpenMP/sections_reduction_messages.cpp vendor/clang/dist/test/OpenMP/simd_reduction_messages.cpp vendor/clang/dist/test/OpenMP/target_firstprivate_codegen.cpp vendor/clang/dist/test/OpenMP/target_map_codegen.cpp vendor/clang/dist/test/OpenMP/target_map_messages.cpp vendor/clang/dist/test/OpenMP/target_parallel_for_map_messages.cpp vendor/clang/dist/test/OpenMP/target_parallel_for_reduction_messages.cpp vendor/clang/dist/test/OpenMP/target_parallel_for_simd_map_messages.cpp vendor/clang/dist/test/OpenMP/target_parallel_for_simd_reduction_messages.cpp vendor/clang/dist/test/OpenMP/target_parallel_map_messages.cpp vendor/clang/dist/test/OpenMP/target_parallel_reduction_messages.cpp vendor/clang/dist/test/OpenMP/teams_reduction_messages.cpp vendor/clang/dist/test/Preprocessor/init.c vendor/clang/dist/test/SemaCXX/cxx0x-defaulted-functions.cpp vendor/clang/dist/test/SemaCXX/nested-name-spec.cpp vendor/clang/dist/test/SemaTemplate/instantiate-self.cpp vendor/clang/dist/test/SemaTemplate/instantiation-depth-exception-spec.cpp vendor/clang/dist/test/SemaTemplate/instantiation-depth.cpp vendor/clang/dist/tools/libclang/CIndex.cpp Modified: vendor/clang/dist/include/clang/AST/DeclTemplate.h ============================================================================== --- vendor/clang/dist/include/clang/AST/DeclTemplate.h Fri Nov 25 19:06:24 2016 (r309153) +++ vendor/clang/dist/include/clang/AST/DeclTemplate.h Fri Nov 25 19:07:40 2016 (r309154) @@ -44,6 +44,8 @@ class VarTemplatePartialSpecializationDe typedef llvm::PointerUnion3 TemplateParameter; +NamedDecl *getAsNamedDecl(TemplateParameter P); + /// \brief Stores a list of template parameters for a TemplateDecl and its /// derived classes. class TemplateParameterList final @@ -2912,6 +2914,14 @@ public: friend class ASTDeclWriter; }; +inline NamedDecl *getAsNamedDecl(TemplateParameter P) { + if (auto *PD = P.dyn_cast()) + return PD; + if (auto *PD = P.dyn_cast()) + return PD; + return P.get(); +} + } /* end of namespace clang */ #endif Modified: vendor/clang/dist/include/clang/Basic/DiagnosticDriverKinds.td ============================================================================== --- vendor/clang/dist/include/clang/Basic/DiagnosticDriverKinds.td Fri Nov 25 19:06:24 2016 (r309153) +++ vendor/clang/dist/include/clang/Basic/DiagnosticDriverKinds.td Fri Nov 25 19:07:40 2016 (r309154) @@ -159,8 +159,6 @@ def err_drv_bitcode_unsupported_on_toolc "-fembed-bitcode is not supported on versions of iOS prior to 6.0">; def warn_O4_is_O3 : Warning<"-O4 is equivalent to -O3">, InGroup; -def warn_drv_lto_libpath : Warning<"libLTO.dylib relative to clang installed dir not found; using 'ld' default search path instead">, - InGroup; def warn_drv_optimization_value : Warning<"optimization level '%0' is not supported; using '%1%2' instead">, InGroup; def warn_ignored_gcc_optimization : Warning<"optimization flag '%0' is not supported">, Modified: vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td ============================================================================== --- vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td Fri Nov 25 19:06:24 2016 (r309153) +++ vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td Fri Nov 25 19:07:40 2016 (r309154) @@ -4291,7 +4291,7 @@ def err_definition_of_implicitly_declare def err_definition_of_explicitly_defaulted_member : Error< "definition of explicitly defaulted %select{default constructor|copy " "constructor|move constructor|copy assignment operator|move assignment " - "operator|destructor}0">; + "operator|destructor|function}0">; def err_redefinition_extern_inline : Error< "redefinition of a 'extern inline' function %0 is not supported in " "%select{C99 mode|C++}1">; @@ -6917,6 +6917,10 @@ def err_in_class_initializer_not_yet_par def err_in_class_initializer_not_yet_parsed_outer_class : Error<"cannot use defaulted default constructor of %0 within " "%1 outside of member functions because %2 has an initializer">; +def err_in_class_initializer_cycle + : Error<"default member initializer for %0 uses itself">; +def err_exception_spec_cycle + : Error<"exception specification of %0 uses itself">; def ext_in_class_initializer_non_constant : Extension< "in-class initializer for static data member is not a constant expression; " Modified: vendor/clang/dist/include/clang/Sema/Sema.h ============================================================================== --- vendor/clang/dist/include/clang/Sema/Sema.h Fri Nov 25 19:06:24 2016 (r309153) +++ vendor/clang/dist/include/clang/Sema/Sema.h Fri Nov 25 19:07:40 2016 (r309154) @@ -18,6 +18,7 @@ #include "clang/AST/Attr.h" #include "clang/AST/Availability.h" #include "clang/AST/DeclarationName.h" +#include "clang/AST/DeclTemplate.h" #include "clang/AST/Expr.h" #include "clang/AST/ExprObjC.h" #include "clang/AST/ExternalASTSource.h" @@ -1217,8 +1218,10 @@ public: /// \brief Retrieve the current block, if any. sema::BlockScopeInfo *getCurBlock(); - /// \brief Retrieve the current lambda scope info, if any. - sema::LambdaScopeInfo *getCurLambda(); + /// Retrieve the current lambda scope info, if any. + /// \param IgnoreCapturedRegions true if should find the top-most lambda scope + /// info ignoring all inner captured regions scope infos. + sema::LambdaScopeInfo *getCurLambda(bool IgnoreCapturedRegions = false); /// \brief Retrieve the current generic lambda info, if any. sema::LambdaScopeInfo *getCurGenericLambda(); @@ -6613,10 +6616,10 @@ public: TemplateInstantiation, /// We are instantiating a default argument for a template - /// parameter. The Entity is the template, and - /// TemplateArgs/NumTemplateArguments provides the template - /// arguments as specified. - /// FIXME: Use a TemplateArgumentList + /// parameter. The Entity is the template parameter whose argument is + /// being instantiated, the Template is the template, and the + /// TemplateArgs/NumTemplateArguments provide the template arguments as + /// specified. DefaultTemplateArgumentInstantiation, /// We are instantiating a default argument for a function. @@ -6731,6 +6734,9 @@ public: SmallVector ActiveTemplateInstantiations; + /// Specializations whose definitions are currently being instantiated. + llvm::DenseSet> InstantiatingSpecializations; + /// \brief Extra modules inspected when performing a lookup during a template /// instantiation. Computed lazily. SmallVector ActiveTemplateInstantiationLookupModules; @@ -6837,12 +6843,12 @@ public: /// \brief Note that we are instantiating a default argument in a /// template-id. InstantiatingTemplate(Sema &SemaRef, SourceLocation PointOfInstantiation, - TemplateDecl *Template, + TemplateParameter Param, TemplateDecl *Template, ArrayRef TemplateArgs, SourceRange InstantiationRange = SourceRange()); - /// \brief Note that we are instantiating a default argument in a - /// template-id. + /// \brief Note that we are substituting either explicitly-specified or + /// deduced template arguments during function template argument deduction. InstantiatingTemplate(Sema &SemaRef, SourceLocation PointOfInstantiation, FunctionTemplateDecl *FunctionTemplate, ArrayRef TemplateArgs, @@ -6909,9 +6915,14 @@ public: /// recursive template instantiations. bool isInvalid() const { return Invalid; } + /// \brief Determine whether we are already instantiating this + /// specialization in some surrounding active instantiation. + bool isAlreadyInstantiating() const { return AlreadyInstantiating; } + private: Sema &SemaRef; bool Invalid; + bool AlreadyInstantiating; bool SavedInNonInstantiationSFINAEContext; bool CheckInstantiationDepth(SourceLocation PointOfInstantiation, SourceRange InstantiationRange); Modified: vendor/clang/dist/lib/Basic/Targets.cpp ============================================================================== --- vendor/clang/dist/lib/Basic/Targets.cpp Fri Nov 25 19:06:24 2016 (r309153) +++ vendor/clang/dist/lib/Basic/Targets.cpp Fri Nov 25 19:07:40 2016 (r309154) @@ -158,14 +158,25 @@ static void getDarwinDefines(MacroBuilde // Set the appropriate OS version define. if (Triple.isiOS()) { - assert(Maj < 10 && Min < 100 && Rev < 100 && "Invalid version!"); - char Str[6]; - Str[0] = '0' + Maj; - Str[1] = '0' + (Min / 10); - Str[2] = '0' + (Min % 10); - Str[3] = '0' + (Rev / 10); - Str[4] = '0' + (Rev % 10); - Str[5] = '\0'; + assert(Maj < 100 && Min < 100 && Rev < 100 && "Invalid version!"); + char Str[7]; + if (Maj < 10) { + Str[0] = '0' + Maj; + Str[1] = '0' + (Min / 10); + Str[2] = '0' + (Min % 10); + Str[3] = '0' + (Rev / 10); + Str[4] = '0' + (Rev % 10); + Str[5] = '\0'; + } else { + // Handle versions >= 10. + Str[0] = '0' + (Maj / 10); + Str[1] = '0' + (Maj % 10); + Str[2] = '0' + (Min / 10); + Str[3] = '0' + (Min % 10); + Str[4] = '0' + (Rev / 10); + Str[5] = '0' + (Rev % 10); + Str[6] = '\0'; + } if (Triple.isTvOS()) Builder.defineMacro("__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__", Str); else @@ -8170,6 +8181,8 @@ static TargetInfo *AllocateTarget(const return new DarwinARMTargetInfo(Triple, Opts); switch (os) { + case llvm::Triple::CloudABI: + return new CloudABITargetInfo(Triple, Opts); case llvm::Triple::Linux: return new LinuxTargetInfo(Triple, Opts); case llvm::Triple::FreeBSD: Modified: vendor/clang/dist/lib/Basic/Version.cpp ============================================================================== --- vendor/clang/dist/lib/Basic/Version.cpp Fri Nov 25 19:06:24 2016 (r309153) +++ vendor/clang/dist/lib/Basic/Version.cpp Fri Nov 25 19:07:40 2016 (r309154) @@ -36,7 +36,7 @@ std::string getClangRepositoryPath() { // If the SVN_REPOSITORY is empty, try to use the SVN keyword. This helps us // pick up a tag in an SVN export, for example. - StringRef SVNRepository("$URL: https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_390/final/lib/Basic/Version.cpp $"); + StringRef SVNRepository("$URL: https://llvm.org/svn/llvm-project/cfe/branches/release_39/lib/Basic/Version.cpp $"); if (URL.empty()) { URL = SVNRepository.slice(SVNRepository.find(':'), SVNRepository.find("/lib/Basic")); Modified: vendor/clang/dist/lib/CodeGen/CGExpr.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGExpr.cpp Fri Nov 25 19:06:24 2016 (r309153) +++ vendor/clang/dist/lib/CodeGen/CGExpr.cpp Fri Nov 25 19:07:40 2016 (r309154) @@ -2105,12 +2105,11 @@ LValue CodeGenFunction::EmitDeclRefLValu if (auto *FD = LambdaCaptureFields.lookup(VD)) return EmitCapturedFieldLValue(*this, FD, CXXABIThisValue); else if (CapturedStmtInfo) { - auto it = LocalDeclMap.find(VD); - if (it != LocalDeclMap.end()) { - if (auto RefTy = VD->getType()->getAs()) { - return EmitLoadOfReferenceLValue(it->second, RefTy); - } - return MakeAddrLValue(it->second, T); + auto I = LocalDeclMap.find(VD); + if (I != LocalDeclMap.end()) { + if (auto RefTy = VD->getType()->getAs()) + return EmitLoadOfReferenceLValue(I->second, RefTy); + return MakeAddrLValue(I->second, T); } LValue CapLVal = EmitCapturedFieldLValue(*this, CapturedStmtInfo->lookup(VD), @@ -2249,13 +2248,15 @@ LValue CodeGenFunction::EmitUnaryOpLValu return LV; } - assert(E->getSubExpr()->getType()->isAnyComplexType()); + QualType T = ExprTy->castAs()->getElementType(); Address Component = (E->getOpcode() == UO_Real ? emitAddrOfRealComponent(LV.getAddress(), LV.getType()) : emitAddrOfImagComponent(LV.getAddress(), LV.getType())); - return MakeAddrLValue(Component, ExprTy, LV.getAlignmentSource()); + LValue ElemLV = MakeAddrLValue(Component, T, LV.getAlignmentSource()); + ElemLV.getQuals().addQualifiers(LV.getQuals()); + return ElemLV; } case UO_PreInc: case UO_PreDec: { Modified: vendor/clang/dist/lib/CodeGen/CGStmt.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGStmt.cpp Fri Nov 25 19:06:24 2016 (r309153) +++ vendor/clang/dist/lib/CodeGen/CGStmt.cpp Fri Nov 25 19:07:40 2016 (r309154) @@ -1323,6 +1323,10 @@ static CSFC_Result CollectStatementsForC // Handle this as two cases: we might be looking for the SwitchCase (if so // the skipped statements must be skippable) or we might already have it. CompoundStmt::const_body_iterator I = CS->body_begin(), E = CS->body_end(); + bool StartedInLiveCode = FoundCase; + unsigned StartSize = ResultStmts.size(); + + // If we've not found the case yet, scan through looking for it. if (Case) { // Keep track of whether we see a skipped declaration. The code could be // using the declaration even if it is skipped, so we can't optimize out @@ -1332,7 +1336,7 @@ static CSFC_Result CollectStatementsForC // If we're looking for the case, just see if we can skip each of the // substatements. for (; Case && I != E; ++I) { - HadSkippedDecl |= isa(*I); + HadSkippedDecl |= CodeGenFunction::mightAddDeclToScope(*I); switch (CollectStatementsForCase(*I, Case, FoundCase, ResultStmts)) { case CSFC_Failure: return CSFC_Failure; @@ -1368,11 +1372,19 @@ static CSFC_Result CollectStatementsForC break; } } + + if (!FoundCase) + return CSFC_Success; + + assert(!HadSkippedDecl && "fallthrough after skipping decl"); } // If we have statements in our range, then we know that the statements are // live and need to be added to the set of statements we're tracking. + bool AnyDecls = false; for (; I != E; ++I) { + AnyDecls |= CodeGenFunction::mightAddDeclToScope(*I); + switch (CollectStatementsForCase(*I, nullptr, FoundCase, ResultStmts)) { case CSFC_Failure: return CSFC_Failure; case CSFC_FallThrough: @@ -1390,7 +1402,24 @@ static CSFC_Result CollectStatementsForC } } - return Case ? CSFC_Success : CSFC_FallThrough; + // If we're about to fall out of a scope without hitting a 'break;', we + // can't perform the optimization if there were any decls in that scope + // (we'd lose their end-of-lifetime). + if (AnyDecls) { + // If the entire compound statement was live, there's one more thing we + // can try before giving up: emit the whole thing as a single statement. + // We can do that unless the statement contains a 'break;'. + // FIXME: Such a break must be at the end of a construct within this one. + // We could emit this by just ignoring the BreakStmts entirely. + if (StartedInLiveCode && !CodeGenFunction::containsBreak(S)) { + ResultStmts.resize(StartSize); + ResultStmts.push_back(S); + } else { + return CSFC_Failure; + } + } + + return CSFC_FallThrough; } // Okay, this is some other statement that we don't handle explicitly, like a Modified: vendor/clang/dist/lib/CodeGen/CGStmtOpenMP.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGStmtOpenMP.cpp Fri Nov 25 19:06:24 2016 (r309153) +++ vendor/clang/dist/lib/CodeGen/CGStmtOpenMP.cpp Fri Nov 25 19:07:40 2016 (r309154) @@ -232,8 +232,15 @@ CodeGenFunction::GenerateOpenMPCapturedS assert(I->capturesVariableArrayType()); II = &getContext().Idents.get("vla"); } - if (ArgType->isVariablyModifiedType()) - ArgType = getContext().getVariableArrayDecayedType(ArgType); + if (ArgType->isVariablyModifiedType()) { + bool IsReference = ArgType->isLValueReferenceType(); + ArgType = + getContext().getCanonicalParamType(ArgType.getNonReferenceType()); + if (IsReference && !ArgType->isPointerType()) { + ArgType = getContext().getLValueReferenceType( + ArgType, /*SpelledAsLValue=*/false); + } + } Args.push_back(ImplicitParamDecl::Create(getContext(), nullptr, FD->getLocation(), II, ArgType)); ++I; @@ -287,8 +294,14 @@ CodeGenFunction::GenerateOpenMPCapturedS QualType VarTy = Var->getType(); Address ArgAddr = ArgLVal.getAddress(); if (!VarTy->isReferenceType()) { - ArgAddr = EmitLoadOfReference( - ArgAddr, ArgLVal.getType()->castAs()); + if (ArgLVal.getType()->isLValueReferenceType()) { + ArgAddr = EmitLoadOfReference( + ArgAddr, ArgLVal.getType()->castAs()); + } else if (!VarTy->isVariablyModifiedType() || !VarTy->isPointerType()) { + assert(ArgLVal.getType()->isPointerType()); + ArgAddr = EmitLoadOfPointer( + ArgAddr, ArgLVal.getType()->castAs()); + } } setAddrOfLocalVar( Var, Address(ArgAddr.getPointer(), getContext().getDeclAlign(Var))); @@ -1754,9 +1767,17 @@ void CodeGenFunction::EmitOMPOuterLoop(b EmitBlock(LoopExit.getBlock()); // Tell the runtime we are done. - if (!DynamicOrOrdered) - RT.emitForStaticFinish(*this, S.getLocEnd()); - + SourceLocation ELoc = S.getLocEnd(); + auto &&CodeGen = [DynamicOrOrdered, ELoc](CodeGenFunction &CGF) { + if (!DynamicOrOrdered) + CGF.CGM.getOpenMPRuntime().emitForStaticFinish(CGF, ELoc); + }; + CodeGen(*this); + + OpenMPDirectiveKind DKind = S.getDirectiveKind(); + if (DKind == OMPD_for || DKind == OMPD_parallel_for || + DKind == OMPD_distribute_parallel_for) + OMPCancelStack.back().CodeGen = CodeGen; } void CodeGenFunction::EmitOMPForOuterLoop( @@ -1868,6 +1889,7 @@ void CodeGenFunction::EmitOMPDistributeO void CodeGenFunction::EmitOMPDistributeParallelForDirective( const OMPDistributeParallelForDirective &S) { OMPLexicalScope Scope(*this, S, /*AsInlined=*/true); + OMPCancelStackRAII CancelRegion(*this); CGM.getOpenMPRuntime().emitInlinedDirective( *this, OMPD_distribute_parallel_for, [&S](CodeGenFunction &CGF, PrePostActionTy &) { @@ -2060,7 +2082,15 @@ bool CodeGenFunction::EmitOMPWorksharing [](CodeGenFunction &) {}); EmitBlock(LoopExit.getBlock()); // Tell the runtime we are done. - RT.emitForStaticFinish(*this, S.getLocStart()); + SourceLocation ELoc = S.getLocEnd(); + auto &&CodeGen = [ELoc](CodeGenFunction &CGF) { + CGF.CGM.getOpenMPRuntime().emitForStaticFinish(CGF, ELoc); + }; + CodeGen(*this); + OpenMPDirectiveKind DKind = S.getDirectiveKind(); + if (DKind == OMPD_for || DKind == OMPD_parallel_for || + DKind == OMPD_distribute_parallel_for) + OMPCancelStack.back().CodeGen = CodeGen; } else { const bool IsMonotonic = Ordered || ScheduleKind.Schedule == OMPC_SCHEDULE_static || @@ -2114,6 +2144,7 @@ void CodeGenFunction::EmitOMPForDirectiv }; { OMPLexicalScope Scope(*this, S, /*AsInlined=*/true); + OMPCancelStackRAII CancelRegion(*this); CGM.getOpenMPRuntime().emitInlinedDirective(*this, OMPD_for, CodeGen, S.hasCancel()); } @@ -2156,6 +2187,7 @@ void CodeGenFunction::EmitSections(const bool HasLastprivates = false; auto &&CodeGen = [&S, Stmt, CS, &HasLastprivates](CodeGenFunction &CGF, PrePostActionTy &) { + OMPCancelStackRAII CancelRegion(CGF); auto &C = CGF.CGM.getContext(); auto KmpInt32Ty = C.getIntTypeForBitwidth(/*DestWidth=*/32, /*Signed=*/1); // Emit helper vars inits. @@ -2250,7 +2282,12 @@ void CodeGenFunction::EmitSections(const CGF.EmitOMPInnerLoop(S, /*RequiresCleanup=*/false, &Cond, &Inc, BodyGen, [](CodeGenFunction &) {}); // Tell the runtime we are done. - CGF.CGM.getOpenMPRuntime().emitForStaticFinish(CGF, S.getLocStart()); + SourceLocation ELoc = S.getLocEnd(); + auto &&FinalCodeGen = [ELoc](CodeGenFunction &CGF) { + CGF.CGM.getOpenMPRuntime().emitForStaticFinish(CGF, ELoc); + }; + FinalCodeGen(CGF); + CGF.OMPCancelStack.back().CodeGen = FinalCodeGen; CGF.EmitOMPReductionClauseFinal(S); // Emit post-update of the reduction variables if IsLastIter != 0. emitPostUpdateForReductionClause( @@ -2375,6 +2412,7 @@ void CodeGenFunction::EmitOMPParallelFor // Emit directive as a combined directive that consists of two implicit // directives: 'parallel' with 'for' directive. auto &&CodeGen = [&S](CodeGenFunction &CGF, PrePostActionTy &) { + OMPCancelStackRAII CancelRegion(CGF); CGF.EmitOMPWorksharingLoop(S); }; emitCommonOMPParallelDirective(*this, S, OMPD_for, CodeGen); @@ -3377,8 +3415,11 @@ CodeGenFunction::getOMPCancelDestination if (Kind == OMPD_parallel || Kind == OMPD_task) return ReturnBlock; assert(Kind == OMPD_for || Kind == OMPD_section || Kind == OMPD_sections || - Kind == OMPD_parallel_sections || Kind == OMPD_parallel_for); - return BreakContinueStack.back().BreakBlock; + Kind == OMPD_parallel_sections || Kind == OMPD_parallel_for || + Kind == OMPD_distribute_parallel_for); + if (!OMPCancelStack.back().ExitBlock.isValid()) + OMPCancelStack.back().ExitBlock = getJumpDestInCurrentScope("cancel.exit"); + return OMPCancelStack.back().ExitBlock; } // Generate the instructions for '#pragma omp target data' directive. Modified: vendor/clang/dist/lib/CodeGen/CodeGenFunction.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CodeGenFunction.cpp Fri Nov 25 19:06:24 2016 (r309153) +++ vendor/clang/dist/lib/CodeGen/CodeGenFunction.cpp Fri Nov 25 19:07:40 2016 (r309154) @@ -25,6 +25,7 @@ #include "clang/AST/Decl.h" #include "clang/AST/DeclCXX.h" #include "clang/AST/StmtCXX.h" +#include "clang/AST/StmtObjC.h" #include "clang/Basic/Builtins.h" #include "clang/Basic/TargetInfo.h" #include "clang/CodeGen/CGFunctionInfo.h" @@ -436,6 +437,23 @@ void CodeGenFunction::EmitMCountInstrume EmitNounwindRuntimeCall(MCountFn); } +// Returns the address space id that should be produced to the +// kernel_arg_addr_space metadata. This is always fixed to the ids +// as specified in the SPIR 2.0 specification in order to differentiate +// for example in clGetKernelArgInfo() implementation between the address +// spaces with targets without unique mapping to the OpenCL address spaces +// (basically all single AS CPUs). +static unsigned ArgInfoAddressSpace(unsigned LangAS) { + switch (LangAS) { + case LangAS::opencl_global: return 1; + case LangAS::opencl_constant: return 2; + case LangAS::opencl_local: return 3; + case LangAS::opencl_generic: return 4; // Not in SPIR 2.0 specs. + default: + return 0; // Assume private. + } +} + // OpenCL v1.2 s5.6.4.6 allows the compiler to store kernel argument // information in the program executable. The argument information stored // includes the argument name, its type, the address and access qualifiers used. @@ -476,7 +494,7 @@ static void GenOpenCLArgMetadata(const F // Get address qualifier. addressQuals.push_back(llvm::ConstantAsMetadata::get(Builder.getInt32( - ASTCtx.getTargetAddressSpace(pointeeTy.getAddressSpace())))); + ArgInfoAddressSpace(pointeeTy.getAddressSpace())))); // Get argument type name. std::string typeName = @@ -513,8 +531,7 @@ static void GenOpenCLArgMetadata(const F uint32_t AddrSpc = 0; bool isPipe = ty->isPipeType(); if (ty->isImageType() || isPipe) - AddrSpc = - CGM.getContext().getTargetAddressSpace(LangAS::opencl_global); + AddrSpc = ArgInfoAddressSpace(LangAS::opencl_global); addressQuals.push_back( llvm::ConstantAsMetadata::get(Builder.getInt32(AddrSpc))); @@ -1143,6 +1160,28 @@ bool CodeGenFunction::containsBreak(cons return false; } +bool CodeGenFunction::mightAddDeclToScope(const Stmt *S) { + if (!S) return false; + + // Some statement kinds add a scope and thus never add a decl to the current + // scope. Note, this list is longer than the list of statements that might + // have an unscoped decl nested within them, but this way is conservatively + // correct even if more statement kinds are added. + if (isa(S) || isa(S) || isa(S) || + isa(S) || isa(S) || isa(S) || + isa(S) || isa(S) || + isa(S) || isa(S)) + return false; + + if (isa(S)) + return true; + + for (const Stmt *SubStmt : S->children()) + if (mightAddDeclToScope(SubStmt)) + return true; + + return false; +} /// ConstantFoldsToSimpleInteger - If the specified expression does not fold /// to a constant, or if it does but contains a label, return false. If it Modified: vendor/clang/dist/lib/CodeGen/CodeGenFunction.h ============================================================================== --- vendor/clang/dist/lib/CodeGen/CodeGenFunction.h Fri Nov 25 19:06:24 2016 (r309153) +++ vendor/clang/dist/lib/CodeGen/CodeGenFunction.h Fri Nov 25 19:07:40 2016 (r309154) @@ -965,6 +965,35 @@ private: }; SmallVector BreakContinueStack; + /// Data for exit block for proper support of OpenMP cancellation constructs. + struct OMPCancel { + JumpDest ExitBlock; + llvm::function_ref CodeGen; + OMPCancel() : CodeGen([](CodeGenFunction &CGF) {}) {} + }; + SmallVector OMPCancelStack; + + /// Controls insertion of cancellation exit blocks in worksharing constructs. + class OMPCancelStackRAII { + CodeGenFunction &CGF; + + public: + OMPCancelStackRAII(CodeGenFunction &CGF) : CGF(CGF) { + CGF.OMPCancelStack.push_back({}); + } + ~OMPCancelStackRAII() { + if (CGF.HaveInsertPoint() && + CGF.OMPCancelStack.back().ExitBlock.isValid()) { + auto CJD = CGF.getJumpDestInCurrentScope("cancel.cont"); + CGF.EmitBranchThroughCleanup(CJD); + CGF.EmitBlock(CGF.OMPCancelStack.back().ExitBlock.getBlock()); + CGF.OMPCancelStack.back().CodeGen(CGF); + CGF.EmitBranchThroughCleanup(CJD); + CGF.EmitBlock(CJD.getBlock()); + } + } + }; + CodeGenPGO PGO; /// Calculate branch weights appropriate for PGO data @@ -3163,6 +3192,10 @@ public: /// If the statement (recursively) contains a switch or loop with a break /// inside of it, this is fine. static bool containsBreak(const Stmt *S); + + /// Determine if the given statement might introduce a declaration into the + /// current scope, by being a (possibly-labelled) DeclStmt. + static bool mightAddDeclToScope(const Stmt *S); /// ConstantFoldsToSimpleInteger - If the specified expression does not fold /// to a constant, or if it does but contains a label, return false. If it Modified: vendor/clang/dist/lib/Driver/ToolChains.cpp ============================================================================== --- vendor/clang/dist/lib/Driver/ToolChains.cpp Fri Nov 25 19:06:24 2016 (r309153) +++ vendor/clang/dist/lib/Driver/ToolChains.cpp Fri Nov 25 19:07:40 2016 (r309154) @@ -688,13 +688,13 @@ void Darwin::AddDeploymentTarget(Derived assert(iOSVersion && "Unknown target platform!"); if (!Driver::GetReleaseVersion(iOSVersion->getValue(), Major, Minor, Micro, HadExtra) || - HadExtra || Major >= 10 || Minor >= 100 || Micro >= 100) + HadExtra || Major >= 100 || Minor >= 100 || Micro >= 100) getDriver().Diag(diag::err_drv_invalid_version_number) << iOSVersion->getAsString(Args); } else if (Platform == TvOS) { if (!Driver::GetReleaseVersion(TvOSVersion->getValue(), Major, Minor, Micro, HadExtra) || HadExtra || - Major >= 10 || Minor >= 100 || Micro >= 100) + Major >= 100 || Minor >= 100 || Micro >= 100) getDriver().Diag(diag::err_drv_invalid_version_number) << TvOSVersion->getAsString(Args); } else if (Platform == WatchOS) { Modified: vendor/clang/dist/lib/Driver/Tools.cpp ============================================================================== --- vendor/clang/dist/lib/Driver/Tools.cpp Fri Nov 25 19:06:24 2016 (r309153) +++ vendor/clang/dist/lib/Driver/Tools.cpp Fri Nov 25 19:07:40 2016 (r309154) @@ -7637,23 +7637,23 @@ void darwin::Linker::AddLinkArgs(Compila CmdArgs.push_back("-object_path_lto"); CmdArgs.push_back(TmpPath); } + } - // Use -lto_library option to specify the libLTO.dylib path. Try to find - // it in clang installed libraries. If not found, the option is not used - // and 'ld' will use its default mechanism to search for libLTO.dylib. - if (Version[0] >= 133) { - // Search for libLTO in /../lib/libLTO.dylib - StringRef P = llvm::sys::path::parent_path(D.getInstalledDir()); - SmallString<128> LibLTOPath(P); - llvm::sys::path::append(LibLTOPath, "lib"); - llvm::sys::path::append(LibLTOPath, "libLTO.dylib"); - if (llvm::sys::fs::exists(LibLTOPath)) { - CmdArgs.push_back("-lto_library"); - CmdArgs.push_back(C.getArgs().MakeArgString(LibLTOPath)); - } else { - D.Diag(diag::warn_drv_lto_libpath); - } - } + // Use -lto_library option to specify the libLTO.dylib path. Try to find + // it in clang installed libraries. ld64 will only look at this argument + // when it actually uses LTO, so libLTO.dylib only needs to exist at link + // time if ld64 decides that it needs to use LTO. + // Since this is passed unconditionally, ld64 will never look for libLTO.dylib + // next to it. That's ok since ld64 using a libLTO.dylib not matching the + // clang version won't work anyways. + if (Version[0] >= 133) { + // Search for libLTO in /../lib/libLTO.dylib + StringRef P = llvm::sys::path::parent_path(D.Dir); + SmallString<128> LibLTOPath(P); + llvm::sys::path::append(LibLTOPath, "lib"); + llvm::sys::path::append(LibLTOPath, "libLTO.dylib"); + CmdArgs.push_back("-lto_library"); + CmdArgs.push_back(C.getArgs().MakeArgString(LibLTOPath)); } // Derived from the "link" spec. Modified: vendor/clang/dist/lib/Sema/Sema.cpp ============================================================================== --- vendor/clang/dist/lib/Sema/Sema.cpp Fri Nov 25 19:06:24 2016 (r309153) +++ vendor/clang/dist/lib/Sema/Sema.cpp Fri Nov 25 19:07:40 2016 (r309154) @@ -1197,11 +1197,19 @@ BlockScopeInfo *Sema::getCurBlock() { return CurBSI; } -LambdaScopeInfo *Sema::getCurLambda() { +LambdaScopeInfo *Sema::getCurLambda(bool IgnoreCapturedRegions) { if (FunctionScopes.empty()) return nullptr; - auto CurLSI = dyn_cast(FunctionScopes.back()); + auto I = FunctionScopes.rbegin(); + if (IgnoreCapturedRegions) { + auto E = FunctionScopes.rend(); + while (I != E && isa(*I)) + ++I; + if (I == E) + return nullptr; + } + auto *CurLSI = dyn_cast(*I); if (CurLSI && CurLSI->Lambda && !CurLSI->Lambda->Encloses(CurContext)) { // We have switched contexts due to template instantiation. Modified: vendor/clang/dist/lib/Sema/SemaCXXScopeSpec.cpp ============================================================================== --- vendor/clang/dist/lib/Sema/SemaCXXScopeSpec.cpp Fri Nov 25 19:06:24 2016 (r309153) +++ vendor/clang/dist/lib/Sema/SemaCXXScopeSpec.cpp Fri Nov 25 19:07:40 2016 (r309154) @@ -806,7 +806,7 @@ bool Sema::BuildCXXNestedNameSpecifier(S if (!Found.empty()) { if (TypeDecl *TD = Found.getAsSingle()) Diag(IdentifierLoc, diag::err_expected_class_or_namespace) - << QualType(TD->getTypeForDecl(), 0) << getLangOpts().CPlusPlus; + << Context.getTypeDeclType(TD) << getLangOpts().CPlusPlus; else { Diag(IdentifierLoc, diag::err_expected_class_or_namespace) << &Identifier << getLangOpts().CPlusPlus; Modified: vendor/clang/dist/lib/Sema/SemaDecl.cpp ============================================================================== --- vendor/clang/dist/lib/Sema/SemaDecl.cpp Fri Nov 25 19:06:24 2016 (r309153) +++ vendor/clang/dist/lib/Sema/SemaDecl.cpp Fri Nov 25 19:07:40 2016 (r309154) @@ -9615,7 +9615,8 @@ void Sema::AddInitializerToDecl(Decl *Re } VarDecl *Def; - if ((Def = VDecl->getDefinition()) && Def != VDecl) { + if ((Def = VDecl->getDefinition()) && Def != VDecl && + (!VDecl->isStaticDataMember() || VDecl->isOutOfLine())) { NamedDecl *Hidden = nullptr; if (!hasVisibleDefinition(Def, &Hidden) && (VDecl->getFormalLinkage() == InternalLinkage || Modified: vendor/clang/dist/lib/Sema/SemaExpr.cpp ============================================================================== --- vendor/clang/dist/lib/Sema/SemaExpr.cpp Fri Nov 25 19:06:24 2016 (r309153) +++ vendor/clang/dist/lib/Sema/SemaExpr.cpp Fri Nov 25 19:07:40 2016 (r309154) @@ -4522,6 +4522,11 @@ ExprResult Sema::BuildCXXDefaultArgExpr( MutiLevelArgList.getInnermost()); if (Inst.isInvalid()) return ExprError(); + if (Inst.isAlreadyInstantiating()) { + Diag(Param->getLocStart(), diag::err_recursive_default_argument) << FD; + Param->setInvalidDecl(); + return ExprError(); + } ExprResult Result; { @@ -13880,7 +13885,8 @@ static void DoMarkVarDeclReferenced(Sema (SemaRef.CurContext != Var->getDeclContext() && Var->getDeclContext()->isFunctionOrMethod() && Var->hasLocalStorage()); if (RefersToEnclosingScope) { - if (LambdaScopeInfo *const LSI = SemaRef.getCurLambda()) { + if (LambdaScopeInfo *const LSI = + SemaRef.getCurLambda(/*IgnoreCapturedRegions=*/true)) { // If a variable could potentially be odr-used, defer marking it so // until we finish analyzing the full expression for any // lvalue-to-rvalue Modified: vendor/clang/dist/lib/Sema/SemaExprCXX.cpp ============================================================================== --- vendor/clang/dist/lib/Sema/SemaExprCXX.cpp Fri Nov 25 19:06:24 2016 (r309153) +++ vendor/clang/dist/lib/Sema/SemaExprCXX.cpp Fri Nov 25 19:07:40 2016 (r309154) @@ -6582,10 +6582,16 @@ static inline bool VariableCanNeverBeACo static void CheckIfAnyEnclosingLambdasMustCaptureAnyPotentialCaptures( Expr *const FE, LambdaScopeInfo *const CurrentLSI, Sema &S) { - assert(!S.isUnevaluatedContext()); - assert(S.CurContext->isDependentContext()); - assert(CurrentLSI->CallOperator == S.CurContext && + assert(!S.isUnevaluatedContext()); + assert(S.CurContext->isDependentContext()); +#ifndef NDEBUG + DeclContext *DC = S.CurContext; + while (DC && isa(DC)) + DC = DC->getParent(); + assert( + CurrentLSI->CallOperator == DC && "The current call operator must be synchronized with Sema's CurContext"); +#endif // NDEBUG const bool IsFullExprInstantiationDependent = FE->isInstantiationDependent(); @@ -7051,7 +7057,8 @@ ExprResult Sema::ActOnFinishFullExpr(Exp // and then the full-expression +n + ({ 0; }); ends, but it's too late // for us to see that we need to capture n after all. - LambdaScopeInfo *const CurrentLSI = getCurLambda(); + LambdaScopeInfo *const CurrentLSI = + getCurLambda(/*IgnoreCapturedRegions=*/true); // FIXME: PR 17877 showed that getCurLambda() can return a valid pointer // even if CurContext is not a lambda call operator. Refer to that Bug Report // for an example of the code that might cause this asynchrony. @@ -7066,7 +7073,10 @@ ExprResult Sema::ActOnFinishFullExpr(Exp // constructor/destructor. // - Teach the handful of places that iterate over FunctionScopes to // stop at the outermost enclosing lexical scope." - const bool IsInLambdaDeclContext = isLambdaCallOperator(CurContext); + DeclContext *DC = CurContext; + while (DC && isa(DC)) + DC = DC->getParent(); + const bool IsInLambdaDeclContext = isLambdaCallOperator(DC); if (IsInLambdaDeclContext && CurrentLSI && CurrentLSI->hasPotentialCaptures() && !FullExpr.isInvalid()) CheckIfAnyEnclosingLambdasMustCaptureAnyPotentialCaptures(FE, CurrentLSI, Modified: vendor/clang/dist/lib/Sema/SemaLambda.cpp ============================================================================== --- vendor/clang/dist/lib/Sema/SemaLambda.cpp Fri Nov 25 19:06:24 2016 (r309153) +++ vendor/clang/dist/lib/Sema/SemaLambda.cpp Fri Nov 25 19:07:40 2016 (r309154) @@ -66,17 +66,20 @@ getStackIndexOfNearestEnclosingCaptureRe // Label failure to capture. const Optional NoLambdaIsCaptureReady; + // Ignore all inner captured regions. + unsigned CurScopeIndex = FunctionScopes.size() - 1; + while (CurScopeIndex > 0 && isa( + FunctionScopes[CurScopeIndex])) + --CurScopeIndex; assert( - isa( - FunctionScopes[FunctionScopes.size() - 1]) && + isa(FunctionScopes[CurScopeIndex]) && "The function on the top of sema's function-info stack must be a lambda"); - + // If VarToCapture is null, we are attempting to capture 'this'. const bool IsCapturingThis = !VarToCapture; const bool IsCapturingVariable = !IsCapturingThis; // Start with the current lambda at the top of the stack (highest index). - unsigned CurScopeIndex = FunctionScopes.size() - 1; DeclContext *EnclosingDC = cast(FunctionScopes[CurScopeIndex])->CallOperator; @@ -311,18 +314,21 @@ Sema::getCurrentMangleNumberContext(cons bool IsInNonspecializedTemplate = !ActiveTemplateInstantiations.empty() || CurContext->isDependentContext(); switch (Kind) { - case Normal: + case Normal: { // -- the bodies of non-exported nonspecialized template functions // -- the bodies of inline functions if ((IsInNonspecializedTemplate && !(ManglingContextDecl && isa(ManglingContextDecl))) || isInInlineFunction(CurContext)) { ManglingContextDecl = nullptr; + while (auto *CD = dyn_cast(DC)) + DC = CD->getParent(); return &Context.getManglingNumberContext(DC); } ManglingContextDecl = nullptr; return nullptr; + } case StaticDataMember: // -- the initializers of nonspecialized static members of template classes Modified: vendor/clang/dist/lib/Sema/SemaOpenMP.cpp ============================================================================== --- vendor/clang/dist/lib/Sema/SemaOpenMP.cpp Fri Nov 25 19:06:24 2016 (r309153) +++ vendor/clang/dist/lib/Sema/SemaOpenMP.cpp Fri Nov 25 19:07:40 2016 (r309154) @@ -9133,7 +9133,7 @@ OMPClause *Sema::ActOnOpenMPReductionCla // for all threads of the team. if (!ASE && !OASE && VD) { VarDecl *VDDef = VD->getDefinition(); - if (VD->getType()->isReferenceType() && VDDef) { + if (VD->getType()->isReferenceType() && VDDef && VDDef->hasInit()) { DSARefChecker Check(DSAStack); if (Check.Visit(VDDef->getInit())) { Diag(ELoc, diag::err_omp_reduction_ref_type_arg) << ERange; @@ -10680,6 +10680,25 @@ static bool CheckMapConflicts( if (CI->getAssociatedDeclaration() != SI->getAssociatedDeclaration()) break; } + // Check if the extra components of the expressions in the enclosing + // data environment are redundant for the current base declaration. + // If they are, the maps completely overlap, which is legal. + for (; SI != SE; ++SI) { + QualType Type; + if (auto *ASE = + dyn_cast(SI->getAssociatedExpression())) { + Type = ASE->getBase()->IgnoreParenImpCasts()->getType(); + } else if (auto *OASE = + dyn_cast(SI->getAssociatedExpression())) { + auto *E = OASE->getBase()->IgnoreParenImpCasts(); + Type = + OMPArraySectionExpr::getBaseOriginalType(E).getCanonicalType(); + } + if (Type.isNull() || Type->isAnyPointerType() || + CheckArrayExpressionDoesNotReferToWholeSize( + SemaRef, SI->getAssociatedExpression(), Type)) + break; + } // OpenMP 4.5 [2.15.5.1, map Clause, Restrictions, p.4] // List items of map clauses in the same construct must not share Modified: vendor/clang/dist/lib/Sema/SemaTemplate.cpp ============================================================================== --- vendor/clang/dist/lib/Sema/SemaTemplate.cpp Fri Nov 25 19:06:24 2016 (r309153) +++ vendor/clang/dist/lib/Sema/SemaTemplate.cpp Fri Nov 25 19:07:40 2016 (r309154) @@ -3256,7 +3256,7 @@ SubstDefaultTemplateArgument(Sema &SemaR // on the previously-computed template arguments. if (ArgType->getType()->isDependentType()) { Sema::InstantiatingTemplate Inst(SemaRef, TemplateLoc, - Template, Converted, + Param, Template, Converted, SourceRange(TemplateLoc, RAngleLoc)); if (Inst.isInvalid()) return nullptr; @@ -3308,7 +3308,7 @@ SubstDefaultTemplateArgument(Sema &SemaR NonTypeTemplateParmDecl *Param, SmallVectorImpl &Converted) { Sema::InstantiatingTemplate Inst(SemaRef, TemplateLoc, - Template, Converted, + Param, Template, Converted, SourceRange(TemplateLoc, RAngleLoc)); if (Inst.isInvalid()) return ExprError(); @@ -3359,8 +3359,9 @@ SubstDefaultTemplateArgument(Sema &SemaR TemplateTemplateParmDecl *Param, SmallVectorImpl &Converted, NestedNameSpecifierLoc &QualifierLoc) { - Sema::InstantiatingTemplate Inst(SemaRef, TemplateLoc, Template, Converted, - SourceRange(TemplateLoc, RAngleLoc)); + Sema::InstantiatingTemplate Inst( + SemaRef, TemplateLoc, TemplateParameter(Param), Template, Converted, + SourceRange(TemplateLoc, RAngleLoc)); if (Inst.isInvalid()) return TemplateName(); @@ -3981,7 +3982,9 @@ bool Sema::CheckTemplateArgumentList(Tem } // Introduce an instantiation record that describes where we are using - // the default template argument. + // the default template argument. We're not actually instantiating a + // template here, we just create this object to put a note into the + // context stack. InstantiatingTemplate Inst(*this, RAngleLoc, Template, *Param, Converted, SourceRange(TemplateLoc, RAngleLoc)); if (Inst.isInvalid()) Modified: vendor/clang/dist/lib/Sema/SemaTemplateInstantiate.cpp ============================================================================== --- vendor/clang/dist/lib/Sema/SemaTemplateInstantiate.cpp Fri Nov 25 19:06:24 2016 (r309153) +++ vendor/clang/dist/lib/Sema/SemaTemplateInstantiate.cpp Fri Nov 25 19:07:40 2016 (r309154) @@ -225,6 +225,10 @@ Sema::InstantiatingTemplate::Instantiati Inst.NumTemplateArgs = TemplateArgs.size(); Inst.DeductionInfo = DeductionInfo; Inst.InstantiationRange = InstantiationRange; + AlreadyInstantiating = + !SemaRef.InstantiatingSpecializations + .insert(std::make_pair(Inst.Entity->getCanonicalDecl(), Inst.Kind)) + .second; SemaRef.InNonInstantiationSFINAEContext = false; SemaRef.ActiveTemplateInstantiations.push_back(Inst); if (!Inst.isInstantiationRecord()) @@ -247,13 +251,14 @@ Sema::InstantiatingTemplate::Instantiati PointOfInstantiation, InstantiationRange, Entity) {} Sema::InstantiatingTemplate::InstantiatingTemplate( - Sema &SemaRef, SourceLocation PointOfInstantiation, TemplateDecl *Template, - ArrayRef TemplateArgs, SourceRange InstantiationRange) + Sema &SemaRef, SourceLocation PointOfInstantiation, TemplateParameter Param, + TemplateDecl *Template, ArrayRef TemplateArgs, + SourceRange InstantiationRange) : InstantiatingTemplate( SemaRef, ActiveTemplateInstantiation::DefaultTemplateArgumentInstantiation, - PointOfInstantiation, InstantiationRange, Template, nullptr, - TemplateArgs) {} + PointOfInstantiation, InstantiationRange, getAsNamedDecl(Param), + Template, TemplateArgs) {} Sema::InstantiatingTemplate::InstantiatingTemplate( Sema &SemaRef, SourceLocation PointOfInstantiation, @@ -263,7 +268,11 @@ Sema::InstantiatingTemplate::Instantiati sema::TemplateDeductionInfo &DeductionInfo, SourceRange InstantiationRange) : InstantiatingTemplate(SemaRef, Kind, PointOfInstantiation, InstantiationRange, FunctionTemplate, nullptr, - TemplateArgs, &DeductionInfo) {} + TemplateArgs, &DeductionInfo) { + assert( + Kind == ActiveTemplateInstantiation::ExplicitTemplateArgumentSubstitution || + Kind == ActiveTemplateInstantiation::DeducedTemplateArgumentSubstitution); +} Sema::InstantiatingTemplate::InstantiatingTemplate( Sema &SemaRef, SourceLocation PointOfInstantiation, @@ -327,7 +336,8 @@ Sema::InstantiatingTemplate::Instantiati void Sema::InstantiatingTemplate::Clear() { if (!Invalid) { - if (!SemaRef.ActiveTemplateInstantiations.back().isInstantiationRecord()) { + auto &Active = SemaRef.ActiveTemplateInstantiations.back(); + if (!Active.isInstantiationRecord()) { assert(SemaRef.NonInstantiationEntries > 0); --SemaRef.NonInstantiationEntries; } @@ -345,6 +355,10 @@ void Sema::InstantiatingTemplate::Clear( SemaRef.ActiveTemplateInstantiationLookupModules.pop_back(); } + if (!AlreadyInstantiating) + SemaRef.InstantiatingSpecializations.erase( + std::make_pair(Active.Entity, Active.Kind)); + SemaRef.ActiveTemplateInstantiations.pop_back(); Invalid = true; } @@ -443,7 +457,7 @@ void Sema::PrintInstantiationStack() { } case ActiveTemplateInstantiation::DefaultTemplateArgumentInstantiation: { - TemplateDecl *Template = cast(Active->Entity); + TemplateDecl *Template = cast(Active->Template); SmallVector TemplateArgsStr; llvm::raw_svector_ostream OS(TemplateArgsStr); Template->printName(OS); @@ -1950,6 +1964,7 @@ Sema::InstantiateClass(SourceLocation Po InstantiatingTemplate Inst(*this, PointOfInstantiation, Instantiation); if (Inst.isInvalid()) return true; + assert(!Inst.isAlreadyInstantiating() && "should have been caught by caller"); PrettyDeclStackTraceEntry CrashInfo(*this, Instantiation, SourceLocation(), "instantiating class definition"); @@ -2175,6 +2190,8 @@ bool Sema::InstantiateEnum(SourceLocatio InstantiatingTemplate Inst(*this, PointOfInstantiation, Instantiation); if (Inst.isInvalid()) return true; + if (Inst.isAlreadyInstantiating()) + return false; PrettyDeclStackTraceEntry CrashInfo(*this, Instantiation, SourceLocation(), "instantiating enum definition"); @@ -2249,6 +2266,12 @@ bool Sema::InstantiateInClassInitializer InstantiatingTemplate Inst(*this, PointOfInstantiation, Instantiation); if (Inst.isInvalid()) return true; + if (Inst.isAlreadyInstantiating()) { + // Error out if we hit an instantiation cycle for this initializer. + Diag(PointOfInstantiation, diag::err_in_class_initializer_cycle) + << Instantiation; + return true; + } PrettyDeclStackTraceEntry CrashInfo(*this, Instantiation, SourceLocation(), "instantiating default member init"); Modified: vendor/clang/dist/lib/Sema/SemaTemplateInstantiateDecl.cpp ============================================================================== --- vendor/clang/dist/lib/Sema/SemaTemplateInstantiateDecl.cpp Fri Nov 25 19:06:24 2016 (r309153) +++ vendor/clang/dist/lib/Sema/SemaTemplateInstantiateDecl.cpp Fri Nov 25 19:07:40 2016 (r309154) @@ -3360,6 +3360,13 @@ void Sema::InstantiateExceptionSpec(Sour UpdateExceptionSpec(Decl, EST_None); return; } + if (Inst.isAlreadyInstantiating()) { + // This exception specification indirectly depends on itself. Reject. + // FIXME: Corresponding rule in the standard? + Diag(PointOfInstantiation, diag::err_exception_spec_cycle) << Decl; + UpdateExceptionSpec(Decl, EST_None); + return; + } // Enter the scope of this instantiation. We don't use // PushDeclContext because we don't have a scope. @@ -3619,7 +3626,7 @@ void Sema::InstantiateFunctionDefinition } InstantiatingTemplate Inst(*this, PointOfInstantiation, Function); - if (Inst.isInvalid()) + if (Inst.isInvalid() || Inst.isAlreadyInstantiating()) return; PrettyDeclStackTraceEntry CrashInfo(*this, Function, SourceLocation(), *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Fri Nov 25 19:08:12 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1E909C542F1; Fri, 25 Nov 2016 19:08:12 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C89D4326; Fri, 25 Nov 2016 19:08:11 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAPJ8BXC071946; Fri, 25 Nov 2016 19:08:11 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAPJ8Abk071945; Fri, 25 Nov 2016 19:08:10 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201611251908.uAPJ8Abk071945@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 25 Nov 2016 19:08:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r309155 - vendor/clang/clang-release_39-r287912 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2016 19:08:12 -0000 Author: dim Date: Fri Nov 25 19:08:10 2016 New Revision: 309155 URL: https://svnweb.freebsd.org/changeset/base/309155 Log: Tag clang release_39 branch r287912. Added: vendor/clang/clang-release_39-r287912/ - copied from r309154, vendor/clang/dist/ From owner-svn-src-vendor@freebsd.org Fri Nov 25 19:08:45 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ABB5CC54392; Fri, 25 Nov 2016 19:08:45 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 624A96B9; Fri, 25 Nov 2016 19:08:45 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAPJ8iLh072007; Fri, 25 Nov 2016 19:08:44 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAPJ8iTU072006; Fri, 25 Nov 2016 19:08:44 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201611251908.uAPJ8iTU072006@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 25 Nov 2016 19:08:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r309156 - vendor/llvm/llvm-release_3939-r287912 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2016 19:08:45 -0000 Author: dim Date: Fri Nov 25 19:08:44 2016 New Revision: 309156 URL: https://svnweb.freebsd.org/changeset/base/309156 Log: Delete incorrect tag. Deleted: vendor/llvm/llvm-release_3939-r287912/ From owner-svn-src-vendor@freebsd.org Fri Nov 25 19:09:04 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B9B5EC543DE; Fri, 25 Nov 2016 19:09:04 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6F9CD86F; Fri, 25 Nov 2016 19:09:04 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAPJ93Ao072063; Fri, 25 Nov 2016 19:09:03 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAPJ93BY072062; Fri, 25 Nov 2016 19:09:03 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201611251909.uAPJ93BY072062@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 25 Nov 2016 19:09:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r309157 - vendor/llvm/llvm-release_39-r287912 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2016 19:09:04 -0000 Author: dim Date: Fri Nov 25 19:09:03 2016 New Revision: 309157 URL: https://svnweb.freebsd.org/changeset/base/309157 Log: Tag llvm release_39 branch r287912. Added: vendor/llvm/llvm-release_39-r287912/ - copied from r309156, vendor/llvm/dist/ From owner-svn-src-vendor@freebsd.org Fri Nov 25 19:09:41 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5664C5444C; Fri, 25 Nov 2016 19:09:41 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A02FE9C3; Fri, 25 Nov 2016 19:09:41 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAPJ9eBN072130; Fri, 25 Nov 2016 19:09:40 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAPJ9e5P072128; Fri, 25 Nov 2016 19:09:40 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201611251909.uAPJ9e5P072128@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 25 Nov 2016 19:09:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r309158 - vendor/compiler-rt/dist/lib/builtins X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2016 19:09:41 -0000 Author: dim Date: Fri Nov 25 19:09:40 2016 New Revision: 309158 URL: https://svnweb.freebsd.org/changeset/base/309158 Log: Vendor import of compiler-rt release_39 branch r287912: https://llvm.org/svn/llvm-project/compiler-rt/branches/release_39@287912 Added: vendor/compiler-rt/dist/lib/builtins/unwind-ehabi-helpers.h (contents, props changed) Modified: vendor/compiler-rt/dist/lib/builtins/gcc_personality_v0.c Modified: vendor/compiler-rt/dist/lib/builtins/gcc_personality_v0.c ============================================================================== --- vendor/compiler-rt/dist/lib/builtins/gcc_personality_v0.c Fri Nov 25 19:09:03 2016 (r309157) +++ vendor/compiler-rt/dist/lib/builtins/gcc_personality_v0.c Fri Nov 25 19:09:40 2016 (r309158) @@ -12,6 +12,17 @@ #include "int_lib.h" #include +#if defined(__arm__) && !defined(__ARM_DWARF_EH__) && !defined(__USING_SJLJ_EXCEPTIONS__) +/* + * When building with older compilers (e.g. clang <3.9), it is possible that we + * have a version of unwind.h which does not provide the EHABI declarations + * which are quired for the C personality to conform to the specification. In + * order to provide forward compatibility for such compilers, we re-declare the + * necessary interfaces in the helper to permit a standalone compilation of the + * builtins (which contains the C unwinding personality for historical reasons). + */ +#include "unwind-ehabi-helpers.h" +#endif /* * Pointer encodings documented at: Added: vendor/compiler-rt/dist/lib/builtins/unwind-ehabi-helpers.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/dist/lib/builtins/unwind-ehabi-helpers.h Fri Nov 25 19:09:40 2016 (r309158) @@ -0,0 +1,55 @@ +/* ===-- arm-ehabi-helpers.h - Supplementary ARM EHABI declarations --------=== + * + * The LLVM Compiler Infrastructure + * + * This file is dual licensed under the MIT and the University of Illinois Open + * Source Licenses. See LICENSE.TXT for details. + * + * ===--------------------------------------------------------------------=== */ + +#ifndef UNWIND_EHABI_HELPERS_H +#define UNWIND_EHABI_HELPERS_H + +#include +/* NOTE: see reasoning for this inclusion below */ +#include + +#if !defined(__ARM_EABI_UNWINDER__) + +/* + * NOTE: _URC_OK, _URC_FAILURE must be present as preprocessor tokens. This + * allows for a substitution of a constant which can be cast into the + * appropriate enumerated type. This header is expected to always be included + * AFTER unwind.h (which is why it is forcefully included above). This ensures + * that we do not overwrite the token for the enumeration. Subsequent uses of + * the token would be clean to rewrite with constant values. + * + * The typedef redeclaration should be safe. Due to the protection granted to + * us by the `__ARM_EABI_UNWINDER__` above, we are guaranteed that we are in a + * header not vended by gcc. The HP unwinder (being an itanium unwinder) does + * not support EHABI, and the GNU unwinder, derived from the HP unwinder, also + * does not support EHABI as of the introduction of this header. As such, we + * are fairly certain that we are in the LLVM case. Here, _Unwind_State is a + * typedef, and so we can get away with a redeclaration. + * + * Guarded redefinitions of the needed unwind state prevent the redefinition of + * those states. + */ + +#define _URC_OK 0 +#define _URC_FAILURE 9 + +typedef uint32_t _Unwind_State; + +#if !defined(_US_UNWIND_FRAME_STARTING) +#define _US_UNWIND_FRAME_STARTING ((_Unwind_State)1) +#endif + +#if !defined(_US_ACTION_MASK) +#define _US_ACTION_MASK ((_Unwind_State)3) +#endif + +#endif + +#endif + From owner-svn-src-vendor@freebsd.org Fri Nov 25 19:10:11 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 24288C544B6; Fri, 25 Nov 2016 19:10:11 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE266B1E; Fri, 25 Nov 2016 19:10:10 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAPJAAjT072213; Fri, 25 Nov 2016 19:10:10 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAPJAAwP072212; Fri, 25 Nov 2016 19:10:10 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201611251910.uAPJAAwP072212@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 25 Nov 2016 19:10:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r309159 - vendor/compiler-rt/compiler-rt-release_39-r287912 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2016 19:10:11 -0000 Author: dim Date: Fri Nov 25 19:10:09 2016 New Revision: 309159 URL: https://svnweb.freebsd.org/changeset/base/309159 Log: Tag compiler-rt release_39 branch r287912. Added: vendor/compiler-rt/compiler-rt-release_39-r287912/ - copied from r309158, vendor/compiler-rt/dist/ From owner-svn-src-vendor@freebsd.org Fri Nov 25 19:11:47 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AF0FEC54641; Fri, 25 Nov 2016 19:11:47 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 89BDAE61; Fri, 25 Nov 2016 19:11:47 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAPJBk0W075973; Fri, 25 Nov 2016 19:11:46 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAPJBkAk075971; Fri, 25 Nov 2016 19:11:46 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201611251911.uAPJBkAk075971@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 25 Nov 2016 19:11:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r309160 - in vendor/libc++/dist: include test/std/utilities/tuple/tuple.tuple/tuple.cnstr X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2016 19:11:47 -0000 Author: dim Date: Fri Nov 25 19:11:46 2016 New Revision: 309160 URL: https://svnweb.freebsd.org/changeset/base/309160 Log: Vendor import of libc++ release_39 branch r287912: https://llvm.org/svn/llvm-project/libcxx/branches/release_39@287912 Modified: vendor/libc++/dist/include/tuple vendor/libc++/dist/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/move.pass.cpp Modified: vendor/libc++/dist/include/tuple ============================================================================== --- vendor/libc++/dist/include/tuple Fri Nov 25 19:10:09 2016 (r309159) +++ vendor/libc++/dist/include/tuple Fri Nov 25 19:11:46 2016 (r309160) @@ -681,7 +681,7 @@ public: < _CheckArgsConstructor< _Dummy - >::template __enable_implicit<_Tp...>(), + >::template __enable_implicit<_Tp const&...>(), bool >::type = false > @@ -699,7 +699,7 @@ public: < _CheckArgsConstructor< _Dummy - >::template __enable_explicit<_Tp...>(), + >::template __enable_explicit<_Tp const&...>(), bool >::type = false > @@ -717,7 +717,7 @@ public: < _CheckArgsConstructor< _Dummy - >::template __enable_implicit<_Tp...>(), + >::template __enable_implicit<_Tp const&...>(), bool >::type = false > @@ -736,7 +736,7 @@ public: < _CheckArgsConstructor< _Dummy - >::template __enable_explicit<_Tp...>(), + >::template __enable_explicit<_Tp const&...>(), bool >::type = false > Modified: vendor/libc++/dist/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/move.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/move.pass.cpp Fri Nov 25 19:10:09 2016 (r309159) +++ vendor/libc++/dist/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/move.pass.cpp Fri Nov 25 19:11:46 2016 (r309160) @@ -35,6 +35,52 @@ struct ConstructsWithTupleLeaf } }; +// move_only type which triggers the empty base optimization +struct move_only_ebo { + move_only_ebo() = default; + move_only_ebo(move_only_ebo&&) = default; +}; + +// a move_only type which does not trigger the empty base optimization +struct move_only_large final { + move_only_large() : value(42) {} + move_only_large(move_only_large&&) = default; + int value; +}; + +template +void test_sfinae() { + using Tup = std::tuple; + using Alloc = std::allocator; + using Tag = std::allocator_arg_t; + // special members + { + static_assert(std::is_default_constructible::value, ""); + static_assert(std::is_move_constructible::value, ""); + static_assert(!std::is_copy_constructible::value, ""); + static_assert(!std::is_constructible::value, ""); + } + // args constructors + { + static_assert(std::is_constructible::value, ""); + static_assert(!std::is_constructible::value, ""); + static_assert(!std::is_constructible::value, ""); + } + // uses-allocator special member constructors + { + static_assert(std::is_constructible::value, ""); + static_assert(std::is_constructible::value, ""); + static_assert(!std::is_constructible::value, ""); + static_assert(!std::is_constructible::value, ""); + } + // uses-allocator args constructors + { + static_assert(std::is_constructible::value, ""); + static_assert(!std::is_constructible::value, ""); + static_assert(!std::is_constructible::value, ""); + } +} + int main() { { @@ -72,4 +118,8 @@ int main() d_t d((ConstructsWithTupleLeaf())); d_t d2(static_cast(d)); } + { + test_sfinae(); + test_sfinae(); + } } From owner-svn-src-vendor@freebsd.org Fri Nov 25 19:13:36 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0C463C546AC; Fri, 25 Nov 2016 19:13:36 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B751098; Fri, 25 Nov 2016 19:13:35 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAPJDYQj076078; Fri, 25 Nov 2016 19:13:34 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAPJDY7x076077; Fri, 25 Nov 2016 19:13:34 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201611251913.uAPJDY7x076077@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 25 Nov 2016 19:13:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r309161 - vendor/libc++/libc++-release_39-r287912 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2016 19:13:36 -0000 Author: dim Date: Fri Nov 25 19:13:34 2016 New Revision: 309161 URL: https://svnweb.freebsd.org/changeset/base/309161 Log: Tag libc++ release_39 branch r287912. Added: vendor/libc++/libc++-release_39-r287912/ - copied from r309160, vendor/libc++/dist/ From owner-svn-src-vendor@freebsd.org Fri Nov 25 19:14:26 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CBFD3C54716; Fri, 25 Nov 2016 19:14:26 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 819421FD; Fri, 25 Nov 2016 19:14:26 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAPJEPAS076153; Fri, 25 Nov 2016 19:14:25 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAPJEP96076150; Fri, 25 Nov 2016 19:14:25 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201611251914.uAPJEP96076150@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 25 Nov 2016 19:14:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r309162 - in vendor/lld/dist: ELF test/ELF X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2016 19:14:26 -0000 Author: dim Date: Fri Nov 25 19:14:25 2016 New Revision: 309162 URL: https://svnweb.freebsd.org/changeset/base/309162 Log: Vendor import of lld release_39 branch r287912: https://llvm.org/svn/llvm-project/lld/branches/release_39@287912 Modified: vendor/lld/dist/ELF/InputFiles.cpp vendor/lld/dist/test/ELF/as-needed-no-reloc.s vendor/lld/dist/test/ELF/shared.s Modified: vendor/lld/dist/ELF/InputFiles.cpp ============================================================================== --- vendor/lld/dist/ELF/InputFiles.cpp Fri Nov 25 19:13:34 2016 (r309161) +++ vendor/lld/dist/ELF/InputFiles.cpp Fri Nov 25 19:14:25 2016 (r309162) @@ -18,6 +18,7 @@ #include "llvm/CodeGen/Analysis.h" #include "llvm/IR/LLVMContext.h" #include "llvm/IR/Module.h" +#include "llvm/Support/Path.h" #include "llvm/Support/raw_ostream.h" using namespace llvm; @@ -459,7 +460,7 @@ template void SharedFileinitStringTable(); - SoName = this->getName(); + SoName = sys::path::filename(this->getName()); if (!DynamicSec) return; Modified: vendor/lld/dist/test/ELF/as-needed-no-reloc.s ============================================================================== --- vendor/lld/dist/test/ELF/as-needed-no-reloc.s Fri Nov 25 19:13:34 2016 (r309161) +++ vendor/lld/dist/test/ELF/as-needed-no-reloc.s Fri Nov 25 19:14:25 2016 (r309162) @@ -16,7 +16,7 @@ # CHECK-NEXT: Other: 0 # CHECK-NEXT: Section: Undefined -# CHECK: NEEDED SharedLibrary ({{.*}}2.so) +# CHECK: NEEDED SharedLibrary (as-needed-no-reloc{{.*}}2.so) .globl _start _start: Modified: vendor/lld/dist/test/ELF/shared.s ============================================================================== --- vendor/lld/dist/test/ELF/shared.s Fri Nov 25 19:13:34 2016 (r309161) +++ vendor/lld/dist/test/ELF/shared.s Fri Nov 25 19:14:25 2016 (r309162) @@ -119,7 +119,6 @@ // CHECK-NEXT: EntrySize: 8 // CHECK-NEXT: SectionData ( // CHECK: ) -// CHECK-NEXT: } // CHECK: Name: .symtab // CHECK-NEXT: Type: SHT_SYMTAB From owner-svn-src-vendor@freebsd.org Fri Nov 25 19:14:51 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8FF87C547D4; Fri, 25 Nov 2016 19:14:51 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4761D3E8; Fri, 25 Nov 2016 19:14:51 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAPJEoXZ076209; Fri, 25 Nov 2016 19:14:50 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAPJEoqJ076208; Fri, 25 Nov 2016 19:14:50 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201611251914.uAPJEoqJ076208@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 25 Nov 2016 19:14:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r309163 - vendor/lld/lld-release_39-r287912 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2016 19:14:51 -0000 Author: dim Date: Fri Nov 25 19:14:50 2016 New Revision: 309163 URL: https://svnweb.freebsd.org/changeset/base/309163 Log: Tag lld release_39 branch r287912. Added: vendor/lld/lld-release_39-r287912/ - copied from r309162, vendor/lld/dist/ From owner-svn-src-vendor@freebsd.org Fri Nov 25 19:15:33 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E556C5484C; Fri, 25 Nov 2016 19:15:33 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 24B907CA; Fri, 25 Nov 2016 19:15:33 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAPJFWL3076293; Fri, 25 Nov 2016 19:15:32 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAPJFVgo076284; Fri, 25 Nov 2016 19:15:31 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201611251915.uAPJFVgo076284@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 25 Nov 2016 19:15:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r309164 - in vendor/lldb/dist: include/lldb/Core source/Core source/Plugins/ABI/SysV-mips64 source/Plugins/Process/Linux source/Plugins/Process/Utility source/Plugins/Process/gdb-remote X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2016 19:15:33 -0000 Author: dim Date: Fri Nov 25 19:15:31 2016 New Revision: 309164 URL: https://svnweb.freebsd.org/changeset/base/309164 Log: Vendor import of lldb release_39 branch r287912: https://llvm.org/svn/llvm-project/lldb/branches/release_39@287912 Modified: vendor/lldb/dist/include/lldb/Core/ArchSpec.h vendor/lldb/dist/source/Core/ArchSpec.cpp vendor/lldb/dist/source/Core/RegisterValue.cpp vendor/lldb/dist/source/Plugins/ABI/SysV-mips64/ABISysV_mips64.cpp vendor/lldb/dist/source/Plugins/Process/Linux/NativeRegisterContextLinux.cpp vendor/lldb/dist/source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp vendor/lldb/dist/source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.h vendor/lldb/dist/source/Plugins/Process/Utility/RegisterInfos_mips.h vendor/lldb/dist/source/Plugins/Process/Utility/RegisterInfos_mips64.h vendor/lldb/dist/source/Plugins/Process/Utility/lldb-mips-linux-register-enums.h vendor/lldb/dist/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp vendor/lldb/dist/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp Modified: vendor/lldb/dist/include/lldb/Core/ArchSpec.h ============================================================================== --- vendor/lldb/dist/include/lldb/Core/ArchSpec.h Fri Nov 25 19:14:50 2016 (r309163) +++ vendor/lldb/dist/include/lldb/Core/ArchSpec.h Fri Nov 25 19:15:31 2016 (r309164) @@ -382,6 +382,14 @@ public: return m_core >= eCore_arm_generic && m_core < kNumCores; } + //------------------------------------------------------------------ + /// Return a string representing target application ABI. + /// + /// @return A string representing target application ABI. + //------------------------------------------------------------------ + std::string GetTargetABI() const; + + bool TripleVendorWasSpecified() const { @@ -677,6 +685,8 @@ public: m_flags = flags; } + void SetFlags(std::string elf_abi); + protected: bool IsEqualTo (const ArchSpec& rhs, bool exact_match) const; Modified: vendor/lldb/dist/source/Core/ArchSpec.cpp ============================================================================== --- vendor/lldb/dist/source/Core/ArchSpec.cpp Fri Nov 25 19:14:50 2016 (r309163) +++ vendor/lldb/dist/source/Core/ArchSpec.cpp Fri Nov 25 19:15:31 2016 (r309164) @@ -519,11 +519,46 @@ ArchSpec::IsMIPS() const return false; } -std::string -ArchSpec::GetClangTargetCPU () -{ - std::string cpu; - const llvm::Triple::ArchType machine = GetMachine(); + +std::string ArchSpec::GetTargetABI() const { + + std::string abi; + + if (IsMIPS()) { + switch (GetFlags() & ArchSpec::eMIPSABI_mask) { + case ArchSpec::eMIPSABI_N64: + abi = "n64"; + return abi; + case ArchSpec::eMIPSABI_N32: + abi = "n32"; + return abi; + case ArchSpec::eMIPSABI_O32: + abi = "o32"; + return abi; + default: + return abi; + } + } + return abi; +} + +void ArchSpec::SetFlags(std::string elf_abi) { + + uint32_t flag = GetFlags(); + if (IsMIPS()) { + if (elf_abi == "n64") + flag |= ArchSpec::eMIPSABI_N64; + else if (elf_abi == "n32") + flag |= ArchSpec::eMIPSABI_N32; + else if (elf_abi == "o32") + flag |= ArchSpec::eMIPSABI_O32; + } + SetFlags(flag); +} + +std::string ArchSpec::GetClangTargetCPU() { + std::string cpu; + const llvm::Triple::ArchType machine = GetMachine(); if (machine == llvm::Triple::mips || machine == llvm::Triple::mipsel || Modified: vendor/lldb/dist/source/Core/RegisterValue.cpp ============================================================================== --- vendor/lldb/dist/source/Core/RegisterValue.cpp Fri Nov 25 19:14:50 2016 (r309163) +++ vendor/lldb/dist/source/Core/RegisterValue.cpp Fri Nov 25 19:15:31 2016 (r309164) @@ -652,34 +652,37 @@ RegisterValue::GetAsUInt32 (uint32_t fai uint64_t RegisterValue::GetAsUInt64 (uint64_t fail_value, bool *success_ptr) const { - if (success_ptr) - *success_ptr = true; - switch (m_type) - { - default: break; - case eTypeUInt8: - case eTypeUInt16: - case eTypeUInt32: - case eTypeUInt64: - case eTypeFloat: - case eTypeDouble: - case eTypeLongDouble: return m_scalar.ULongLong(fail_value); - case eTypeBytes: - { - switch (buffer.length) - { - default: break; - case 1: - case 2: - case 4: - case 8: return *(const uint64_t *)buffer.bytes; - } - } - break; - } - if (success_ptr) - *success_ptr = false; - return fail_value; + if (success_ptr) + *success_ptr = true; + switch (m_type) { + default: + break; + case eTypeUInt8: + case eTypeUInt16: + case eTypeUInt32: + case eTypeUInt64: + case eTypeFloat: + case eTypeDouble: + case eTypeLongDouble: + return m_scalar.ULongLong(fail_value); + case eTypeBytes: { + switch (buffer.length) { + default: + break; + case 1: + return *(const uint8_t *)buffer.bytes; + case 2: + return *(const uint16_t *)buffer.bytes; + case 4: + return *(const uint32_t *)buffer.bytes; + case 8: + return *(const uint64_t *)buffer.bytes; + } + } break; + } + if (success_ptr) + *success_ptr = false; + return fail_value; } llvm::APInt Modified: vendor/lldb/dist/source/Plugins/ABI/SysV-mips64/ABISysV_mips64.cpp ============================================================================== --- vendor/lldb/dist/source/Plugins/ABI/SysV-mips64/ABISysV_mips64.cpp Fri Nov 25 19:14:50 2016 (r309163) +++ vendor/lldb/dist/source/Plugins/ABI/SysV-mips64/ABISysV_mips64.cpp Fri Nov 25 19:15:31 2016 (r309164) @@ -565,109 +565,137 @@ ABISysV_mips64::GetReturnValueObjectImpl // Any structure of up to 16 bytes in size is returned in the registers. if (byte_size <= 16) { - DataBufferSP data_sp (new DataBufferHeap(16, 0)); - DataExtractor return_ext (data_sp, - target_byte_order, - target->GetArchitecture().GetAddressByteSize()); + DataBufferSP data_sp(new DataBufferHeap(16, 0)); + DataExtractor return_ext(data_sp, target_byte_order, + target->GetArchitecture().GetAddressByteSize()); RegisterValue r2_value, r3_value, f0_value, f1_value, f2_value; + // Tracks how much bytes of r2 and r3 registers we've consumed so far + uint32_t integer_bytes = 0; - uint32_t integer_bytes = 0; // Tracks how much bytes of r2 and r3 registers we've consumed so far - bool use_fp_regs = 0; // True if return values are in FP return registers. - bool found_non_fp_field = 0; // True if we found any non floating point field in structure. - bool use_r2 = 0; // True if return values are in r2 register. - bool use_r3 = 0; // True if return values are in r3 register. - bool sucess = 0; // True if the result is copied into our data buffer - std::string name; - bool is_complex; - uint32_t count; - const uint32_t num_children = return_compiler_type.GetNumFields (); - - // A structure consisting of one or two FP values (and nothing else) will be - // returned in the two FP return-value registers i.e fp0 and fp2. - if (num_children <= 2) - { - uint64_t field_bit_offset = 0; - - // Check if this structure contains only floating point fields - for (uint32_t idx = 0; idx < num_children; idx++) - { - CompilerType field_compiler_type = return_compiler_type.GetFieldAtIndex(idx, name, &field_bit_offset, nullptr, nullptr); - - if (field_compiler_type.IsFloatingPointType (count, is_complex)) - use_fp_regs = 1; - else - found_non_fp_field = 1; - } - - if (use_fp_regs && !found_non_fp_field) - { - // We have one or two FP-only values in this structure. Get it from f0/f2 registers. - DataExtractor f0_data, f1_data, f2_data; - const RegisterInfo *f0_info = reg_ctx->GetRegisterInfoByName("f0", 0); - const RegisterInfo *f1_info = reg_ctx->GetRegisterInfoByName("f1", 0); - const RegisterInfo *f2_info = reg_ctx->GetRegisterInfoByName("f2", 0); - - reg_ctx->ReadRegister (f0_info, f0_value); - reg_ctx->ReadRegister (f2_info, f2_value); - - f0_value.GetData(f0_data); - f2_value.GetData(f2_data); - - for (uint32_t idx = 0; idx < num_children; idx++) - { - CompilerType field_compiler_type = return_compiler_type.GetFieldAtIndex(idx, name, &field_bit_offset, nullptr, nullptr); - const size_t field_byte_width = field_compiler_type.GetByteSize(nullptr); - - DataExtractor *copy_from_extractor = nullptr; - - if (idx == 0) - { - if (field_byte_width == 16) // This case is for long double type. - { - // If structure contains long double type, then it is returned in fp0/fp1 registers. - reg_ctx->ReadRegister (f1_info, f1_value); - f1_value.GetData(f1_data); - - if (target_byte_order == eByteOrderLittle) - { - f0_data.Append(f1_data); - copy_from_extractor = &f0_data; - } - else - { - f1_data.Append(f0_data); - copy_from_extractor = &f1_data; - } - } - else - copy_from_extractor = &f0_data; // This is in f0, copy from register to our result structure - } - else - copy_from_extractor = &f2_data; // This is in f2, copy from register to our result structure - - // Sanity check to avoid crash - if (!copy_from_extractor || field_byte_width > copy_from_extractor->GetByteSize()) - return return_valobj_sp; - - // copy the register contents into our data buffer - copy_from_extractor->CopyByteOrderedData (0, - field_byte_width, - data_sp->GetBytes() + (field_bit_offset/8), - field_byte_width, - target_byte_order); - } - - // The result is in our data buffer. Create a variable object out of it - return_valobj_sp = ValueObjectConstResult::Create (&thread, - return_compiler_type, - ConstString(""), - return_ext); - - return return_valobj_sp; - } - } - + // True if return values are in FP return registers. + bool use_fp_regs = 0; + // True if we found any non floating point field in structure. + bool found_non_fp_field = 0; + // True if return values are in r2 register. + bool use_r2 = 0; + // True if return values are in r3 register. + bool use_r3 = 0; + // True if the result is copied into our data buffer + bool sucess = 0; + std::string name; + bool is_complex; + uint32_t count; + const uint32_t num_children = return_compiler_type.GetNumFields(); + + // A structure consisting of one or two FP values (and nothing else) will + // be returned in the two FP return-value registers i.e fp0 and fp2. + + if (num_children <= 2) + { + uint64_t field_bit_offset = 0; + + // Check if this structure contains only floating point fields + for (uint32_t idx = 0; idx < num_children; idx++) + { + CompilerType field_compiler_type = + return_compiler_type.GetFieldAtIndex(idx, name, &field_bit_offset, + nullptr, nullptr); + + if (field_compiler_type.IsFloatingPointType(count, is_complex)) + use_fp_regs = 1; + else + found_non_fp_field = 1; + } + + if (use_fp_regs && !found_non_fp_field) + { + // We have one or two FP-only values in this structure. Get it from + // f0/f2 registers. + DataExtractor f0_data, f1_data, f2_data; + const RegisterInfo *f0_info = reg_ctx->GetRegisterInfoByName("f0", 0); + const RegisterInfo *f1_info = reg_ctx->GetRegisterInfoByName("f1", 0); + const RegisterInfo *f2_info = reg_ctx->GetRegisterInfoByName("f2", 0); + + reg_ctx->ReadRegister(f0_info, f0_value); + reg_ctx->ReadRegister(f2_info, f2_value); + + f0_value.GetData(f0_data); + + + for (uint32_t idx = 0; idx < num_children; idx++) + { + CompilerType field_compiler_type = return_compiler_type.GetFieldAtIndex(idx, name, + &field_bit_offset, + nullptr, nullptr); + const size_t field_byte_width = field_compiler_type.GetByteSize(nullptr); + + DataExtractor *copy_from_extractor = nullptr; + uint64_t return_value[2]; + offset_t offset = 0; + + if (idx == 0) + { + // This case is for long double type. + if (field_byte_width == 16) + { + + // If structure contains long double type, then it is returned + // in fp0/fp1 registers. + + + + if (target_byte_order == eByteOrderLittle) + { + return_value[0] = f0_data.GetU64(&offset); + reg_ctx->ReadRegister(f1_info, f1_value); + f1_value.GetData(f1_data); + offset = 0; + return_value[1] = f1_data.GetU64(&offset); + } + else + { + return_value[1] = f0_data.GetU64(&offset); + reg_ctx->ReadRegister(f1_info, f1_value); + f1_value.GetData(f1_data); + offset = 0; + return_value[0] = f1_data.GetU64(&offset); + } + + f0_data.SetData(return_value, field_byte_width, + target_byte_order); + } + copy_from_extractor = &f0_data; // This is in f0, copy from + + // register to our result + // structure + } + else + { + f2_value.GetData(f2_data); + // This is in f2, copy from register to our result structure + copy_from_extractor = &f2_data; + } + + // Sanity check to avoid crash + if (!copy_from_extractor || field_byte_width > copy_from_extractor->GetByteSize()) + return return_valobj_sp; + + // copy the register contents into our data buffer + copy_from_extractor->CopyByteOrderedData(0, field_byte_width,data_sp->GetBytes() + (field_bit_offset / 8), + field_byte_width, target_byte_order); + } + + // The result is in our data buffer. Create a variable object out of + // it + return_valobj_sp = ValueObjectConstResult::Create(&thread, return_compiler_type, ConstString(""), + return_ext); + + return return_valobj_sp; + } + } + + // If we reach here, it means this structure either contains more than two fields or // it contains at least one non floating point type. // In that case, all fields are returned in GP return registers. Modified: vendor/lldb/dist/source/Plugins/Process/Linux/NativeRegisterContextLinux.cpp ============================================================================== --- vendor/lldb/dist/source/Plugins/Process/Linux/NativeRegisterContextLinux.cpp Fri Nov 25 19:14:50 2016 (r309163) +++ vendor/lldb/dist/source/Plugins/Process/Linux/NativeRegisterContextLinux.cpp Fri Nov 25 19:15:31 2016 (r309164) @@ -180,8 +180,8 @@ NativeRegisterContextLinux::DoReadRegist PTRACE_PEEKUSER, m_thread.GetID(), reinterpret_cast(offset), nullptr, 0, &data); if (error.Success()) - // First cast to an unsigned of the same size to avoid sign extension. - value.SetUInt64(static_cast(data)); + // First cast to an unsigned of the same size to avoid sign extension. + value.SetUInt(static_cast(data), size); if (log) log->Printf ("NativeRegisterContextLinux::%s() reg %s: 0x%lx", __FUNCTION__, reg_name, data); Modified: vendor/lldb/dist/source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp ============================================================================== --- vendor/lldb/dist/source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp Fri Nov 25 19:14:50 2016 (r309163) +++ vendor/lldb/dist/source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp Fri Nov 25 19:15:31 2016 (r309164) @@ -22,6 +22,7 @@ #include "lldb/Host/HostInfo.h" #include "lldb/Host/Host.h" #include "lldb/Core/EmulateInstruction.h" +#include "lldb/Utility/LLDBAssert.h" #include "lldb/lldb-enumerations.h" #include "lldb/lldb-private-enumerations.h" #include "Plugins/Process/Linux/NativeProcessLinux.h" @@ -569,10 +570,14 @@ NativeRegisterContextLinux_mips64::ReadR } const uint32_t reg = reg_info->kinds[lldb::eRegisterKindLLDB]; + uint8_t byte_size = reg_info->byte_size; if (reg == LLDB_INVALID_REGNUM) { - // This is likely an internal register for lldb use only and should not be directly queried. - error.SetErrorStringWithFormat ("register \"%s\" is an internal-only lldb register, cannot read directly", reg_info->name); + // This is likely an internal register for lldb use only and should not be + // directly queried. + error.SetErrorStringWithFormat("register \"%s\" is an internal-only lldb " + "register, cannot read directly", + reg_info->name); return error; } @@ -584,7 +589,8 @@ NativeRegisterContextLinux_mips64::ReadR if (IsMSA(reg) || IsFPR(reg)) { - uint8_t *src; + uint8_t *src = nullptr; + lldbassert(reg_info->byte_offset < sizeof(UserArea)); error = ReadCP1(); @@ -596,29 +602,35 @@ NativeRegisterContextLinux_mips64::ReadR if (IsFPR(reg)) { - assert (reg_info->byte_offset < sizeof(UserArea)); - src = (uint8_t *)&m_fpr + reg_info->byte_offset - (sizeof(m_gpr)); + if (IsFR0() && (byte_size != 4)) + { + byte_size = 4; + uint8_t ptrace_index; + ptrace_index = reg_info->kinds[lldb::eRegisterKindProcessPlugin]; + src = ReturnFPOffset(ptrace_index, reg_info->byte_offset); + } + else + src = (uint8_t *)&m_fpr + reg_info->byte_offset - sizeof(m_gpr); } else - { - assert (reg_info->byte_offset < sizeof(UserArea)); - src = (uint8_t *)&m_msa + reg_info->byte_offset - (sizeof(m_gpr) + sizeof(m_fpr)); - } - switch (reg_info->byte_size) + src = (uint8_t *)&m_msa + reg_info->byte_offset - + (sizeof(m_gpr) + sizeof(m_fpr)); + switch (byte_size) { case 4: - reg_value.SetUInt32(*(uint32_t *)src); - break; + reg_value.SetUInt32(*(uint32_t *)src); + break; case 8: - reg_value.SetUInt64(*(uint64_t *)src); - break; + reg_value.SetUInt64(*(uint64_t *)src); + break; case 16: - reg_value.SetBytes((const void *)src, 16, GetByteOrder()); - break; + reg_value.SetBytes((const void *)src, 16, GetByteOrder()); + break; default: - assert(false && "Unhandled data size."); - error.SetErrorStringWithFormat ("unhandled byte size: %" PRIu32, reg_info->byte_size); - break; + assert(false && "Unhandled data size."); + error.SetErrorStringWithFormat("unhandled byte size: %" PRIu32, + reg_info->byte_size); + break; } } else @@ -649,44 +661,52 @@ NativeRegisterContextLinux_mips64::Write if (IsFPR(reg_index) || IsMSA(reg_index)) { - uint8_t *dst; - uint64_t *src; + uint8_t *dst = nullptr; + uint64_t *src = nullptr; + uint8_t byte_size = reg_info->byte_size; + lldbassert(reg_info->byte_offset < sizeof(UserArea)); // Initialise the FP and MSA buffers by reading all co-processor 1 registers ReadCP1(); if (IsFPR(reg_index)) { - assert (reg_info->byte_offset < sizeof(UserArea)); - dst = (uint8_t *)&m_fpr + reg_info->byte_offset - (sizeof(m_gpr)); + if (IsFR0() && (byte_size != 4)) + { + byte_size = 4; + uint8_t ptrace_index; + ptrace_index = reg_info->kinds[lldb::eRegisterKindProcessPlugin]; + dst = ReturnFPOffset(ptrace_index, reg_info->byte_offset); + } + else + dst = (uint8_t *)&m_fpr + reg_info->byte_offset - sizeof(m_gpr); } else - { - assert (reg_info->byte_offset < sizeof(UserArea)); - dst = (uint8_t *)&m_msa + reg_info->byte_offset - (sizeof(m_gpr) + sizeof(m_fpr)); - } - switch (reg_info->byte_size) + dst = (uint8_t *)&m_msa + reg_info->byte_offset - + (sizeof(m_gpr) + sizeof(m_fpr)); + switch (byte_size) { case 4: - *(uint32_t *)dst = reg_value.GetAsUInt32(); - break; + *(uint32_t *)dst = reg_value.GetAsUInt32(); + break; case 8: - *(uint64_t *)dst = reg_value.GetAsUInt64(); - break; + *(uint64_t *)dst = reg_value.GetAsUInt64(); + break; case 16: - src = (uint64_t *)reg_value.GetBytes(); - *(uint64_t *)dst = *src; - *(uint64_t *)(dst + 8) = *(src + 1); - break; + src = (uint64_t *)reg_value.GetBytes(); + *(uint64_t *)dst = *src; + *(uint64_t *)(dst + 8) = *(src + 1); + break; default: - assert(false && "Unhandled data size."); - error.SetErrorStringWithFormat ("unhandled byte size: %" PRIu32, reg_info->byte_size); - break; + assert(false && "Unhandled data size."); + error.SetErrorStringWithFormat("unhandled byte size: %" PRIu32, + reg_info->byte_size); + break; } error = WriteCP1(); if (!error.Success()) { - error.SetErrorString ("failed to write co-processor 1 register"); + error.SetErrorString("failed to write co-processor 1 register"); return error; } } @@ -797,11 +817,12 @@ NativeRegisterContextLinux_mips64::ReadC { Error error; - uint8_t *src, *dst; + uint8_t *src = nullptr; + uint8_t *dst = nullptr; lldb::ByteOrder byte_order = GetByteOrder(); - uint32_t IsBigEndian = (byte_order == lldb::eByteOrderBig); + bool IsBigEndian = (byte_order == lldb::eByteOrderBig); if (IsMSAAvailable()) { @@ -823,22 +844,28 @@ NativeRegisterContextLinux_mips64::ReadC { error = NativeRegisterContextLinux::ReadFPR(); } + return error; +} - // TODO: Add support for FRE - if (IsFR0()) +uint8_t * +NativeRegisterContextLinux_mips64::ReturnFPOffset(uint8_t reg_index, + uint32_t byte_offset) +{ + uint8_t *fp_buffer_ptr = nullptr; + lldb::ByteOrder byte_order = GetByteOrder(); + bool IsBigEndian = (byte_order == lldb::eByteOrderBig); + if (reg_index % 2) { - src = (uint8_t *)&m_fpr + 4 + (IsBigEndian * 4); - dst = (uint8_t *)&m_fpr + 8 + (IsBigEndian * 4); - for (int i = 0; i < (NUM_REGISTERS / 2); i++) - { - // copy odd single from top of neighbouring even double - *(uint32_t *) dst = *(uint32_t *) src; - src = src + 16; - dst = dst + 16; - } + uint8_t offset_diff = (IsBigEndian) ? 8 : 4; + fp_buffer_ptr = (uint8_t *)&m_fpr + byte_offset + - offset_diff - sizeof(m_gpr); } - - return error; + else + { + fp_buffer_ptr = (uint8_t *)&m_fpr + byte_offset + + 4 * (IsBigEndian) - sizeof(m_gpr); + } + return fp_buffer_ptr; } Error @@ -846,25 +873,12 @@ NativeRegisterContextLinux_mips64::Write { Error error; - uint8_t *src, *dst; + uint8_t *src = nullptr; + uint8_t *dst = nullptr; lldb::ByteOrder byte_order = GetByteOrder(); - uint32_t IsBigEndian = (byte_order == lldb::eByteOrderBig); - - // TODO: Add support for FRE - if (IsFR0()) - { - src = (uint8_t *)&m_fpr + 8 + (IsBigEndian * 4); - dst = (uint8_t *)&m_fpr + 4 + (IsBigEndian * 4); - for (int i = 0; i < (NUM_REGISTERS / 2); i++) - { - // copy odd single to top of neighbouring even double - *(uint32_t *) dst = *(uint32_t *) src; - src = src + 16; - dst = dst + 16; - } - } + bool IsBigEndian = (byte_order == lldb::eByteOrderBig); if (IsMSAAvailable()) { @@ -1374,51 +1388,58 @@ NativeRegisterContextLinux_mips64::NumSu } return num_valid; } -Error -NativeRegisterContextLinux_mips64::DoReadRegisterValue(uint32_t offset, - const char* reg_name, - uint32_t size, - RegisterValue &value) + +Error NativeRegisterContextLinux_mips64::ReadRegisterRaw(uint32_t reg_index, + RegisterValue &value) { - GPR_linux_mips regs; - ::memset(®s, 0, sizeof(GPR_linux_mips)); + const RegisterInfo *const reg_info = GetRegisterInfoAtIndex(reg_index); - // Clear all bits in RegisterValue before writing actual value read from ptrace to avoid garbage value in 32-bit MSB - value.SetBytes((void *)(((unsigned char *)®s) + offset), 8, GetByteOrder()); - Error error = NativeProcessLinux::PtraceWrapper(PTRACE_GETREGS, m_thread.GetID(), NULL, ®s, sizeof regs); - if (error.Success()) - { - lldb_private::ArchSpec arch; - if (m_thread.GetProcess()->GetArchitecture(arch)) - { - void* target_address = ((uint8_t*)®s) + offset + 4 * (arch.GetMachine() == llvm::Triple::mips); - uint32_t target_size; - if ((::strcmp(reg_name, "sr") == 0) || (::strcmp(reg_name, "cause") == 0) || (::strcmp(reg_name, "config5") == 0)) - target_size = 4; - else - target_size = arch.GetFlags() & lldb_private::ArchSpec::eMIPSABI_O32 ? 4 : 8; - value.SetBytes(target_address, target_size, arch.GetByteOrder()); - } - else - error.SetErrorString("failed to get architecture"); - } - return error; + if (!reg_info) + return Error("register %" PRIu32 " not found", reg_index); + + uint32_t offset = reg_info->kinds[lldb::eRegisterKindProcessPlugin]; + + if ((offset == ptrace_sr_mips) || (offset == ptrace_config5_mips)) + return Read_SR_Config(reg_info->byte_offset, reg_info->name, + reg_info->byte_size, value); + + return DoReadRegisterValue(offset, reg_info->name, reg_info->byte_size, + value); } -Error -NativeRegisterContextLinux_mips64::DoWriteRegisterValue(uint32_t offset, - const char* reg_name, - const RegisterValue &value) +Error NativeRegisterContextLinux_mips64::WriteRegisterRaw( + uint32_t reg_index, const RegisterValue &value) +{ + const RegisterInfo *const reg_info = GetRegisterInfoAtIndex(reg_index); + + if (!reg_info) + return Error("register %" PRIu32 " not found", reg_index); + + if (reg_info->invalidate_regs) + lldbassert(false && "reg_info->invalidate_regs is unhandled"); + + uint32_t offset = reg_info->kinds[lldb::eRegisterKindProcessPlugin]; + return DoWriteRegisterValue(offset, reg_info->name, value); +} + +Error NativeRegisterContextLinux_mips64::Read_SR_Config(uint32_t offset, + const char *reg_name, + uint32_t size, + RegisterValue &value) { GPR_linux_mips regs; - Error error = NativeProcessLinux::PtraceWrapper(PTRACE_GETREGS, m_thread.GetID(), NULL, ®s, sizeof regs); + ::memset(®s, 0, sizeof(GPR_linux_mips)); + + Error error = NativeProcessLinux::PtraceWrapper(PTRACE_GETREGS, m_thread.GetID(), + NULL, ®s, sizeof regs); if (error.Success()) { lldb_private::ArchSpec arch; if (m_thread.GetProcess()->GetArchitecture(arch)) { - ::memcpy((void *)(((unsigned char *)(®s)) + offset), value.GetBytes(), arch.GetFlags() & lldb_private::ArchSpec::eMIPSABI_O32 ? 4 : 8); - error = NativeProcessLinux::PtraceWrapper(PTRACE_SETREGS, m_thread.GetID(), NULL, ®s, sizeof regs); + void *target_address = ((uint8_t *)®s) + offset + + 4 * (arch.GetMachine() == llvm::Triple::mips); + value.SetUInt(*(uint32_t *)target_address, size); } else error.SetErrorString("failed to get architecture"); Modified: vendor/lldb/dist/source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.h ============================================================================== --- vendor/lldb/dist/source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.h Fri Nov 25 19:14:50 2016 (r309163) +++ vendor/lldb/dist/source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.h Fri Nov 25 19:15:31 2016 (r309164) @@ -63,6 +63,9 @@ namespace process_linux { Error IsWatchpointHit (uint32_t wp_index, bool &is_hit) override; + uint8_t *ReturnFPOffset(uint8_t reg_index, uint32_t byte_offset); + + Error GetWatchpointHitIndex(uint32_t &wp_index, lldb::addr_t trap_addr) override; @@ -93,21 +96,22 @@ namespace process_linux { IsMSAAvailable(); protected: + Error - DoReadRegisterValue(uint32_t offset, - const char* reg_name, - uint32_t size, - RegisterValue &value) override; + Read_SR_Config(uint32_t offset, const char *reg_name, uint32_t size, + RegisterValue &value); Error - DoWriteRegisterValue(uint32_t offset, - const char* reg_name, - const RegisterValue &value) override; + ReadRegisterRaw(uint32_t reg_index, RegisterValue &value) override; Error DoReadWatchPointRegisterValue(lldb::tid_t tid, void* watch_readback); Error + WriteRegisterRaw(uint32_t reg_index, + const RegisterValue &value) override; + + Error DoWriteWatchPointRegisterValue(lldb::tid_t tid, void* watch_readback); bool Modified: vendor/lldb/dist/source/Plugins/Process/Utility/RegisterInfos_mips.h ============================================================================== --- vendor/lldb/dist/source/Plugins/Process/Utility/RegisterInfos_mips.h Fri Nov 25 19:14:50 2016 (r309163) +++ vendor/lldb/dist/source/Plugins/Process/Utility/RegisterInfos_mips.h Fri Nov 25 19:15:31 2016 (r309164) @@ -35,9 +35,14 @@ LLVM_EXTENSION offsetof(MSA_linux_mips, regname)) // Note that the size and offset will be updated by platform-specific classes. -#define DEFINE_GPR(reg, alt, kind1, kind2, kind3, kind4) \ - { #reg, alt, sizeof(((GPR_linux_mips*)NULL)->reg) / 2, GPR_OFFSET(reg), eEncodingUint, \ - eFormatHex, { kind1, kind2, kind3, kind4, gpr_##reg##_mips }, NULL, NULL, NULL, 0} +#define DEFINE_GPR(reg, alt, kind1, kind2, kind3) \ + { \ + #reg, alt, sizeof(((GPR_linux_mips *) NULL)->reg) / 2, \ + GPR_OFFSET(reg), eEncodingUint, eFormatHex, \ + {kind1, kind2, kind3, ptrace_##reg##_mips, \ + gpr_##reg##_mips }, \ + NULL, NULL, NULL, 0 \ + } const uint8_t dwarf_opcode_mips [] = { llvm::dwarf::DW_OP_regx, dwarf_sr_mips, llvm::dwarf::DW_OP_lit1, @@ -45,13 +50,24 @@ const uint8_t dwarf_opcode_mips [] = { llvm::dwarf::DW_OP_lit26, llvm::dwarf::DW_OP_shr }; -#define DEFINE_FPR(reg, alt, kind1, kind2, kind3, kind4) \ - { #reg, alt, sizeof(((FPR_linux_mips*)NULL)->reg), FPR_OFFSET(reg), eEncodingIEEE754, \ - eFormatFloat, { kind1, kind2, kind3, kind4, fpr_##reg##_mips }, NULL, NULL, dwarf_opcode_mips, sizeof(dwarf_opcode_mips)} - -#define DEFINE_FPR_INFO(reg, alt, kind1, kind2, kind3, kind4) \ - { #reg, alt, sizeof(((FPR_linux_mips*)NULL)->reg), FPR_OFFSET(reg), eEncodingUint, \ - eFormatHex, { kind1, kind2, kind3, kind4, fpr_##reg##_mips }, NULL, NULL, NULL, 0} +#define DEFINE_FPR(reg, alt, kind1, kind2, kind3) \ + { \ + #reg, alt, sizeof(((FPR_linux_mips *) NULL)->reg), \ + FPR_OFFSET(reg), eEncodingIEEE754, eFormatFloat, \ + {kind1, kind2, kind3, ptrace_##reg##_mips, \ + fpr_##reg##_mips }, \ + NULL, NULL, dwarf_opcode_mips, \ + sizeof(dwarf_opcode_mips) \ + } + +#define DEFINE_FPR_INFO(reg, alt, kind1, kind2, kind3) \ + { \ + #reg, alt, sizeof(((FPR_linux_mips *) NULL)->reg), \ + FPR_OFFSET(reg), eEncodingUint, eFormatHex, \ + {kind1, kind2, kind3, ptrace_##reg##_mips, \ + fpr_##reg##_mips }, \ + NULL, NULL, NULL, 0 \ + } #define DEFINE_MSA(reg, alt, kind1, kind2, kind3, kind4) \ { #reg, alt, sizeof(((MSA_linux_mips*)0)->reg), MSA_OFFSET(reg), eEncodingVector, \ @@ -63,120 +79,211 @@ const uint8_t dwarf_opcode_mips [] = { // RegisterKind: EH_Frame, DWARF, Generic, Procss Plugin, LLDB -static RegisterInfo -g_register_infos_mips[] = -{ - DEFINE_GPR (zero, "zero", dwarf_zero_mips, dwarf_zero_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_GPR (r1, "at", dwarf_r1_mips, dwarf_r1_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_GPR (r2, nullptr, dwarf_r2_mips, dwarf_r2_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_GPR (r3, nullptr, dwarf_r3_mips, dwarf_r3_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_GPR (r4, nullptr, dwarf_r4_mips, dwarf_r4_mips, LLDB_REGNUM_GENERIC_ARG1, LLDB_INVALID_REGNUM), - DEFINE_GPR (r5, nullptr, dwarf_r5_mips, dwarf_r5_mips, LLDB_REGNUM_GENERIC_ARG2, LLDB_INVALID_REGNUM), - DEFINE_GPR (r6, nullptr, dwarf_r6_mips, dwarf_r6_mips, LLDB_REGNUM_GENERIC_ARG3, LLDB_INVALID_REGNUM), - DEFINE_GPR (r7, nullptr, dwarf_r7_mips, dwarf_r7_mips, LLDB_REGNUM_GENERIC_ARG4, LLDB_INVALID_REGNUM), - DEFINE_GPR (r8, nullptr, dwarf_r8_mips, dwarf_r8_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_GPR (r9, nullptr, dwarf_r9_mips, dwarf_r9_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_GPR (r10, nullptr, dwarf_r10_mips, dwarf_r10_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_GPR (r11, nullptr, dwarf_r11_mips, dwarf_r11_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_GPR (r12, nullptr, dwarf_r12_mips, dwarf_r12_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_GPR (r13, nullptr, dwarf_r13_mips, dwarf_r13_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_GPR (r14, nullptr, dwarf_r14_mips, dwarf_r14_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_GPR (r15, nullptr, dwarf_r15_mips, dwarf_r15_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_GPR (r16, nullptr, dwarf_r16_mips, dwarf_r16_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_GPR (r17, nullptr, dwarf_r17_mips, dwarf_r17_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_GPR (r18, nullptr, dwarf_r18_mips, dwarf_r18_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_GPR (r19, nullptr, dwarf_r19_mips, dwarf_r19_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_GPR (r20, nullptr, dwarf_r20_mips, dwarf_r20_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_GPR (r21, nullptr, dwarf_r21_mips, dwarf_r21_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_GPR (r22, nullptr, dwarf_r22_mips, dwarf_r22_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_GPR (r23, nullptr, dwarf_r23_mips, dwarf_r23_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_GPR (r24, nullptr, dwarf_r24_mips, dwarf_r24_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_GPR (r25, nullptr, dwarf_r25_mips, dwarf_r25_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_GPR (r26, nullptr, dwarf_r26_mips, dwarf_r26_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_GPR (r27, nullptr, dwarf_r27_mips, dwarf_r27_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_GPR (gp, "gp", dwarf_gp_mips, dwarf_gp_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_GPR (sp, "sp", dwarf_sp_mips, dwarf_sp_mips, LLDB_REGNUM_GENERIC_SP, LLDB_INVALID_REGNUM), - DEFINE_GPR (r30, "fp", dwarf_r30_mips, dwarf_r30_mips, LLDB_REGNUM_GENERIC_FP, LLDB_INVALID_REGNUM), - DEFINE_GPR (ra, "ra", dwarf_ra_mips, dwarf_ra_mips, LLDB_REGNUM_GENERIC_RA, LLDB_INVALID_REGNUM), - DEFINE_GPR (sr, "status", dwarf_sr_mips, dwarf_sr_mips, LLDB_REGNUM_GENERIC_FLAGS, LLDB_INVALID_REGNUM), - DEFINE_GPR (mullo, nullptr, dwarf_lo_mips, dwarf_lo_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_GPR (mulhi, nullptr, dwarf_hi_mips, dwarf_hi_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_GPR (badvaddr, nullptr, dwarf_bad_mips, dwarf_bad_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_GPR (cause, nullptr, dwarf_cause_mips, dwarf_cause_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_GPR (pc, nullptr, dwarf_pc_mips, dwarf_pc_mips, LLDB_REGNUM_GENERIC_PC, LLDB_INVALID_REGNUM), - DEFINE_GPR (config5, nullptr, dwarf_config5_mips, dwarf_config5_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_FPR (f0, nullptr, dwarf_f0_mips, dwarf_f0_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_FPR (f1, nullptr, dwarf_f1_mips, dwarf_f1_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_FPR (f2, nullptr, dwarf_f2_mips, dwarf_f2_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_FPR (f3, nullptr, dwarf_f3_mips, dwarf_f3_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_FPR (f4, nullptr, dwarf_f4_mips, dwarf_f4_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_FPR (f5, nullptr, dwarf_f5_mips, dwarf_f5_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_FPR (f6, nullptr, dwarf_f6_mips, dwarf_f6_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_FPR (f7, nullptr, dwarf_f7_mips, dwarf_f7_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_FPR (f8, nullptr, dwarf_f8_mips, dwarf_f8_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_FPR (f9, nullptr, dwarf_f9_mips, dwarf_f9_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_FPR (f10, nullptr, dwarf_f10_mips, dwarf_f10_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_FPR (f11, nullptr, dwarf_f11_mips, dwarf_f11_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_FPR (f12, nullptr, dwarf_f12_mips, dwarf_f12_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_FPR (f13, nullptr, dwarf_f13_mips, dwarf_f13_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_FPR (f14, nullptr, dwarf_f14_mips, dwarf_f14_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_FPR (f15, nullptr, dwarf_f15_mips, dwarf_f15_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_FPR (f16, nullptr, dwarf_f16_mips, dwarf_f16_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_FPR (f17, nullptr, dwarf_f17_mips, dwarf_f17_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_FPR (f18, nullptr, dwarf_f18_mips, dwarf_f18_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_FPR (f19, nullptr, dwarf_f19_mips, dwarf_f19_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_FPR (f20, nullptr, dwarf_f20_mips, dwarf_f20_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_FPR (f21, nullptr, dwarf_f21_mips, dwarf_f21_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_FPR (f22, nullptr, dwarf_f22_mips, dwarf_f22_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_FPR (f23, nullptr, dwarf_f23_mips, dwarf_f23_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_FPR (f24, nullptr, dwarf_f24_mips, dwarf_f24_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_FPR (f25, nullptr, dwarf_f25_mips, dwarf_f25_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_FPR (f26, nullptr, dwarf_f26_mips, dwarf_f26_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_FPR (f27, nullptr, dwarf_f27_mips, dwarf_f27_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_FPR (f28, nullptr, dwarf_f28_mips, dwarf_f28_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_FPR (f29, nullptr, dwarf_f29_mips, dwarf_f29_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_FPR (f30, nullptr, dwarf_f30_mips, dwarf_f30_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_FPR (f31, nullptr, dwarf_f31_mips, dwarf_f31_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_FPR_INFO (fcsr, nullptr, dwarf_fcsr_mips, dwarf_fcsr_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_FPR_INFO (fir, nullptr, dwarf_fir_mips, dwarf_fir_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_FPR_INFO (config5, nullptr, dwarf_config5_mips, dwarf_config5_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_MSA (w0, nullptr, dwarf_w0_mips, dwarf_w0_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_MSA (w1, nullptr, dwarf_w1_mips, dwarf_w1_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_MSA (w2, nullptr, dwarf_w2_mips, dwarf_w2_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_MSA (w3, nullptr, dwarf_w3_mips, dwarf_w3_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_MSA (w4, nullptr, dwarf_w4_mips, dwarf_w4_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_MSA (w5, nullptr, dwarf_w5_mips, dwarf_w5_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_MSA (w6, nullptr, dwarf_w6_mips, dwarf_w6_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_MSA (w7, nullptr, dwarf_w7_mips, dwarf_w7_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_MSA (w8, nullptr, dwarf_w8_mips, dwarf_w8_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_MSA (w9, nullptr, dwarf_w9_mips, dwarf_w9_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_MSA (w10, nullptr, dwarf_w10_mips, dwarf_w10_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_MSA (w11, nullptr, dwarf_w11_mips, dwarf_w11_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_MSA (w12, nullptr, dwarf_w12_mips, dwarf_w12_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_MSA (w13, nullptr, dwarf_w13_mips, dwarf_w13_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_MSA (w14, nullptr, dwarf_w14_mips, dwarf_w14_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_MSA (w15, nullptr, dwarf_w15_mips, dwarf_w15_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_MSA (w16, nullptr, dwarf_w16_mips, dwarf_w16_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_MSA (w17, nullptr, dwarf_w17_mips, dwarf_w17_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_MSA (w18, nullptr, dwarf_w18_mips, dwarf_w18_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_MSA (w19, nullptr, dwarf_w19_mips, dwarf_w19_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_MSA (w20, nullptr, dwarf_w10_mips, dwarf_w20_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_MSA (w21, nullptr, dwarf_w21_mips, dwarf_w21_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_MSA (w22, nullptr, dwarf_w22_mips, dwarf_w22_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_MSA (w23, nullptr, dwarf_w23_mips, dwarf_w23_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_MSA (w24, nullptr, dwarf_w24_mips, dwarf_w24_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_MSA (w25, nullptr, dwarf_w25_mips, dwarf_w25_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_MSA (w26, nullptr, dwarf_w26_mips, dwarf_w26_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_MSA (w27, nullptr, dwarf_w27_mips, dwarf_w27_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_MSA (w28, nullptr, dwarf_w28_mips, dwarf_w28_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_MSA (w29, nullptr, dwarf_w29_mips, dwarf_w29_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_MSA (w30, nullptr, dwarf_w30_mips, dwarf_w30_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_MSA (w31, nullptr, dwarf_w31_mips, dwarf_w31_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_MSA_INFO (mcsr, nullptr, dwarf_mcsr_mips, dwarf_mcsr_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_MSA_INFO (mir, nullptr, dwarf_mir_mips, dwarf_mir_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_MSA_INFO (fcsr, nullptr, dwarf_fcsr_mips, dwarf_fcsr_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_MSA_INFO (fir, nullptr, dwarf_fir_mips, dwarf_fir_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM), - DEFINE_MSA_INFO (config5, nullptr, dwarf_config5_mips, dwarf_config5_mips, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM) +static RegisterInfo g_register_infos_mips[] = { + DEFINE_GPR(zero, "zero", dwarf_zero_mips, dwarf_zero_mips, + LLDB_INVALID_REGNUM), + DEFINE_GPR(r1, "at", dwarf_r1_mips, dwarf_r1_mips, LLDB_INVALID_REGNUM), + DEFINE_GPR(r2, nullptr, dwarf_r2_mips, dwarf_r2_mips, LLDB_INVALID_REGNUM), + DEFINE_GPR(r3, nullptr, dwarf_r3_mips, dwarf_r3_mips, LLDB_INVALID_REGNUM), + DEFINE_GPR(r4, nullptr, dwarf_r4_mips, dwarf_r4_mips, + LLDB_REGNUM_GENERIC_ARG1), + DEFINE_GPR(r5, nullptr, dwarf_r5_mips, dwarf_r5_mips, + LLDB_REGNUM_GENERIC_ARG2), + DEFINE_GPR(r6, nullptr, dwarf_r6_mips, dwarf_r6_mips, + LLDB_REGNUM_GENERIC_ARG3), + DEFINE_GPR(r7, nullptr, dwarf_r7_mips, dwarf_r7_mips, + LLDB_REGNUM_GENERIC_ARG4), + DEFINE_GPR(r8, nullptr, dwarf_r8_mips, dwarf_r8_mips, LLDB_INVALID_REGNUM), + DEFINE_GPR(r9, nullptr, dwarf_r9_mips, dwarf_r9_mips, LLDB_INVALID_REGNUM), + DEFINE_GPR(r10, nullptr, dwarf_r10_mips, dwarf_r10_mips, + LLDB_INVALID_REGNUM), + DEFINE_GPR(r11, nullptr, dwarf_r11_mips, dwarf_r11_mips, + LLDB_INVALID_REGNUM), + DEFINE_GPR(r12, nullptr, dwarf_r12_mips, dwarf_r12_mips, + LLDB_INVALID_REGNUM), + DEFINE_GPR(r13, nullptr, dwarf_r13_mips, dwarf_r13_mips, + LLDB_INVALID_REGNUM), + DEFINE_GPR(r14, nullptr, dwarf_r14_mips, dwarf_r14_mips, + LLDB_INVALID_REGNUM), + DEFINE_GPR(r15, nullptr, dwarf_r15_mips, dwarf_r15_mips, + LLDB_INVALID_REGNUM), + DEFINE_GPR(r16, nullptr, dwarf_r16_mips, dwarf_r16_mips, + LLDB_INVALID_REGNUM), + DEFINE_GPR(r17, nullptr, dwarf_r17_mips, dwarf_r17_mips, + LLDB_INVALID_REGNUM), + DEFINE_GPR(r18, nullptr, dwarf_r18_mips, dwarf_r18_mips, + LLDB_INVALID_REGNUM), + DEFINE_GPR(r19, nullptr, dwarf_r19_mips, dwarf_r19_mips, + LLDB_INVALID_REGNUM), + DEFINE_GPR(r20, nullptr, dwarf_r20_mips, dwarf_r20_mips, + LLDB_INVALID_REGNUM), + DEFINE_GPR(r21, nullptr, dwarf_r21_mips, dwarf_r21_mips, + LLDB_INVALID_REGNUM), + DEFINE_GPR(r22, nullptr, dwarf_r22_mips, dwarf_r22_mips, + LLDB_INVALID_REGNUM), + DEFINE_GPR(r23, nullptr, dwarf_r23_mips, dwarf_r23_mips, + LLDB_INVALID_REGNUM), + DEFINE_GPR(r24, nullptr, dwarf_r24_mips, dwarf_r24_mips, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@freebsd.org Fri Nov 25 19:16:30 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B7CFCC548ED; Fri, 25 Nov 2016 19:16:30 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6DAFA947; Fri, 25 Nov 2016 19:16:30 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAPJGTJT076369; Fri, 25 Nov 2016 19:16:29 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAPJGToY076368; Fri, 25 Nov 2016 19:16:29 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201611251916.uAPJGToY076368@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 25 Nov 2016 19:16:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r309165 - vendor/lldb/lldb-release_39-r287912 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2016 19:16:30 -0000 Author: dim Date: Fri Nov 25 19:16:29 2016 New Revision: 309165 URL: https://svnweb.freebsd.org/changeset/base/309165 Log: Tag lldb release_39 branch r287912. Added: vendor/lldb/lldb-release_39-r287912/ - copied from r309164, vendor/lldb/dist/