From owner-svn-src-vendor@FreeBSD.ORG Wed Jan 16 22:50:41 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 39B0843E; Wed, 16 Jan 2013 22:50:41 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 11AE6323; Wed, 16 Jan 2013 22:50:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0GMoeH8090236; Wed, 16 Jan 2013 22:50:40 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0GMoesZ090235; Wed, 16 Jan 2013 22:50:40 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201301162250.r0GMoesZ090235@svn.freebsd.org> From: Xin LI Date: Wed, 16 Jan 2013 22:50:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r245510 - 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.14 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: Wed, 16 Jan 2013 22:50:41 -0000 Author: delphij Date: Wed Jan 16 22:50:40 2013 New Revision: 245510 URL: http://svnweb.freebsd.org/changeset/base/245510 Log: Update and vendor-sys/illumos/dist to illumos-gate 13910:f3454e0a097c (illumos zfs issue #3447: improve the comment in txg.c) Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/txg.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/txg.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/txg.c Wed Jan 16 22:06:00 2013 (r245509) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/txg.c Wed Jan 16 22:50:40 2013 (r245510) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Portions Copyright 2011 Martin Matuska - * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2013 by Delphix. All rights reserved. */ #include @@ -33,7 +33,76 @@ #include /* - * Pool-wide transaction groups. + * ZFS Transaction Groups + * ---------------------- + * + * ZFS transaction groups are, as the name implies, groups of transactions + * that act on persistent state. ZFS asserts consistency at the granularity of + * these transaction groups. Each successive transaction group (txg) is + * assigned a 64-bit consecutive identifier. There are three active + * transaction group states: open, quiescing, or syncing. At any given time, + * there may be an active txg associated with each state; each active txg may + * either be processing, or blocked waiting to enter the next state. There may + * be up to three active txgs, and there is always a txg in the open state + * (though it may be blocked waiting to enter the quiescing state). In broad + * strokes, transactions — operations that change in-memory structures — are + * accepted into the txg in the open state, and are completed while the txg is + * in the open or quiescing states. The accumulated changes are written to + * disk in the syncing state. + * + * Open + * + * When a new txg becomes active, it first enters the open state. New + * transactions — updates to in-memory structures — are assigned to the + * currently open txg. There is always a txg in the open state so that ZFS can + * accept new changes (though the txg may refuse new changes if it has hit + * some limit). ZFS advances the open txg to the next state for a variety of + * reasons such as it hitting a time or size threshold, or the execution of an + * administrative action that must be completed in the syncing state. + * + * Quiescing + * + * After a txg exits the open state, it enters the quiescing state. The + * quiescing state is intended to provide a buffer between accepting new + * transactions in the open state and writing them out to stable storage in + * the syncing state. While quiescing, transactions can continue their + * operation without delaying either of the other states. Typically, a txg is + * in the quiescing state very briefly since the operations are bounded by + * software latencies rather than, say, slower I/O latencies. After all + * transactions complete, the txg is ready to enter the next state. + * + * Syncing + * + * In the syncing state, the in-memory state built up during the open and (to + * a lesser degree) the quiescing states is written to stable storage. The + * process of writing out modified data can, in turn modify more data. For + * example when we write new blocks, we need to allocate space for them; those + * allocations modify metadata (space maps)... which themselves must be + * written to stable storage. During the sync state, ZFS iterates, writing out + * data until it converges and all in-memory changes have been written out. + * The first such pass is the largest as it encompasses all the modified user + * data (as opposed to filesystem metadata). Subsequent passes typically have + * far less data to write as they consist exclusively of filesystem metadata. + * + * To ensure convergence, after a certain number of passes ZFS begins + * overwriting locations on stable storage that had been allocated earlier in + * the syncing state (and subsequently freed). ZFS usually allocates new + * blocks to optimize for large, continuous, writes. For the syncing state to + * converge however it must complete a pass where no new blocks are allocated + * since each allocation requires a modification of persistent metadata. + * Further, to hasten convergence, after a prescribed number of passes, ZFS + * also defers frees, and stops compressing. + * + * In addition to writing out user data, we must also execute synctasks during + * the syncing context. A synctask is the mechanism by which some + * administrative activities work such as creating and destroying snapshots or + * datasets. Note that when a synctask is initiated it enters the open txg, + * and ZFS then pushes that txg as quickly as possible to completion of the + * syncing state in order to reduce the latency of the administrative + * activity. To complete the syncing state, ZFS writes out a new uberblock, + * the root of the tree of blocks that comprise all state stored on the ZFS + * pool. Finally, if there is a quiesced txg waiting, we signal that it can + * now transition to the syncing state. */ static void txg_sync_thread(dsl_pool_t *dp); From owner-svn-src-vendor@FreeBSD.ORG Wed Jan 16 23:11:14 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id C7229C3E; Wed, 16 Jan 2013 23:11:14 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id AA60F65D; Wed, 16 Jan 2013 23:11:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0GNBE9N098078; Wed, 16 Jan 2013 23:11:14 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0GNBEZa098074; Wed, 16 Jan 2013 23:11:14 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201301162311.r0GNBEZa098074@svn.freebsd.org> From: Xin LI Date: Wed, 16 Jan 2013 23:11:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r245512 - vendor-sys/illumos/dist/common/zfs vendor-sys/illumos/dist/uts/common vendor-sys/illumos/dist/uts/common/fs/zfs vendor-sys/illumos/dist/uts/common/fs/zfs/sys vendor/illumos/di... 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.14 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: Wed, 16 Jan 2013 23:11:14 -0000 Author: delphij Date: Wed Jan 16 23:11:13 2013 New Revision: 245512 URL: http://svnweb.freebsd.org/changeset/base/245512 Log: Update vendor/illumos/dist and vendor-sys/illumos/dist to illumos-gate 13921:9d721847e469 (illumos zfs issue #3035 LZ4 compression support in ZFS and GRUB) Modified: vendor/illumos/dist/man/man1m/zfs.1m vendor/illumos/dist/man/man5/zpool-features.5 Changes in other areas also in this revision: Added: vendor-sys/illumos/dist/uts/common/fs/zfs/THIRDPARTYLICENSE.lz4 vendor-sys/illumos/dist/uts/common/fs/zfs/THIRDPARTYLICENSE.lz4.descrip vendor-sys/illumos/dist/uts/common/fs/zfs/lz4.c (contents, props changed) Modified: vendor-sys/illumos/dist/common/zfs/zfeature_common.c vendor-sys/illumos/dist/common/zfs/zfeature_common.h vendor-sys/illumos/dist/common/zfs/zfs_prop.c vendor-sys/illumos/dist/uts/common/Makefile.files vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zio.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zio_compress.h vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c vendor-sys/illumos/dist/uts/common/fs/zfs/zio_compress.c Modified: vendor/illumos/dist/man/man1m/zfs.1m ============================================================================== --- vendor/illumos/dist/man/man1m/zfs.1m Wed Jan 16 22:59:50 2013 (r245511) +++ vendor/illumos/dist/man/man1m/zfs.1m Wed Jan 16 23:11:13 2013 (r245512) @@ -25,6 +25,7 @@ .\" Copyright (c) 2012 by Delphix. All rights reserved. .\" Copyright (c) 2012, Joyent, Inc. All rights reserved. .\" Copyright 2012 Nexenta Systems, Inc. All Rights Reserved. +.\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved. .\" .TH ZFS 1M "Sep 16, 2012" .SH NAME @@ -912,7 +913,7 @@ Changing this property affects only newl .ne 2 .na \fB\fBcompression\fR=\fBon\fR | \fBoff\fR | \fBlzjb\fR | \fBgzip\fR | -\fBgzip-\fR\fIN\fR | \fBzle\fR\fR +\fBgzip-\fR\fIN\fR | \fBzle\fR\fR | \fBlz4\fR .ad .sp .6 .RS 4n @@ -926,6 +927,14 @@ value \fBgzip-\fR\fIN\fR where \fIN\fR i (which is also the default for \fBgzip\fR(1)). The \fBzle\fR compression algorithm compresses runs of zeros. .sp +The \fBlz4\fR compression algorithm is a high-performance replacement +for the \fBlzjb\fR algorithm. It features significantly faster +compression and decompression, as well as a moderately higher +compression ratio than \fBlzjb\fR, but can only be used on pools with +the \fBlz4_compress\fR feature set to \fIenabled\fR. See +\fBzpool-features\fR(5) for details on ZFS feature flags and the +\fBlz4_compress\fR feature. +.sp This property can also be referred to by its shortened column name \fBcompress\fR. Changing this property affects only newly-written data. .RE Modified: vendor/illumos/dist/man/man5/zpool-features.5 ============================================================================== --- vendor/illumos/dist/man/man5/zpool-features.5 Wed Jan 16 22:59:50 2013 (r245511) +++ vendor/illumos/dist/man/man5/zpool-features.5 Wed Jan 16 23:11:13 2013 (r245512) @@ -1,5 +1,6 @@ '\" te .\" Copyright (c) 2012 by Delphix. All rights reserved. +.\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved. .\" The contents of this file are subject to the terms of the Common Development .\" and Distribution License (the "License"). You may not use this file except .\" in compliance with the License. You can obtain a copy of the license at @@ -197,5 +198,38 @@ This feature is \fBactive\fR while there or snapshots which were created after enabling this feature. .RE +.sp +.ne 2 +.na +\fB\fBlz4_compress\fR\fR +.ad +.RS 4n +.TS +l l . +GUID org.illumos:lz4_compress +READ\-ONLY COMPATIBLE no +DEPENDENCIES none +.TE + +\fBlz4\fR is a high-performance real-time compression algorithm that +features significantly faster compression and decompression as well as a +higher compression ratio than the older \fBlzjb\fR compression. +Typically, \fBlz4\fR compression is approximately 50% faster on +compressible data and 200% faster on incompressible data than +\fBlzjb\fR. It is also approximately 80% faster on decompression, while +giving approximately 10% better compression ratio. + +When the \fBlz4_compress\fR feature is set to \fBenabled\fR, the +administrator can turn on \fBlz4\fR compression on any dataset on the +pool using the \fBzfs\fR(1M) command. Please note that doing so will +immediately activate the \fBlz4_compress\fR feature on the underlying +pool (even before any data is written). Since this feature is not +read-only compatible, this operation will render the pool unimportable +on systems without support for the \fBlz4_compress\fR feature. At the +moment, this operation cannot be reversed. Booting off of +\fBlz4\fR-compressed root pools is supported. + +.RE + .SH "SEE ALSO" \fBzpool\fR(1M) From owner-svn-src-vendor@FreeBSD.ORG Wed Jan 16 23:11:16 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 41DFCC41; Wed, 16 Jan 2013 23:11:16 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 2578D65E; Wed, 16 Jan 2013 23:11:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0GNBGIq098092; Wed, 16 Jan 2013 23:11:16 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0GNBE3u098083; Wed, 16 Jan 2013 23:11:14 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201301162311.r0GNBE3u098083@svn.freebsd.org> From: Xin LI Date: Wed, 16 Jan 2013 23:11:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r245512 - vendor-sys/illumos/dist/common/zfs vendor-sys/illumos/dist/uts/common vendor-sys/illumos/dist/uts/common/fs/zfs vendor-sys/illumos/dist/uts/common/fs/zfs/sys vendor/illumos/di... 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.14 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: Wed, 16 Jan 2013 23:11:16 -0000 Author: delphij Date: Wed Jan 16 23:11:13 2013 New Revision: 245512 URL: http://svnweb.freebsd.org/changeset/base/245512 Log: Update vendor/illumos/dist and vendor-sys/illumos/dist to illumos-gate 13921:9d721847e469 (illumos zfs issue #3035 LZ4 compression support in ZFS and GRUB) Added: vendor-sys/illumos/dist/uts/common/fs/zfs/THIRDPARTYLICENSE.lz4 vendor-sys/illumos/dist/uts/common/fs/zfs/THIRDPARTYLICENSE.lz4.descrip vendor-sys/illumos/dist/uts/common/fs/zfs/lz4.c (contents, props changed) Modified: vendor-sys/illumos/dist/common/zfs/zfeature_common.c vendor-sys/illumos/dist/common/zfs/zfeature_common.h vendor-sys/illumos/dist/common/zfs/zfs_prop.c vendor-sys/illumos/dist/uts/common/Makefile.files vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zio.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zio_compress.h vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c vendor-sys/illumos/dist/uts/common/fs/zfs/zio_compress.c Changes in other areas also in this revision: Modified: vendor/illumos/dist/man/man1m/zfs.1m vendor/illumos/dist/man/man5/zpool-features.5 Modified: vendor-sys/illumos/dist/common/zfs/zfeature_common.c ============================================================================== --- vendor-sys/illumos/dist/common/zfs/zfeature_common.c Wed Jan 16 22:59:50 2013 (r245511) +++ vendor-sys/illumos/dist/common/zfs/zfeature_common.c Wed Jan 16 23:11:13 2013 (r245512) @@ -21,6 +21,7 @@ /* * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. */ #ifdef _KERNEL @@ -156,4 +157,7 @@ zpool_feature_init(void) zfeature_register(SPA_FEATURE_EMPTY_BPOBJ, "com.delphix:empty_bpobj", "empty_bpobj", "Snapshots use less space.", B_TRUE, B_FALSE, NULL); + zfeature_register(SPA_FEATURE_LZ4_COMPRESS, + "org.illumos:lz4_compress", "lz4_compress", + "LZ4 compression algorithm support.", B_FALSE, B_FALSE, NULL); } Modified: vendor-sys/illumos/dist/common/zfs/zfeature_common.h ============================================================================== --- vendor-sys/illumos/dist/common/zfs/zfeature_common.h Wed Jan 16 22:59:50 2013 (r245511) +++ vendor-sys/illumos/dist/common/zfs/zfeature_common.h Wed Jan 16 23:11:13 2013 (r245512) @@ -21,6 +21,7 @@ /* * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. */ #ifndef _ZFEATURE_COMMON_H @@ -52,6 +53,7 @@ typedef int (zfeature_func_t)(zfeature_i enum spa_feature { SPA_FEATURE_ASYNC_DESTROY, SPA_FEATURE_EMPTY_BPOBJ, + SPA_FEATURE_LZ4_COMPRESS, SPA_FEATURES } spa_feature_t; Modified: vendor-sys/illumos/dist/common/zfs/zfs_prop.c ============================================================================== --- vendor-sys/illumos/dist/common/zfs/zfs_prop.c Wed Jan 16 22:59:50 2013 (r245511) +++ vendor-sys/illumos/dist/common/zfs/zfs_prop.c Wed Jan 16 23:11:13 2013 (r245512) @@ -21,6 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011 by Delphix. All rights reserved. + * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. */ /* Portions Copyright 2010 Robert Milkowski */ @@ -96,6 +97,7 @@ zfs_prop_init(void) { "gzip-8", ZIO_COMPRESS_GZIP_8 }, { "gzip-9", ZIO_COMPRESS_GZIP_9 }, { "zle", ZIO_COMPRESS_ZLE }, + { "lz4", ZIO_COMPRESS_LZ4 }, { NULL } }; @@ -211,8 +213,8 @@ zfs_prop_init(void) zprop_register_index(ZFS_PROP_COMPRESSION, "compression", ZIO_COMPRESS_DEFAULT, PROP_INHERIT, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME, - "on | off | lzjb | gzip | gzip-[1-9] | zle", "COMPRESS", - compress_table); + "on | off | lzjb | gzip | gzip-[1-9] | zle | lz4", + "COMPRESS", compress_table); zprop_register_index(ZFS_PROP_SNAPDIR, "snapdir", ZFS_SNAPDIR_HIDDEN, PROP_INHERIT, ZFS_TYPE_FILESYSTEM, "hidden | visible", "SNAPDIR", snapdir_table); Modified: vendor-sys/illumos/dist/uts/common/Makefile.files ============================================================================== --- vendor-sys/illumos/dist/uts/common/Makefile.files Wed Jan 16 22:59:50 2013 (r245511) +++ vendor-sys/illumos/dist/uts/common/Makefile.files Wed Jan 16 23:11:13 2013 (r245512) @@ -23,6 +23,7 @@ # Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2012 Nexenta Systems, Inc. All rights reserved. # Copyright (c) 2012 by Delphix. All rights reserved. +# Copyright (c) 2013 by Saso Kiselkov. All rights reserved. # # @@ -1353,6 +1354,7 @@ ZFS_COMMON_OBJS += \ dsl_scan.o \ zfeature.o \ gzip.o \ + lz4.o \ lzjb.o \ metaslab.o \ refcount.o \ Added: vendor-sys/illumos/dist/uts/common/fs/zfs/THIRDPARTYLICENSE.lz4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/THIRDPARTYLICENSE.lz4 Wed Jan 16 23:11:13 2013 (r245512) @@ -0,0 +1,30 @@ +LZ4 - Fast LZ compression algorithm +Copyright (C) 2011-2013, Yann Collet. +BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER +OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +You can contact the author at : +- LZ4 homepage : http://fastcompression.blogspot.com/p/lz4.html +- LZ4 source repository : http://code.google.com/p/lz4/ Added: vendor-sys/illumos/dist/uts/common/fs/zfs/THIRDPARTYLICENSE.lz4.descrip ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/THIRDPARTYLICENSE.lz4.descrip Wed Jan 16 23:11:13 2013 (r245512) @@ -0,0 +1 @@ +LZ4 COMPRESSION FUNCTIONALITY IN ZFS Added: vendor-sys/illumos/dist/uts/common/fs/zfs/lz4.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/lz4.c Wed Jan 16 23:11:13 2013 (r245512) @@ -0,0 +1,1173 @@ +/* + * LZ4 - Fast LZ compression algorithm + * Header File + * Copyright (C) 2011-2013, Yann Collet. + * BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * You can contact the author at : + * - LZ4 homepage : http://fastcompression.blogspot.com/p/lz4.html + * - LZ4 source repository : http://code.google.com/p/lz4/ + */ + +#include + +static int real_LZ4_compress(const char *source, char *dest, int isize, + int osize); +static int real_LZ4_uncompress(const char *source, char *dest, int osize); +static int LZ4_compressBound(int isize); +static int LZ4_uncompress_unknownOutputSize(const char *source, char *dest, + int isize, int maxOutputSize); +static int LZ4_compressCtx(void *ctx, const char *source, char *dest, + int isize, int osize); +static int LZ4_compress64kCtx(void *ctx, const char *source, char *dest, + int isize, int osize); + +/*ARGSUSED*/ +size_t +lz4_compress(void *s_start, void *d_start, size_t s_len, size_t d_len, int n) +{ + uint32_t bufsiz; + char *dest = d_start; + + ASSERT(d_len >= sizeof (bufsiz)); + + bufsiz = real_LZ4_compress(s_start, &dest[sizeof (bufsiz)], s_len, + d_len - sizeof (bufsiz)); + + /* Signal an error if the compression routine returned zero. */ + if (bufsiz == 0) + return (s_len); + + /* + * Encode the compresed buffer size at the start. We'll need this in + * decompression to counter the effects of padding which might be + * added to the compressed buffer and which, if unhandled, would + * confuse the hell out of our decompression function. + */ + *(uint32_t *)dest = BE_32(bufsiz); + + return (bufsiz + sizeof (bufsiz)); +} + +/*ARGSUSED*/ +int +lz4_decompress(void *s_start, void *d_start, size_t s_len, size_t d_len, int n) +{ + const char *src = s_start; + uint32_t bufsiz = BE_IN32(src); + + /* invalid compressed buffer size encoded at start */ + if (bufsiz + sizeof (bufsiz) > s_len) + return (1); + + /* + * Returns 0 on success (decompression function returned non-negative) + * and non-zero on failure (decompression function returned negative. + */ + return (LZ4_uncompress_unknownOutputSize(&src[sizeof (bufsiz)], + d_start, bufsiz, d_len) < 0); +} + +/* + * LZ4 API Description: + * + * Simple Functions: + * real_LZ4_compress() : + * isize : is the input size. Max supported value is ~1.9GB + * return : the number of bytes written in buffer dest + * or 0 if the compression fails (if LZ4_COMPRESSMIN is set). + * note : destination buffer must be already allocated. + * destination buffer must be sized to handle worst cases + * situations (input data not compressible) worst case size + * evaluation is provided by function LZ4_compressBound(). + * + * real_LZ4_uncompress() : + * osize : is the output size, therefore the original size + * return : the number of bytes read in the source buffer. + * If the source stream is malformed, the function will stop + * decoding and return a negative result, indicating the byte + * position of the faulty instruction. This function never + * writes beyond dest + osize, and is therefore protected + * against malicious data packets. + * note : destination buffer must be already allocated + * + * Advanced Functions + * + * LZ4_compressBound() : + * Provides the maximum size that LZ4 may output in a "worst case" + * scenario (input data not compressible) primarily useful for memory + * allocation of output buffer. + * + * isize : is the input size. Max supported value is ~1.9GB + * return : maximum output size in a "worst case" scenario + * note : this function is limited by "int" range (2^31-1) + * + * LZ4_uncompress_unknownOutputSize() : + * isize : is the input size, therefore the compressed size + * maxOutputSize : is the size of the destination buffer (which must be + * already allocated) + * return : the number of bytes decoded in the destination buffer + * (necessarily <= maxOutputSize). If the source stream is + * malformed, the function will stop decoding and return a + * negative result, indicating the byte position of the faulty + * instruction. This function never writes beyond dest + + * maxOutputSize, and is therefore protected against malicious + * data packets. + * note : Destination buffer must be already allocated. + * This version is slightly slower than real_LZ4_uncompress() + * + * LZ4_compressCtx() : + * This function explicitly handles the CTX memory structure. + * + * ILLUMOS CHANGES: the CTX memory structure must be explicitly allocated + * by the caller (either on the stack or using kmem_zalloc). Passing NULL + * isn't valid. + * + * LZ4_compress64kCtx() : + * Same as LZ4_compressCtx(), but specific to small inputs (<64KB). + * isize *Must* be <64KB, otherwise the output will be corrupted. + * + * ILLUMOS CHANGES: the CTX memory structure must be explicitly allocated + * by the caller (either on the stack or using kmem_zalloc). Passing NULL + * isn't valid. + */ + +/* + * Tuning parameters + */ + +/* + * COMPRESSIONLEVEL: Increasing this value improves compression ratio + * Lowering this value reduces memory usage. Reduced memory usage + * typically improves speed, due to cache effect (ex: L1 32KB for Intel, + * L1 64KB for AMD). Memory usage formula : N->2^(N+2) Bytes + * (examples : 12 -> 16KB ; 17 -> 512KB) + */ +#define COMPRESSIONLEVEL 12 + +/* + * NOTCOMPRESSIBLE_CONFIRMATION: Decreasing this value will make the + * algorithm skip faster data segments considered "incompressible". + * This may decrease compression ratio dramatically, but will be + * faster on incompressible data. Increasing this value will make + * the algorithm search more before declaring a segment "incompressible". + * This could improve compression a bit, but will be slower on + * incompressible data. The default value (6) is recommended. + */ +#define NOTCOMPRESSIBLE_CONFIRMATION 6 + +/* + * BIG_ENDIAN_NATIVE_BUT_INCOMPATIBLE: This will provide a boost to + * performance for big endian cpu, but the resulting compressed stream + * will be incompatible with little-endian CPU. You can set this option + * to 1 in situations where data will stay within closed environment. + * This option is useless on Little_Endian CPU (such as x86). + */ +/* #define BIG_ENDIAN_NATIVE_BUT_INCOMPATIBLE 1 */ + +/* + * CPU Feature Detection + */ + +/* 32 or 64 bits ? */ +#if (defined(__x86_64__) || defined(__x86_64) || defined(__amd64__) || \ + defined(__amd64) || defined(__ppc64__) || defined(_WIN64) || \ + defined(__LP64__) || defined(_LP64)) +#define LZ4_ARCH64 1 +/* + * Illumos: On amd64 we have 20k of stack and 24k on sun4u and sun4v, so we + * can spend 16k on the algorithm + */ +#define STACKLIMIT 12 +#else +#define LZ4_ARCH64 0 +/* + * Illumos: On i386 we only have 12k of stack, so in order to maintain the + * same COMPRESSIONLEVEL we have to use heap allocation. Performance will + * suck, but alas, it's ZFS on 32-bit we're talking about, so... + */ +#define STACKLIMIT 11 +#endif + +/* + * Little Endian or Big Endian? + * Note: overwrite the below #define if you know your architecture endianess. + */ +#if (defined(__BIG_ENDIAN__) || defined(__BIG_ENDIAN) || \ + defined(_BIG_ENDIAN) || defined(_ARCH_PPC) || defined(__PPC__) || \ + defined(__PPC) || defined(PPC) || defined(__powerpc__) || \ + defined(__powerpc) || defined(powerpc) || \ + ((defined(__BYTE_ORDER__)&&(__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)))) +#define LZ4_BIG_ENDIAN 1 +#else +/* + * Little Endian assumed. PDP Endian and other very rare endian format + * are unsupported. + */ +#endif + +/* + * Unaligned memory access is automatically enabled for "common" CPU, + * such as x86. For others CPU, the compiler will be more cautious, and + * insert extra code to ensure aligned access is respected. If you know + * your target CPU supports unaligned memory access, you may want to + * force this option manually to improve performance + */ +#if defined(__ARM_FEATURE_UNALIGNED) +#define LZ4_FORCE_UNALIGNED_ACCESS 1 +#endif + +/* + * Illumos: we can't use GCC's __builtin_ctz family of builtins in the + * kernel + */ +#define LZ4_FORCE_SW_BITCOUNT + +/* + * Compiler Options + */ +#if __STDC_VERSION__ >= 199901L /* C99 */ +/* "restrict" is a known keyword */ +#else +/* Disable restrict */ +#define restrict +#endif + +#define GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__) + +#ifdef _MSC_VER +/* Visual Studio */ +/* Visual is not C99, but supports some kind of inline */ +#define inline __forceinline +#if LZ4_ARCH64 +/* For Visual 2005 */ +#pragma intrinsic(_BitScanForward64) +#pragma intrinsic(_BitScanReverse64) +#else /* !LZ4_ARCH64 */ +/* For Visual 2005 */ +#pragma intrinsic(_BitScanForward) +#pragma intrinsic(_BitScanReverse) +#endif /* !LZ4_ARCH64 */ +#endif /* _MSC_VER */ + +#ifdef _MSC_VER +#define lz4_bswap16(x) _byteswap_ushort(x) +#else /* !_MSC_VER */ +#define lz4_bswap16(x) ((unsigned short int) ((((x) >> 8) & 0xffu) | \ + (((x) & 0xffu) << 8))) +#endif /* !_MSC_VER */ + +#if (GCC_VERSION >= 302) || (__INTEL_COMPILER >= 800) || defined(__clang__) +#define expect(expr, value) (__builtin_expect((expr), (value))) +#else +#define expect(expr, value) (expr) +#endif + +#define likely(expr) expect((expr) != 0, 1) +#define unlikely(expr) expect((expr) != 0, 0) + +/* Basic types */ +#if defined(_MSC_VER) +/* Visual Studio does not support 'stdint' natively */ +#define BYTE unsigned __int8 +#define U16 unsigned __int16 +#define U32 unsigned __int32 +#define S32 __int32 +#define U64 unsigned __int64 +#else /* !defined(_MSC_VER) */ +#define BYTE uint8_t +#define U16 uint16_t +#define U32 uint32_t +#define S32 int32_t +#define U64 uint64_t +#endif /* !defined(_MSC_VER) */ + +#ifndef LZ4_FORCE_UNALIGNED_ACCESS +#pragma pack(1) +#endif + +typedef struct _U16_S { + U16 v; +} U16_S; +typedef struct _U32_S { + U32 v; +} U32_S; +typedef struct _U64_S { + U64 v; +} U64_S; + +#ifndef LZ4_FORCE_UNALIGNED_ACCESS +#pragma pack() +#endif + +#define A64(x) (((U64_S *)(x))->v) +#define A32(x) (((U32_S *)(x))->v) +#define A16(x) (((U16_S *)(x))->v) + +/* + * Constants + */ +#define MINMATCH 4 + +#define HASH_LOG COMPRESSIONLEVEL +#define HASHTABLESIZE (1 << HASH_LOG) +#define HASH_MASK (HASHTABLESIZE - 1) + +#define SKIPSTRENGTH (NOTCOMPRESSIBLE_CONFIRMATION > 2 ? \ + NOTCOMPRESSIBLE_CONFIRMATION : 2) + +/* + * Defines if memory is allocated into the stack (local variable), + * or into the heap (kmem_alloc()). + */ +#define HEAPMODE (HASH_LOG > STACKLIMIT) +#define COPYLENGTH 8 +#define LASTLITERALS 5 +#define MFLIMIT (COPYLENGTH + MINMATCH) +#define MINLENGTH (MFLIMIT + 1) + +#define MAXD_LOG 16 +#define MAX_DISTANCE ((1 << MAXD_LOG) - 1) + +#define ML_BITS 4 +#define ML_MASK ((1U<> ((MINMATCH * 8) - \ + HASH_LOG)) +#define LZ4_HASH_VALUE(p) LZ4_HASH_FUNCTION(A32(p)) +#define LZ4_WILDCOPY(s, d, e) do { LZ4_COPYPACKET(s, d) } while (d < e); +#define LZ4_BLINDCOPY(s, d, l) { BYTE* e = (d) + l; LZ4_WILDCOPY(s, d, e); \ + d = e; } + + +/* Private functions */ +#if LZ4_ARCH64 + +static inline int +LZ4_NbCommonBytes(register U64 val) +{ +#if defined(LZ4_BIG_ENDIAN) +#if defined(_MSC_VER) && !defined(LZ4_FORCE_SW_BITCOUNT) + unsigned long r = 0; + _BitScanReverse64(&r, val); + return (int)(r >> 3); +#elif defined(__GNUC__) && (GCC_VERSION >= 304) && \ + !defined(LZ4_FORCE_SW_BITCOUNT) + return (__builtin_clzll(val) >> 3); +#else + int r; + if (!(val >> 32)) { + r = 4; + } else { + r = 0; + val >>= 32; + } + if (!(val >> 16)) { + r += 2; + val >>= 8; + } else { + val >>= 24; + } + r += (!val); + return (r); +#endif +#else +#if defined(_MSC_VER) && !defined(LZ4_FORCE_SW_BITCOUNT) + unsigned long r = 0; + _BitScanForward64(&r, val); + return (int)(r >> 3); +#elif defined(__GNUC__) && (GCC_VERSION >= 304) && \ + !defined(LZ4_FORCE_SW_BITCOUNT) + return (__builtin_ctzll(val) >> 3); +#else + static const int DeBruijnBytePos[64] = + { 0, 0, 0, 0, 0, 1, 1, 2, 0, 3, 1, 3, 1, 4, 2, 7, 0, 2, 3, 6, 1, 5, + 3, 5, 1, 3, 4, 4, 2, 5, 6, 7, 7, 0, 1, 2, 3, 3, 4, 6, 2, 6, 5, + 5, 3, 4, 5, 6, 7, 1, 2, 4, 6, 4, + 4, 5, 7, 2, 6, 5, 7, 6, 7, 7 + }; + return DeBruijnBytePos[((U64) ((val & -val) * 0x0218A392CDABBD3F)) >> + 58]; +#endif +#endif +} + +#else + +static inline int +LZ4_NbCommonBytes(register U32 val) +{ +#if defined(LZ4_BIG_ENDIAN) +#if defined(_MSC_VER) && !defined(LZ4_FORCE_SW_BITCOUNT) + unsigned long r = 0; + _BitScanReverse(&r, val); + return (int)(r >> 3); +#elif defined(__GNUC__) && (GCC_VERSION >= 304) && \ + !defined(LZ4_FORCE_SW_BITCOUNT) + return (__builtin_clz(val) >> 3); +#else + int r; + if (!(val >> 16)) { + r = 2; + val >>= 8; + } else { + r = 0; + val >>= 24; + } + r += (!val); + return (r); +#endif +#else +#if defined(_MSC_VER) && !defined(LZ4_FORCE_SW_BITCOUNT) + unsigned long r = 0; + _BitScanForward(&r, val); + return (int)(r >> 3); +#elif defined(__GNUC__) && (GCC_VERSION >= 304) && \ + !defined(LZ4_FORCE_SW_BITCOUNT) + return (__builtin_ctz(val) >> 3); +#else + static const int DeBruijnBytePos[32] = { + 0, 0, 3, 0, 3, 1, 3, 0, + 3, 2, 2, 1, 3, 2, 0, 1, + 3, 3, 1, 2, 2, 2, 2, 0, + 3, 1, 2, 0, 1, 0, 1, 1 + }; + return DeBruijnBytePos[((U32) ((val & -(S32) val) * 0x077CB531U)) >> + 27]; +#endif +#endif +} + +#endif + +/* Public functions */ + +static int +LZ4_compressBound(int isize) +{ + return (isize + (isize / 255) + 16); +} + +/* Compression functions */ + +/*ARGSUSED*/ +static int +LZ4_compressCtx(void *ctx, const char *source, char *dest, int isize, + int osize) +{ +#if HEAPMODE + struct refTables *srt = (struct refTables *)ctx; + HTYPE *HashTable = (HTYPE *) (srt->hashTable); +#else + HTYPE HashTable[HASHTABLESIZE] = { 0 }; +#endif + + const BYTE *ip = (BYTE *) source; + INITBASE(base); + const BYTE *anchor = ip; + const BYTE *const iend = ip + isize; + const BYTE *const oend = (BYTE *) dest + osize; + const BYTE *const mflimit = iend - MFLIMIT; +#define matchlimit (iend - LASTLITERALS) + + BYTE *op = (BYTE *) dest; + + int len, length; + const int skipStrength = SKIPSTRENGTH; + U32 forwardH; + + + /* Init */ + if (isize < MINLENGTH) + goto _last_literals; + + /* First Byte */ + HashTable[LZ4_HASH_VALUE(ip)] = ip - base; + ip++; + forwardH = LZ4_HASH_VALUE(ip); + + /* Main Loop */ + for (;;) { + int findMatchAttempts = (1U << skipStrength) + 3; + const BYTE *forwardIp = ip; + const BYTE *ref; + BYTE *token; + + /* Find a match */ + do { + U32 h = forwardH; + int step = findMatchAttempts++ >> skipStrength; + ip = forwardIp; + forwardIp = ip + step; + + if unlikely(forwardIp > mflimit) { + goto _last_literals; + } + + forwardH = LZ4_HASH_VALUE(forwardIp); + ref = base + HashTable[h]; + HashTable[h] = ip - base; + + } while ((ref < ip - MAX_DISTANCE) || (A32(ref) != A32(ip))); + + /* Catch up */ + while ((ip > anchor) && (ref > (BYTE *) source) && + unlikely(ip[-1] == ref[-1])) { + ip--; + ref--; + } + + /* Encode Literal length */ + length = ip - anchor; + token = op++; + + /* Check output limit */ + if unlikely(op + length + (2 + 1 + LASTLITERALS) + + (length >> 8) > oend) + return (0); + + if (length >= (int)RUN_MASK) { + *token = (RUN_MASK << ML_BITS); + len = length - RUN_MASK; + for (; len > 254; len -= 255) + *op++ = 255; + *op++ = (BYTE)len; + } else + *token = (length << ML_BITS); + + /* Copy Literals */ + LZ4_BLINDCOPY(anchor, op, length); + + _next_match: + /* Encode Offset */ + LZ4_WRITE_LITTLEENDIAN_16(op, ip - ref); + + /* Start Counting */ + ip += MINMATCH; + ref += MINMATCH; /* MinMatch verified */ + anchor = ip; + while likely(ip < matchlimit - (STEPSIZE - 1)) { + UARCH diff = AARCH(ref) ^ AARCH(ip); + if (!diff) { + ip += STEPSIZE; + ref += STEPSIZE; + continue; + } + ip += LZ4_NbCommonBytes(diff); + goto _endCount; + } +#if LZ4_ARCH64 + if ((ip < (matchlimit - 3)) && (A32(ref) == A32(ip))) { + ip += 4; + ref += 4; + } +#endif + if ((ip < (matchlimit - 1)) && (A16(ref) == A16(ip))) { + ip += 2; + ref += 2; + } + if ((ip < matchlimit) && (*ref == *ip)) + ip++; + _endCount: + + /* Encode MatchLength */ + len = (ip - anchor); + /* Check output limit */ + if unlikely(op + (1 + LASTLITERALS) + (len >> 8) > oend) + return (0); + if (len >= (int)ML_MASK) { + *token += ML_MASK; + len -= ML_MASK; + for (; len > 509; len -= 510) { + *op++ = 255; + *op++ = 255; + } + if (len > 254) { + len -= 255; + *op++ = 255; + } + *op++ = (BYTE)len; + } else + *token += len; + + /* Test end of chunk */ + if (ip > mflimit) { + anchor = ip; + break; + } + /* Fill table */ + HashTable[LZ4_HASH_VALUE(ip - 2)] = ip - 2 - base; + + /* Test next position */ + ref = base + HashTable[LZ4_HASH_VALUE(ip)]; + HashTable[LZ4_HASH_VALUE(ip)] = ip - base; + if ((ref > ip - (MAX_DISTANCE + 1)) && (A32(ref) == A32(ip))) { + token = op++; + *token = 0; + goto _next_match; + } + /* Prepare next loop */ + anchor = ip++; + forwardH = LZ4_HASH_VALUE(ip); + } + + _last_literals: + /* Encode Last Literals */ + { + int lastRun = iend - anchor; + if (op + lastRun + 1 + ((lastRun + 255 - RUN_MASK) / 255) > + oend) + return (0); + if (lastRun >= (int)RUN_MASK) { + *op++ = (RUN_MASK << ML_BITS); + lastRun -= RUN_MASK; + for (; lastRun > 254; lastRun -= 255) { + *op++ = 255; + } + *op++ = (BYTE)lastRun; + } else + *op++ = (lastRun << ML_BITS); + (void) memcpy(op, anchor, iend - anchor); + op += iend - anchor; + } + + /* End */ + return (int)(((char *)op) - dest); +} + + + +/* Note : this function is valid only if isize < LZ4_64KLIMIT */ +#define LZ4_64KLIMIT ((1 << 16) + (MFLIMIT - 1)) +#define HASHLOG64K (HASH_LOG + 1) +#define HASH64KTABLESIZE (1U << HASHLOG64K) +#define LZ4_HASH64K_FUNCTION(i) (((i) * 2654435761U) >> ((MINMATCH*8) - \ + HASHLOG64K)) +#define LZ4_HASH64K_VALUE(p) LZ4_HASH64K_FUNCTION(A32(p)) + +/*ARGSUSED*/ +static int +LZ4_compress64kCtx(void *ctx, const char *source, char *dest, int isize, + int osize) +{ +#if HEAPMODE + struct refTables *srt = (struct refTables *)ctx; + U16 *HashTable = (U16 *) (srt->hashTable); +#else + U16 HashTable[HASH64KTABLESIZE] = { 0 }; +#endif + + const BYTE *ip = (BYTE *) source; + const BYTE *anchor = ip; + const BYTE *const base = ip; + const BYTE *const iend = ip + isize; + const BYTE *const oend = (BYTE *) dest + osize; + const BYTE *const mflimit = iend - MFLIMIT; +#define matchlimit (iend - LASTLITERALS) + + BYTE *op = (BYTE *) dest; + + int len, length; + const int skipStrength = SKIPSTRENGTH; + U32 forwardH; + + /* Init */ + if (isize < MINLENGTH) + goto _last_literals; + + /* First Byte */ + ip++; + forwardH = LZ4_HASH64K_VALUE(ip); + + /* Main Loop */ + for (;;) { + int findMatchAttempts = (1U << skipStrength) + 3; + const BYTE *forwardIp = ip; + const BYTE *ref; + BYTE *token; + + /* Find a match */ + do { + U32 h = forwardH; + int step = findMatchAttempts++ >> skipStrength; + ip = forwardIp; + forwardIp = ip + step; + + if (forwardIp > mflimit) { + goto _last_literals; + } + + forwardH = LZ4_HASH64K_VALUE(forwardIp); + ref = base + HashTable[h]; + HashTable[h] = ip - base; + + } while (A32(ref) != A32(ip)); + + /* Catch up */ + while ((ip > anchor) && (ref > (BYTE *) source) && + (ip[-1] == ref[-1])) { + ip--; + ref--; + } + + /* Encode Literal length */ + length = ip - anchor; + token = op++; + + /* Check output limit */ + if unlikely(op + length + (2 + 1 + LASTLITERALS) + + (length >> 8) > oend) + return (0); + + if (length >= (int)RUN_MASK) { + *token = (RUN_MASK << ML_BITS); + len = length - RUN_MASK; + for (; len > 254; len -= 255) + *op++ = 255; + *op++ = (BYTE)len; + } else + *token = (length << ML_BITS); + + /* Copy Literals */ + LZ4_BLINDCOPY(anchor, op, length); + + _next_match: + /* Encode Offset */ + LZ4_WRITE_LITTLEENDIAN_16(op, ip - ref); + + /* Start Counting */ + ip += MINMATCH; + ref += MINMATCH; /* MinMatch verified */ + anchor = ip; + while (ip < matchlimit - (STEPSIZE - 1)) { + UARCH diff = AARCH(ref) ^ AARCH(ip); + if (!diff) { + ip += STEPSIZE; + ref += STEPSIZE; + continue; + } + ip += LZ4_NbCommonBytes(diff); + goto _endCount; + } +#if LZ4_ARCH64 + if ((ip < (matchlimit - 3)) && (A32(ref) == A32(ip))) { + ip += 4; + ref += 4; + } +#endif + if ((ip < (matchlimit - 1)) && (A16(ref) == A16(ip))) { + ip += 2; + ref += 2; + } + if ((ip < matchlimit) && (*ref == *ip)) + ip++; + _endCount: + + /* Encode MatchLength */ + len = (ip - anchor); + /* Check output limit */ + if unlikely(op + (1 + LASTLITERALS) + (len >> 8) > oend) + return (0); + if (len >= (int)ML_MASK) { + *token += ML_MASK; + len -= ML_MASK; + for (; len > 509; len -= 510) { + *op++ = 255; + *op++ = 255; + } + if (len > 254) { + len -= 255; + *op++ = 255; + } + *op++ = (BYTE)len; + } else + *token += len; + + /* Test end of chunk */ + if (ip > mflimit) { + anchor = ip; + break; + } + /* Fill table */ + HashTable[LZ4_HASH64K_VALUE(ip - 2)] = ip - 2 - base; + + /* Test next position */ + ref = base + HashTable[LZ4_HASH64K_VALUE(ip)]; + HashTable[LZ4_HASH64K_VALUE(ip)] = ip - base; + if (A32(ref) == A32(ip)) { + token = op++; + *token = 0; + goto _next_match; + } + /* Prepare next loop */ + anchor = ip++; + forwardH = LZ4_HASH64K_VALUE(ip); + } + + _last_literals: + /* Encode Last Literals */ + { + int lastRun = iend - anchor; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@FreeBSD.ORG Thu Jan 17 21:32:18 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 75CB1A87; Thu, 17 Jan 2013 21:32:18 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 47E9A1FA; Thu, 17 Jan 2013 21:32:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0HLWIx7004779; Thu, 17 Jan 2013 21:32:18 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0HLW4Wb004677; Thu, 17 Jan 2013 21:32:04 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201301172132.r0HLW4Wb004677@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 17 Jan 2013 21:32:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r245576 - in vendor-sys/acpica/dist: . source/common source/compiler source/components/debugger source/components/disassembler source/components/dispatcher source/components/events sour... 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.14 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: Thu, 17 Jan 2013 21:32:18 -0000 Author: jkim Date: Thu Jan 17 21:32:03 2013 New Revision: 245576 URL: http://svnweb.freebsd.org/changeset/base/245576 Log: Import ACPICA 20130117. Modified: vendor-sys/acpica/dist/changes.txt vendor-sys/acpica/dist/source/common/adfile.c vendor-sys/acpica/dist/source/common/adisasm.c vendor-sys/acpica/dist/source/common/adwalk.c vendor-sys/acpica/dist/source/common/ahpredef.c vendor-sys/acpica/dist/source/common/dmextern.c vendor-sys/acpica/dist/source/common/dmrestag.c vendor-sys/acpica/dist/source/common/dmtable.c vendor-sys/acpica/dist/source/common/dmtbdump.c vendor-sys/acpica/dist/source/common/dmtbinfo.c vendor-sys/acpica/dist/source/common/getopt.c vendor-sys/acpica/dist/source/compiler/aslanalyze.c vendor-sys/acpica/dist/source/compiler/aslbtypes.c vendor-sys/acpica/dist/source/compiler/aslcodegen.c vendor-sys/acpica/dist/source/compiler/aslcompile.c vendor-sys/acpica/dist/source/compiler/aslcompiler.h vendor-sys/acpica/dist/source/compiler/aslcompiler.l vendor-sys/acpica/dist/source/compiler/aslcompiler.y vendor-sys/acpica/dist/source/compiler/asldefine.h vendor-sys/acpica/dist/source/compiler/aslerror.c vendor-sys/acpica/dist/source/compiler/aslfileio.c vendor-sys/acpica/dist/source/compiler/aslfiles.c vendor-sys/acpica/dist/source/compiler/aslfold.c vendor-sys/acpica/dist/source/compiler/aslglobal.h vendor-sys/acpica/dist/source/compiler/aslhex.c vendor-sys/acpica/dist/source/compiler/asllength.c vendor-sys/acpica/dist/source/compiler/asllisting.c vendor-sys/acpica/dist/source/compiler/aslload.c vendor-sys/acpica/dist/source/compiler/asllookup.c vendor-sys/acpica/dist/source/compiler/aslmain.c vendor-sys/acpica/dist/source/compiler/aslmap.c vendor-sys/acpica/dist/source/compiler/aslmessages.h vendor-sys/acpica/dist/source/compiler/aslmethod.c vendor-sys/acpica/dist/source/compiler/aslnamesp.c vendor-sys/acpica/dist/source/compiler/aslopcodes.c vendor-sys/acpica/dist/source/compiler/asloperands.c vendor-sys/acpica/dist/source/compiler/aslopt.c vendor-sys/acpica/dist/source/compiler/aslpredef.c vendor-sys/acpica/dist/source/compiler/aslresource.c vendor-sys/acpica/dist/source/compiler/aslrestype1.c vendor-sys/acpica/dist/source/compiler/aslrestype1i.c vendor-sys/acpica/dist/source/compiler/aslrestype2.c vendor-sys/acpica/dist/source/compiler/aslrestype2d.c vendor-sys/acpica/dist/source/compiler/aslrestype2e.c vendor-sys/acpica/dist/source/compiler/aslrestype2q.c vendor-sys/acpica/dist/source/compiler/aslrestype2s.c vendor-sys/acpica/dist/source/compiler/aslrestype2w.c vendor-sys/acpica/dist/source/compiler/aslstartup.c vendor-sys/acpica/dist/source/compiler/aslstubs.c vendor-sys/acpica/dist/source/compiler/aslsupport.l vendor-sys/acpica/dist/source/compiler/asltransform.c vendor-sys/acpica/dist/source/compiler/asltree.c vendor-sys/acpica/dist/source/compiler/asltypes.h vendor-sys/acpica/dist/source/compiler/aslutils.c vendor-sys/acpica/dist/source/compiler/asluuid.c vendor-sys/acpica/dist/source/compiler/aslwalks.c vendor-sys/acpica/dist/source/compiler/aslxref.c vendor-sys/acpica/dist/source/compiler/dtcompile.c vendor-sys/acpica/dist/source/compiler/dtcompiler.h vendor-sys/acpica/dist/source/compiler/dtexpress.c vendor-sys/acpica/dist/source/compiler/dtfield.c vendor-sys/acpica/dist/source/compiler/dtio.c vendor-sys/acpica/dist/source/compiler/dtparser.l vendor-sys/acpica/dist/source/compiler/dtparser.y vendor-sys/acpica/dist/source/compiler/dtsubtable.c vendor-sys/acpica/dist/source/compiler/dttable.c vendor-sys/acpica/dist/source/compiler/dttemplate.c vendor-sys/acpica/dist/source/compiler/dttemplate.h vendor-sys/acpica/dist/source/compiler/dtutils.c vendor-sys/acpica/dist/source/compiler/preprocess.h vendor-sys/acpica/dist/source/compiler/prexpress.c vendor-sys/acpica/dist/source/compiler/prmacros.c vendor-sys/acpica/dist/source/compiler/prparser.l vendor-sys/acpica/dist/source/compiler/prparser.y vendor-sys/acpica/dist/source/compiler/prscan.c vendor-sys/acpica/dist/source/compiler/prutils.c vendor-sys/acpica/dist/source/components/debugger/dbcmds.c vendor-sys/acpica/dist/source/components/debugger/dbconvert.c vendor-sys/acpica/dist/source/components/debugger/dbdisply.c vendor-sys/acpica/dist/source/components/debugger/dbexec.c vendor-sys/acpica/dist/source/components/debugger/dbfileio.c vendor-sys/acpica/dist/source/components/debugger/dbhistry.c vendor-sys/acpica/dist/source/components/debugger/dbinput.c vendor-sys/acpica/dist/source/components/debugger/dbmethod.c vendor-sys/acpica/dist/source/components/debugger/dbnames.c vendor-sys/acpica/dist/source/components/debugger/dbstats.c vendor-sys/acpica/dist/source/components/debugger/dbutils.c vendor-sys/acpica/dist/source/components/debugger/dbxface.c vendor-sys/acpica/dist/source/components/disassembler/dmbuffer.c vendor-sys/acpica/dist/source/components/disassembler/dmdeferred.c vendor-sys/acpica/dist/source/components/disassembler/dmnames.c vendor-sys/acpica/dist/source/components/disassembler/dmobject.c vendor-sys/acpica/dist/source/components/disassembler/dmopcode.c vendor-sys/acpica/dist/source/components/disassembler/dmresrc.c vendor-sys/acpica/dist/source/components/disassembler/dmresrcl.c vendor-sys/acpica/dist/source/components/disassembler/dmresrcl2.c vendor-sys/acpica/dist/source/components/disassembler/dmresrcs.c vendor-sys/acpica/dist/source/components/disassembler/dmutils.c vendor-sys/acpica/dist/source/components/disassembler/dmwalk.c vendor-sys/acpica/dist/source/components/dispatcher/dsargs.c vendor-sys/acpica/dist/source/components/dispatcher/dscontrol.c vendor-sys/acpica/dist/source/components/dispatcher/dsfield.c vendor-sys/acpica/dist/source/components/dispatcher/dsinit.c vendor-sys/acpica/dist/source/components/dispatcher/dsmethod.c vendor-sys/acpica/dist/source/components/dispatcher/dsmthdat.c vendor-sys/acpica/dist/source/components/dispatcher/dsobject.c vendor-sys/acpica/dist/source/components/dispatcher/dsopcode.c vendor-sys/acpica/dist/source/components/dispatcher/dsutils.c vendor-sys/acpica/dist/source/components/dispatcher/dswexec.c vendor-sys/acpica/dist/source/components/dispatcher/dswload.c vendor-sys/acpica/dist/source/components/dispatcher/dswload2.c vendor-sys/acpica/dist/source/components/dispatcher/dswscope.c vendor-sys/acpica/dist/source/components/dispatcher/dswstate.c vendor-sys/acpica/dist/source/components/events/evevent.c vendor-sys/acpica/dist/source/components/events/evglock.c vendor-sys/acpica/dist/source/components/events/evgpe.c vendor-sys/acpica/dist/source/components/events/evgpeblk.c vendor-sys/acpica/dist/source/components/events/evgpeinit.c vendor-sys/acpica/dist/source/components/events/evgpeutil.c vendor-sys/acpica/dist/source/components/events/evhandler.c vendor-sys/acpica/dist/source/components/events/evmisc.c vendor-sys/acpica/dist/source/components/events/evregion.c vendor-sys/acpica/dist/source/components/events/evrgnini.c vendor-sys/acpica/dist/source/components/events/evsci.c vendor-sys/acpica/dist/source/components/events/evxface.c vendor-sys/acpica/dist/source/components/events/evxfevnt.c vendor-sys/acpica/dist/source/components/events/evxfgpe.c vendor-sys/acpica/dist/source/components/events/evxfregn.c vendor-sys/acpica/dist/source/components/executer/exconfig.c vendor-sys/acpica/dist/source/components/executer/exconvrt.c vendor-sys/acpica/dist/source/components/executer/excreate.c vendor-sys/acpica/dist/source/components/executer/exdebug.c vendor-sys/acpica/dist/source/components/executer/exdump.c vendor-sys/acpica/dist/source/components/executer/exfield.c vendor-sys/acpica/dist/source/components/executer/exfldio.c vendor-sys/acpica/dist/source/components/executer/exmisc.c vendor-sys/acpica/dist/source/components/executer/exmutex.c vendor-sys/acpica/dist/source/components/executer/exnames.c vendor-sys/acpica/dist/source/components/executer/exoparg1.c vendor-sys/acpica/dist/source/components/executer/exoparg2.c vendor-sys/acpica/dist/source/components/executer/exoparg3.c vendor-sys/acpica/dist/source/components/executer/exoparg6.c vendor-sys/acpica/dist/source/components/executer/exprep.c vendor-sys/acpica/dist/source/components/executer/exregion.c vendor-sys/acpica/dist/source/components/executer/exresnte.c vendor-sys/acpica/dist/source/components/executer/exresolv.c vendor-sys/acpica/dist/source/components/executer/exresop.c vendor-sys/acpica/dist/source/components/executer/exstore.c vendor-sys/acpica/dist/source/components/executer/exstoren.c vendor-sys/acpica/dist/source/components/executer/exstorob.c vendor-sys/acpica/dist/source/components/executer/exsystem.c vendor-sys/acpica/dist/source/components/executer/exutils.c vendor-sys/acpica/dist/source/components/hardware/hwacpi.c vendor-sys/acpica/dist/source/components/hardware/hwesleep.c vendor-sys/acpica/dist/source/components/hardware/hwgpe.c vendor-sys/acpica/dist/source/components/hardware/hwpci.c vendor-sys/acpica/dist/source/components/hardware/hwregs.c vendor-sys/acpica/dist/source/components/hardware/hwsleep.c vendor-sys/acpica/dist/source/components/hardware/hwtimer.c vendor-sys/acpica/dist/source/components/hardware/hwvalid.c vendor-sys/acpica/dist/source/components/hardware/hwxface.c vendor-sys/acpica/dist/source/components/hardware/hwxfsleep.c vendor-sys/acpica/dist/source/components/namespace/nsaccess.c vendor-sys/acpica/dist/source/components/namespace/nsalloc.c vendor-sys/acpica/dist/source/components/namespace/nsdump.c vendor-sys/acpica/dist/source/components/namespace/nsdumpdv.c vendor-sys/acpica/dist/source/components/namespace/nseval.c vendor-sys/acpica/dist/source/components/namespace/nsinit.c vendor-sys/acpica/dist/source/components/namespace/nsload.c vendor-sys/acpica/dist/source/components/namespace/nsnames.c vendor-sys/acpica/dist/source/components/namespace/nsobject.c vendor-sys/acpica/dist/source/components/namespace/nsparse.c vendor-sys/acpica/dist/source/components/namespace/nspredef.c vendor-sys/acpica/dist/source/components/namespace/nsprepkg.c vendor-sys/acpica/dist/source/components/namespace/nsrepair.c vendor-sys/acpica/dist/source/components/namespace/nsrepair2.c vendor-sys/acpica/dist/source/components/namespace/nssearch.c vendor-sys/acpica/dist/source/components/namespace/nsutils.c vendor-sys/acpica/dist/source/components/namespace/nswalk.c vendor-sys/acpica/dist/source/components/namespace/nsxfeval.c vendor-sys/acpica/dist/source/components/namespace/nsxfname.c vendor-sys/acpica/dist/source/components/namespace/nsxfobj.c vendor-sys/acpica/dist/source/components/parser/psargs.c vendor-sys/acpica/dist/source/components/parser/psloop.c vendor-sys/acpica/dist/source/components/parser/psobject.c vendor-sys/acpica/dist/source/components/parser/psopcode.c vendor-sys/acpica/dist/source/components/parser/psopinfo.c vendor-sys/acpica/dist/source/components/parser/psparse.c vendor-sys/acpica/dist/source/components/parser/psscope.c vendor-sys/acpica/dist/source/components/parser/pstree.c vendor-sys/acpica/dist/source/components/parser/psutils.c vendor-sys/acpica/dist/source/components/parser/pswalk.c vendor-sys/acpica/dist/source/components/parser/psxface.c vendor-sys/acpica/dist/source/components/resources/rsaddr.c vendor-sys/acpica/dist/source/components/resources/rscalc.c vendor-sys/acpica/dist/source/components/resources/rscreate.c vendor-sys/acpica/dist/source/components/resources/rsdump.c vendor-sys/acpica/dist/source/components/resources/rsdumpinfo.c vendor-sys/acpica/dist/source/components/resources/rsinfo.c vendor-sys/acpica/dist/source/components/resources/rsio.c vendor-sys/acpica/dist/source/components/resources/rsirq.c vendor-sys/acpica/dist/source/components/resources/rslist.c vendor-sys/acpica/dist/source/components/resources/rsmemory.c vendor-sys/acpica/dist/source/components/resources/rsmisc.c vendor-sys/acpica/dist/source/components/resources/rsserial.c vendor-sys/acpica/dist/source/components/resources/rsutils.c vendor-sys/acpica/dist/source/components/resources/rsxface.c vendor-sys/acpica/dist/source/components/tables/tbfadt.c vendor-sys/acpica/dist/source/components/tables/tbfind.c vendor-sys/acpica/dist/source/components/tables/tbinstal.c vendor-sys/acpica/dist/source/components/tables/tbutils.c vendor-sys/acpica/dist/source/components/tables/tbxface.c vendor-sys/acpica/dist/source/components/tables/tbxfload.c vendor-sys/acpica/dist/source/components/tables/tbxfroot.c vendor-sys/acpica/dist/source/components/utilities/utaddress.c vendor-sys/acpica/dist/source/components/utilities/utalloc.c vendor-sys/acpica/dist/source/components/utilities/utcache.c vendor-sys/acpica/dist/source/components/utilities/utclib.c vendor-sys/acpica/dist/source/components/utilities/utcopy.c vendor-sys/acpica/dist/source/components/utilities/utdebug.c vendor-sys/acpica/dist/source/components/utilities/utdecode.c vendor-sys/acpica/dist/source/components/utilities/utdelete.c vendor-sys/acpica/dist/source/components/utilities/uteval.c vendor-sys/acpica/dist/source/components/utilities/utexcep.c vendor-sys/acpica/dist/source/components/utilities/utglobal.c vendor-sys/acpica/dist/source/components/utilities/utids.c vendor-sys/acpica/dist/source/components/utilities/utinit.c vendor-sys/acpica/dist/source/components/utilities/utlock.c vendor-sys/acpica/dist/source/components/utilities/utmath.c vendor-sys/acpica/dist/source/components/utilities/utmisc.c vendor-sys/acpica/dist/source/components/utilities/utmutex.c vendor-sys/acpica/dist/source/components/utilities/utobject.c vendor-sys/acpica/dist/source/components/utilities/utosi.c vendor-sys/acpica/dist/source/components/utilities/utownerid.c vendor-sys/acpica/dist/source/components/utilities/utresrc.c vendor-sys/acpica/dist/source/components/utilities/utstate.c vendor-sys/acpica/dist/source/components/utilities/utstring.c vendor-sys/acpica/dist/source/components/utilities/uttrack.c vendor-sys/acpica/dist/source/components/utilities/utxface.c vendor-sys/acpica/dist/source/components/utilities/utxferror.c vendor-sys/acpica/dist/source/components/utilities/utxfinit.c vendor-sys/acpica/dist/source/components/utilities/utxfmutex.c vendor-sys/acpica/dist/source/include/acapps.h vendor-sys/acpica/dist/source/include/acbuffer.h vendor-sys/acpica/dist/source/include/accommon.h vendor-sys/acpica/dist/source/include/acconfig.h vendor-sys/acpica/dist/source/include/acdebug.h vendor-sys/acpica/dist/source/include/acdisasm.h vendor-sys/acpica/dist/source/include/acdispat.h vendor-sys/acpica/dist/source/include/acevents.h vendor-sys/acpica/dist/source/include/acexcep.h vendor-sys/acpica/dist/source/include/acglobal.h vendor-sys/acpica/dist/source/include/achware.h vendor-sys/acpica/dist/source/include/acinterp.h vendor-sys/acpica/dist/source/include/aclocal.h vendor-sys/acpica/dist/source/include/acmacros.h vendor-sys/acpica/dist/source/include/acnames.h vendor-sys/acpica/dist/source/include/acnamesp.h vendor-sys/acpica/dist/source/include/acobject.h vendor-sys/acpica/dist/source/include/acopcode.h vendor-sys/acpica/dist/source/include/acoutput.h vendor-sys/acpica/dist/source/include/acparser.h vendor-sys/acpica/dist/source/include/acpi.h vendor-sys/acpica/dist/source/include/acpiosxf.h vendor-sys/acpica/dist/source/include/acpixf.h vendor-sys/acpica/dist/source/include/acpredef.h vendor-sys/acpica/dist/source/include/acresrc.h vendor-sys/acpica/dist/source/include/acrestyp.h vendor-sys/acpica/dist/source/include/acstruct.h vendor-sys/acpica/dist/source/include/actables.h vendor-sys/acpica/dist/source/include/actbl.h vendor-sys/acpica/dist/source/include/actbl1.h vendor-sys/acpica/dist/source/include/actbl2.h vendor-sys/acpica/dist/source/include/actbl3.h vendor-sys/acpica/dist/source/include/actypes.h vendor-sys/acpica/dist/source/include/acutils.h vendor-sys/acpica/dist/source/include/amlcode.h vendor-sys/acpica/dist/source/include/amlresrc.h vendor-sys/acpica/dist/source/include/platform/accygwin.h vendor-sys/acpica/dist/source/include/platform/acefi.h vendor-sys/acpica/dist/source/include/platform/acenv.h vendor-sys/acpica/dist/source/include/platform/acfreebsd.h vendor-sys/acpica/dist/source/include/platform/acgcc.h vendor-sys/acpica/dist/source/include/platform/achaiku.h vendor-sys/acpica/dist/source/include/platform/acintel.h vendor-sys/acpica/dist/source/include/platform/aclinux.h vendor-sys/acpica/dist/source/include/platform/acmsvc.h vendor-sys/acpica/dist/source/include/platform/acnetbsd.h vendor-sys/acpica/dist/source/include/platform/acos2.h vendor-sys/acpica/dist/source/include/platform/acwin.h vendor-sys/acpica/dist/source/include/platform/acwin64.h vendor-sys/acpica/dist/source/os_specific/service_layers/osunixdir.c vendor-sys/acpica/dist/source/os_specific/service_layers/osunixxf.c vendor-sys/acpica/dist/source/os_specific/service_layers/oswindir.c vendor-sys/acpica/dist/source/os_specific/service_layers/oswintbl.c vendor-sys/acpica/dist/source/os_specific/service_layers/oswinxf.c vendor-sys/acpica/dist/source/tools/acpibin/abcompare.c vendor-sys/acpica/dist/source/tools/acpibin/abmain.c vendor-sys/acpica/dist/source/tools/acpibin/acpibin.h vendor-sys/acpica/dist/source/tools/acpiexec/aecommon.h vendor-sys/acpica/dist/source/tools/acpiexec/aeexec.c vendor-sys/acpica/dist/source/tools/acpiexec/aehandlers.c vendor-sys/acpica/dist/source/tools/acpiexec/aemain.c vendor-sys/acpica/dist/source/tools/acpiexec/aetables.c vendor-sys/acpica/dist/source/tools/acpiexec/aetables.h vendor-sys/acpica/dist/source/tools/acpihelp/acpihelp.h vendor-sys/acpica/dist/source/tools/acpihelp/ahamlops.c vendor-sys/acpica/dist/source/tools/acpihelp/ahaslkey.c vendor-sys/acpica/dist/source/tools/acpihelp/ahaslops.c vendor-sys/acpica/dist/source/tools/acpihelp/ahdecode.c vendor-sys/acpica/dist/source/tools/acpihelp/ahmain.c vendor-sys/acpica/dist/source/tools/acpinames/acpinames.h vendor-sys/acpica/dist/source/tools/acpinames/anmain.c vendor-sys/acpica/dist/source/tools/acpinames/anstubs.c vendor-sys/acpica/dist/source/tools/acpinames/antables.c vendor-sys/acpica/dist/source/tools/acpisrc/acpisrc.h vendor-sys/acpica/dist/source/tools/acpisrc/ascase.c vendor-sys/acpica/dist/source/tools/acpisrc/asconvrt.c vendor-sys/acpica/dist/source/tools/acpisrc/asfile.c vendor-sys/acpica/dist/source/tools/acpisrc/asmain.c vendor-sys/acpica/dist/source/tools/acpisrc/asremove.c vendor-sys/acpica/dist/source/tools/acpisrc/astable.c vendor-sys/acpica/dist/source/tools/acpisrc/asutils.c vendor-sys/acpica/dist/source/tools/acpixtract/acpixtract.c vendor-sys/acpica/dist/source/tools/acpixtract/axmain.c vendor-sys/acpica/dist/source/tools/examples/examples.c vendor-sys/acpica/dist/tests/misc/grammar.asl Modified: vendor-sys/acpica/dist/changes.txt ============================================================================== --- vendor-sys/acpica/dist/changes.txt Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/changes.txt Thu Jan 17 21:32:03 2013 (r245576) @@ -1,8 +1,70 @@ ---------------------------------------- -20 December 2012. Summary of changes for version 20121220: +17 January 2013. Summary of changes for version 20130117: + + +1) ACPICA Kernel-resident Subsystem: + +Updated the AcpiGetSleepTypeData interface: Allow the \_Sx methods to +return either 1 or 2 integers. Although the ACPI spec defines the \_Sx +objects to return a package containing one integer, most BIOS code returns +two integers and the previous code reflects that. However, we also need to +support BIOS code that actually implements to the ACPI spec, and this +change reflects this. + +Fixed two issues with the ACPI_DEBUG_PRINT macros: +1) Added the ACPI_DO_WHILE macro to the main DEBUG_PRINT helper macro for +C compilers that require this support. +2) Renamed the internal ACPI_DEBUG macro to ACPI_DO_DEBUG_PRINT since +ACPI_DEBUG is already used by many of the various hosts. + +Updated all ACPICA copyrights and signons to 2013. Added the 2013 +copyright to all module headers and signons, including the standard Linux +header. This affects virtually every file in the ACPICA core subsystem, +iASL compiler, all ACPICA utilities, and the test suites. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and +has a much larger code and data size. + + Previous Release: + Non-Debug Version: 94.5K Code, 25.5K Data, 120.0K Total + Debug Version: 182.2K Code, 74.9K Data, 257.1K Total + Current Release: + Non-Debug Version: 94.5K Code, 25.4K Data, 119.9K Total + Debug Version: 182.3K Code, 75.0K Data, 257.3K Total + -This release is available at https://www.acpica.org/downloads -The ACPI 5.0 specification is available at www.acpi.info +2) iASL Compiler/Disassembler and Tools: + +Generic Unix OSL: Use a buffer to eliminate multiple vfprintf()s and +prevent a possible fault on some hosts. Some C libraries modify the arg +pointer parameter to vfprintf making it difficult to call it twice in the +AcpiOsVprintf function. Use a local buffer to workaround this issue. This +does not affect the Windows OSL since the Win C library does not modify +the arg pointer. Chao Guan, Bob Moore. + +iASL: Fixed a possible infinite loop when the maximum error count is +reached. If an output file other than the .AML file is specified (such as +a listing file), and the maximum number of errors is reached, do not +attempt to flush data to the output file(s) as the compiler is aborting. +This can cause an infinite loop as the max error count code essentially +keeps calling itself. + +iASL/Disassembler: Added an option (-in) to ignore NOOP opcodes/operators. +Implemented for both the compiler and the disassembler. Often, the NOOP +opcode is used as padding for packages that are changed dynamically by the +BIOS. When disassembled and recompiled, these NOOPs will cause syntax +errors. This option causes the disassembler to ignore all NOOP opcodes +(0xA3), and it also causes the compiler to ignore all ASL source code NOOP +statements as well. + +Debugger: Enhanced the Sleep command to execute all sleep states. This +change allows Sleep to be invoked with no arguments and causes the +debugger to execute all of the sleep states, 0-5, automatically. + +---------------------------------------- +20 December 2012. Summary of changes for version 20121220: 1) ACPICA Kernel-resident Subsystem: @@ -88,9 +150,6 @@ been updated. ---------------------------------------- 14 November 2012. Summary of changes for version 20121114: -This release is available at https://www.acpica.org/downloads -The ACPI 5.0 specification is available at www.acpi.info - 1) ACPICA Kernel-resident Subsystem: Implemented a performance enhancement for ACPI/AML Package objects. This Modified: vendor-sys/acpica/dist/source/common/adfile.c ============================================================================== --- vendor-sys/acpica/dist/source/common/adfile.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/common/adfile.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/common/adisasm.c ============================================================================== --- vendor-sys/acpica/dist/source/common/adisasm.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/common/adisasm.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/common/adwalk.c ============================================================================== --- vendor-sys/acpica/dist/source/common/adwalk.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/common/adwalk.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/common/ahpredef.c ============================================================================== --- vendor-sys/acpica/dist/source/common/ahpredef.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/common/ahpredef.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/common/dmextern.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmextern.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/common/dmextern.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/common/dmrestag.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmrestag.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/common/dmrestag.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/common/dmtable.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmtable.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/common/dmtable.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/common/dmtbdump.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmtbdump.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/common/dmtbdump.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/common/dmtbinfo.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmtbinfo.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/common/dmtbinfo.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/common/getopt.c ============================================================================== --- vendor-sys/acpica/dist/source/common/getopt.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/common/getopt.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/aslanalyze.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslanalyze.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslanalyze.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/aslbtypes.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslbtypes.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslbtypes.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/aslcodegen.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcodegen.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslcodegen.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/aslcompile.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcompile.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslcompile.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/aslcompiler.h ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcompiler.h Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslcompiler.h Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/aslcompiler.l ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcompiler.l Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslcompiler.l Thu Jan 17 21:32:03 2013 (r245576) @@ -6,7 +6,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -201,7 +201,7 @@ NamePathTail [.]{NameSeg} "Mutex" { count (2); return (PARSEOP_MUTEX); } "Name" { count (2); return (PARSEOP_NAME); } "NAnd" { count (3); return (PARSEOP_NAND); } -"Noop" { count (3); return (PARSEOP_NOOP); } +"Noop" { if (!AcpiGbl_IgnoreNoopOperator) {count (3); return (PARSEOP_NOOP);} } "NOr" { count (3); return (PARSEOP_NOR); } "Not" { count (3); return (PARSEOP_NOT); } "Notify" { count (3); return (PARSEOP_NOTIFY); } Modified: vendor-sys/acpica/dist/source/compiler/aslcompiler.y ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcompiler.y Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslcompiler.y Thu Jan 17 21:32:03 2013 (r245576) @@ -6,7 +6,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/asldefine.h ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asldefine.h Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/asldefine.h Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/aslerror.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslerror.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslerror.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -660,7 +660,6 @@ AslCommonError ( Gbl_SourceLine = 0; Gbl_NextError = Gbl_ErrorLog; - CmDoOutputFiles (); CmCleanupAndExit (); exit(1); } Modified: vendor-sys/acpica/dist/source/compiler/aslfileio.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslfileio.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslfileio.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/aslfiles.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslfiles.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslfiles.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/aslfold.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslfold.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslfold.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/aslglobal.h ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslglobal.h Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslglobal.h Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/aslhex.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslhex.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslhex.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/asllength.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asllength.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/asllength.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/asllisting.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asllisting.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/asllisting.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -117,6 +117,8 @@ LsTreeWriteWalk ( UINT32 Level, void *Context); +#define ASL_LISTING_LINE_PREFIX ": " + /******************************************************************************* * @@ -665,7 +667,8 @@ LsWriteListingHexBytes ( { case ASL_FILE_LISTING_OUTPUT: - FlPrintFile (FileId, "%8.8X....", Gbl_CurrentAmlOffset); + FlPrintFile (FileId, "%8.8X%s", Gbl_CurrentAmlOffset, + ASL_LISTING_LINE_PREFIX); break; case ASL_FILE_ASM_SOURCE_OUTPUT: @@ -725,6 +728,24 @@ LsWriteOneSourceLine ( Gbl_SourceLine++; Gbl_ListingNode->LineNumber++; + /* Ignore lines that are completely blank (but count the line above) */ + + if (FlReadFile (ASL_FILE_SOURCE_OUTPUT, &FileByte, 1) != AE_OK) + { + return (0); + } + if (FileByte == '\n') + { + return (1); + } + + /* + * This is a non-empty line, we will print the entire line with + * the line number and possibly other prefixes and transforms. + */ + + /* Line prefixes for special files, C and ASM output */ + if (FileId == ASL_FILE_C_SOURCE_OUTPUT) { FlPrintFile (FileId, " *"); @@ -740,19 +761,21 @@ LsWriteOneSourceLine ( * This file contains "include" statements, print the current * filename and line number within the current file */ - FlPrintFile (FileId, "%12s %5d....", - Gbl_ListingNode->Filename, Gbl_ListingNode->LineNumber); + FlPrintFile (FileId, "%12s %5d%s", + Gbl_ListingNode->Filename, Gbl_ListingNode->LineNumber, + ASL_LISTING_LINE_PREFIX); } else { /* No include files, just print the line number */ - FlPrintFile (FileId, "%8d....", Gbl_SourceLine); + FlPrintFile (FileId, "%8u%s", Gbl_SourceLine, + ASL_LISTING_LINE_PREFIX); } - /* Read one line (up to a newline or EOF) */ + /* Read the rest of this line (up to a newline or EOF) */ - while (FlReadFile (ASL_FILE_SOURCE_OUTPUT, &FileByte, 1) == AE_OK) + do { if (FileId == ASL_FILE_C_SOURCE_OUTPUT) { @@ -766,13 +789,15 @@ LsWriteOneSourceLine ( if (FileByte == '\n') { /* + * This line has been completed. * Check if an error occurred on this source line during the compile. * If so, we print the error message after the source line. */ LsCheckException (Gbl_SourceLine, FileId); return (1); } - } + + } while (FlReadFile (ASL_FILE_SOURCE_OUTPUT, &FileByte, 1) == AE_OK); /* EOF on the input file was reached */ Modified: vendor-sys/acpica/dist/source/compiler/aslload.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslload.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslload.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/asllookup.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asllookup.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/asllookup.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/aslmain.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslmain.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslmain.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -153,6 +153,7 @@ Options ( ACPI_OPTION ("-oi", "Disable integer optimization to Zero/One/Ones"); ACPI_OPTION ("-on", "Disable named reference string optimization"); ACPI_OPTION ("-cr", "Disable Resource Descriptor error checking"); + ACPI_OPTION ("-in", "Ignore NoOp operators"); ACPI_OPTION ("-r ", "Override table header Revision (1-255)"); printf ("\nASL Listing Files:\n"); @@ -172,6 +173,7 @@ Options ( ACPI_OPTION ("", "(Obtain DSDT from current system if no input file)"); ACPI_OPTION ("-e [f1,f2]", "Include ACPI table(s) for external symbol resolution"); ACPI_OPTION ("-g", "Get ACPI tables and write to files (*.dat)"); + ACPI_OPTION ("-in", "Ignore NoOp opcodes"); ACPI_OPTION ("-vt", "Dump binary table data in hex format within output file"); printf ("\nHelp:\n"); @@ -622,6 +624,13 @@ AslDoOptions ( Gbl_C_IncludeOutputFlag = TRUE; break; + case 'n': + + /* Compiler/Disassembler: Ignore the NOOP operator */ + + AcpiGbl_IgnoreNoopOperator = TRUE; + break; + default: printf ("Unknown option: -i%s\n", AcpiGbl_Optarg); return (-1); Modified: vendor-sys/acpica/dist/source/compiler/aslmap.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslmap.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslmap.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/aslmessages.h ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslmessages.h Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslmessages.h Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/aslmethod.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslmethod.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslmethod.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/aslnamesp.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslnamesp.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslnamesp.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/aslopcodes.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslopcodes.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslopcodes.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/asloperands.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asloperands.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/asloperands.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/aslopt.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslopt.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslopt.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/aslpredef.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslpredef.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslpredef.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -66,6 +66,7 @@ ApCheckForSpecialName ( static void ApCheckObjectType ( + const char *PredefinedName, ACPI_PARSE_OBJECT *Op, UINT32 ExpectedBtypes); @@ -383,7 +384,8 @@ ApCheckPredefinedReturnValue ( /* Static data return object - check against expected type */ - ApCheckObjectType (ReturnValueOp, + ApCheckObjectType (PredefinedNames[Index].Info.Name, + ReturnValueOp, PredefinedNames[Index].Info.ExpectedBtypes); break; @@ -482,7 +484,8 @@ ApCheckForPredefinedObject ( /* Typecheck the actual object, it is the next argument */ - ApCheckObjectType (Op->Asl.Child->Asl.Next, + ApCheckObjectType (PredefinedNames[Index].Info.Name, + Op->Asl.Child->Asl.Next, PredefinedNames[Index].Info.ExpectedBtypes); return; } @@ -640,7 +643,8 @@ ApCheckForSpecialName ( * * FUNCTION: ApCheckObjectType * - * PARAMETERS: Op - Current parse node + * PARAMETERS: PredefinedName - Name of the predefined object we are checking + * Op - Current parse node * ExpectedBtypes - Bitmap of expected return type(s) * * RETURN: None @@ -653,6 +657,7 @@ ApCheckForSpecialName ( static void ApCheckObjectType ( + const char *PredefinedName, ACPI_PARSE_OBJECT *Op, UINT32 ExpectedBtypes) { @@ -701,8 +706,8 @@ TypeErrorExit: ApGetExpectedTypes (StringBuffer, ExpectedBtypes); - sprintf (MsgBuffer, "found %s, requires %s", - UtGetOpName (Op->Asl.ParseOpcode), StringBuffer); + sprintf (MsgBuffer, "%s: found %s, requires %s", + PredefinedName, UtGetOpName (Op->Asl.ParseOpcode), StringBuffer); AslError (ASL_ERROR, ASL_MSG_RESERVED_OPERAND_TYPE, Op, MsgBuffer); Modified: vendor-sys/acpica/dist/source/compiler/aslresource.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslresource.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslresource.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/aslrestype1.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslrestype1.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslrestype1.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/aslrestype1i.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslrestype1i.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslrestype1i.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/aslrestype2.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslrestype2.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslrestype2.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/aslrestype2d.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslrestype2d.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslrestype2d.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/aslrestype2e.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslrestype2e.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslrestype2e.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/aslrestype2q.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslrestype2q.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslrestype2q.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/aslrestype2s.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslrestype2s.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslrestype2s.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/aslrestype2w.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslrestype2w.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslrestype2w.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/aslstartup.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslstartup.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslstartup.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/aslstubs.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslstubs.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslstubs.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/aslsupport.l ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslsupport.l Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslsupport.l Thu Jan 17 21:32:03 2013 (r245576) @@ -6,7 +6,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/asltransform.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asltransform.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/asltransform.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/asltree.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asltree.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/asltree.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/asltypes.h ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asltypes.h Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/asltypes.h Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/aslutils.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslutils.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslutils.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/asluuid.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asluuid.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/asluuid.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/aslwalks.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslwalks.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslwalks.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/aslxref.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslxref.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/aslxref.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/dtcompile.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/dtcompile.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/dtcompile.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/dtcompiler.h ============================================================================== --- vendor-sys/acpica/dist/source/compiler/dtcompiler.h Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/dtcompiler.h Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/dtexpress.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/dtexpress.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/dtexpress.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/dtfield.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/dtfield.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/dtfield.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/dtio.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/dtio.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/dtio.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/dtparser.l ============================================================================== --- vendor-sys/acpica/dist/source/compiler/dtparser.l Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/dtparser.l Thu Jan 17 21:32:03 2013 (r245576) @@ -6,7 +6,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/dtparser.y ============================================================================== --- vendor-sys/acpica/dist/source/compiler/dtparser.y Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/dtparser.y Thu Jan 17 21:32:03 2013 (r245576) @@ -6,7 +6,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/dtsubtable.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/dtsubtable.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/dtsubtable.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/dttable.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/dttable.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/dttable.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: vendor-sys/acpica/dist/source/compiler/dttemplate.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/dttemplate.c Thu Jan 17 21:28:31 2013 (r245575) +++ vendor-sys/acpica/dist/source/compiler/dttemplate.c Thu Jan 17 21:32:03 2013 (r245576) @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@FreeBSD.ORG Thu Jan 17 21:32:53 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id C4F2FD54; Thu, 17 Jan 2013 21:32:53 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A035D207; Thu, 17 Jan 2013 21:32:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0HLWr6P004954; Thu, 17 Jan 2013 21:32:53 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0HLWrJT004953; Thu, 17 Jan 2013 21:32:53 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201301172132.r0HLWrJT004953@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 17 Jan 2013 21:32:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r245578 - vendor-sys/acpica/20130117 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.14 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: Thu, 17 Jan 2013 21:32:53 -0000 Author: jkim Date: Thu Jan 17 21:32:53 2013 New Revision: 245578 URL: http://svnweb.freebsd.org/changeset/base/245578 Log: Tag ACPICA 20130117. Added: vendor-sys/acpica/20130117/ - copied from r245577, vendor-sys/acpica/dist/ From owner-svn-src-vendor@FreeBSD.ORG Fri Jan 18 20:06:49 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 34A836E0; Fri, 18 Jan 2013 20:06:49 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 1E24A303; Fri, 18 Jan 2013 20:06:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0IK6nqa024782; Fri, 18 Jan 2013 20:06:49 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0IK6kkr024763; Fri, 18 Jan 2013 20:06:46 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201301182006.r0IK6kkr024763@svn.freebsd.org> From: Andrew Turner Date: Fri, 18 Jan 2013 20:06:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r245614 - in vendor/compiler-rt/dist: . SDKs/darwin/usr/include SDKs/linux/usr/include cmake/Modules include include/sanitizer lib lib/arm lib/asan lib/asan/dynamic lib/asan/lit_tests l... 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.14 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, 18 Jan 2013 20:06:49 -0000 Author: andrew Date: Fri Jan 18 20:06:45 2013 New Revision: 245614 URL: http://svnweb.freebsd.org/changeset/base/245614 Log: Import compiler-rt r172839. Added: vendor/compiler-rt/dist/.arcconfig vendor/compiler-rt/dist/cmake/Modules/AddCompilerRT.cmake vendor/compiler-rt/dist/cmake/Modules/CompilerRTCompile.cmake vendor/compiler-rt/dist/cmake/Modules/CompilerRTLink.cmake vendor/compiler-rt/dist/cmake/Modules/CompilerRTUtils.cmake vendor/compiler-rt/dist/include/ vendor/compiler-rt/dist/include/sanitizer/ vendor/compiler-rt/dist/include/sanitizer/asan_interface.h vendor/compiler-rt/dist/include/sanitizer/common_interface_defs.h vendor/compiler-rt/dist/include/sanitizer/msan_interface.h vendor/compiler-rt/dist/lib/asan/asan_allocator2.cc vendor/compiler-rt/dist/lib/asan/asan_fake_stack.cc vendor/compiler-rt/dist/lib/asan/asan_intercepted_functions.h vendor/compiler-rt/dist/lib/asan/asan_report.cc vendor/compiler-rt/dist/lib/asan/asan_report.h vendor/compiler-rt/dist/lib/asan/dynamic/ vendor/compiler-rt/dist/lib/asan/dynamic/Makefile.mk vendor/compiler-rt/dist/lib/asan/dynamic/asan_interceptors_dynamic.cc vendor/compiler-rt/dist/lib/asan/lit_tests/ vendor/compiler-rt/dist/lib/asan/lit_tests/CMakeLists.txt vendor/compiler-rt/dist/lib/asan/lit_tests/Helpers/ vendor/compiler-rt/dist/lib/asan/lit_tests/Helpers/blacklist-extra.cc vendor/compiler-rt/dist/lib/asan/lit_tests/Helpers/initialization-blacklist-extra.cc vendor/compiler-rt/dist/lib/asan/lit_tests/Helpers/initialization-blacklist.txt vendor/compiler-rt/dist/lib/asan/lit_tests/Helpers/initialization-bug-extra.cc vendor/compiler-rt/dist/lib/asan/lit_tests/Helpers/initialization-bug-extra2.cc vendor/compiler-rt/dist/lib/asan/lit_tests/Helpers/initialization-nobug-extra.cc vendor/compiler-rt/dist/lib/asan/lit_tests/Helpers/lit.local.cfg vendor/compiler-rt/dist/lib/asan/lit_tests/Linux/ vendor/compiler-rt/dist/lib/asan/lit_tests/Linux/clone_test.cc vendor/compiler-rt/dist/lib/asan/lit_tests/Linux/initialization-bug-any-order.cc vendor/compiler-rt/dist/lib/asan/lit_tests/Linux/interception_failure_test.cc vendor/compiler-rt/dist/lib/asan/lit_tests/Linux/interception_malloc_test.cc vendor/compiler-rt/dist/lib/asan/lit_tests/Linux/interception_test.cc vendor/compiler-rt/dist/lib/asan/lit_tests/Linux/lit.local.cfg vendor/compiler-rt/dist/lib/asan/lit_tests/Linux/malloc-in-qsort.cc vendor/compiler-rt/dist/lib/asan/lit_tests/Linux/overflow-in-qsort.cc vendor/compiler-rt/dist/lib/asan/lit_tests/Linux/rlimit_mmap_test.cc vendor/compiler-rt/dist/lib/asan/lit_tests/Linux/swapcontext_test.cc vendor/compiler-rt/dist/lib/asan/lit_tests/SharedLibs/ vendor/compiler-rt/dist/lib/asan/lit_tests/SharedLibs/dlclose-test-so.cc vendor/compiler-rt/dist/lib/asan/lit_tests/SharedLibs/lit.local.cfg vendor/compiler-rt/dist/lib/asan/lit_tests/SharedLibs/shared-lib-test-so.cc vendor/compiler-rt/dist/lib/asan/lit_tests/Unit/ vendor/compiler-rt/dist/lib/asan/lit_tests/Unit/lit.cfg vendor/compiler-rt/dist/lib/asan/lit_tests/Unit/lit.site.cfg.in vendor/compiler-rt/dist/lib/asan/lit_tests/blacklist.cc vendor/compiler-rt/dist/lib/asan/lit_tests/deep_stack_uaf.cc vendor/compiler-rt/dist/lib/asan/lit_tests/deep_tail_call.cc vendor/compiler-rt/dist/lib/asan/lit_tests/deep_thread_stack.cc vendor/compiler-rt/dist/lib/asan/lit_tests/default_options.cc vendor/compiler-rt/dist/lib/asan/lit_tests/dlclose-test.cc vendor/compiler-rt/dist/lib/asan/lit_tests/force_inline_opt0.cc vendor/compiler-rt/dist/lib/asan/lit_tests/global-overflow.cc vendor/compiler-rt/dist/lib/asan/lit_tests/heap-overflow.cc vendor/compiler-rt/dist/lib/asan/lit_tests/initialization-blacklist.cc vendor/compiler-rt/dist/lib/asan/lit_tests/initialization-bug.cc vendor/compiler-rt/dist/lib/asan/lit_tests/initialization-nobug.cc vendor/compiler-rt/dist/lib/asan/lit_tests/interface_symbols.c vendor/compiler-rt/dist/lib/asan/lit_tests/large_func_test.cc vendor/compiler-rt/dist/lib/asan/lit_tests/lit.cfg vendor/compiler-rt/dist/lib/asan/lit_tests/lit.site.cfg.in vendor/compiler-rt/dist/lib/asan/lit_tests/log-path_test.cc vendor/compiler-rt/dist/lib/asan/lit_tests/log_path_fork_test.cc vendor/compiler-rt/dist/lib/asan/lit_tests/malloc_delete_mismatch.cc vendor/compiler-rt/dist/lib/asan/lit_tests/malloc_hook.cc vendor/compiler-rt/dist/lib/asan/lit_tests/memcmp_test.cc vendor/compiler-rt/dist/lib/asan/lit_tests/null_deref.cc vendor/compiler-rt/dist/lib/asan/lit_tests/on_error_callback.cc vendor/compiler-rt/dist/lib/asan/lit_tests/sanity_check_pure_c.c vendor/compiler-rt/dist/lib/asan/lit_tests/shared-lib-test.cc vendor/compiler-rt/dist/lib/asan/lit_tests/sleep_before_dying.c vendor/compiler-rt/dist/lib/asan/lit_tests/stack-frame-demangle.cc vendor/compiler-rt/dist/lib/asan/lit_tests/stack-overflow.cc vendor/compiler-rt/dist/lib/asan/lit_tests/stack-use-after-return.cc vendor/compiler-rt/dist/lib/asan/lit_tests/strip_path_prefix.c vendor/compiler-rt/dist/lib/asan/lit_tests/strncpy-overflow.cc vendor/compiler-rt/dist/lib/asan/lit_tests/symbolize_callback.cc vendor/compiler-rt/dist/lib/asan/lit_tests/use-after-free.cc vendor/compiler-rt/dist/lib/asan/lit_tests/use-after-scope-inlined.cc vendor/compiler-rt/dist/lib/asan/tests/asan_test_main.cc vendor/compiler-rt/dist/lib/lit.common.cfg vendor/compiler-rt/dist/lib/lit.common.unit.cfg vendor/compiler-rt/dist/lib/msan/ vendor/compiler-rt/dist/lib/msan/CMakeLists.txt vendor/compiler-rt/dist/lib/msan/msan.cc vendor/compiler-rt/dist/lib/msan/msan.h vendor/compiler-rt/dist/lib/msan/msan_allocator.cc vendor/compiler-rt/dist/lib/msan/msan_flags.h vendor/compiler-rt/dist/lib/msan/msan_interceptors.cc vendor/compiler-rt/dist/lib/msan/msan_linux.cc vendor/compiler-rt/dist/lib/msan/msan_new_delete.cc vendor/compiler-rt/dist/lib/msan/msan_platform_limits_posix.cc vendor/compiler-rt/dist/lib/msan/msan_platform_limits_posix.h vendor/compiler-rt/dist/lib/msan/msan_report.cc vendor/compiler-rt/dist/lib/msan/tests/ vendor/compiler-rt/dist/lib/msan/tests/CMakeLists.txt vendor/compiler-rt/dist/lib/msan/tests/lit.cfg vendor/compiler-rt/dist/lib/msan/tests/lit.site.cfg.in vendor/compiler-rt/dist/lib/msan/tests/msan_test.cc vendor/compiler-rt/dist/lib/msan/tests/msandr_test_so.cc vendor/compiler-rt/dist/lib/msan/tests/msandr_test_so.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common_interceptors.inc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common_interceptors_scanf.inc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_lfstack.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_platform_interceptors.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_quarantine.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_report_decorator.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_stackdepot.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_stackdepot.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_stacktrace.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_stacktrace.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_symbolizer_itanium.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_symbolizer_linux.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_symbolizer_mac.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_symbolizer_win.cc vendor/compiler-rt/dist/lib/sanitizer_common/scripts/ vendor/compiler-rt/dist/lib/sanitizer_common/scripts/check_lint.sh (contents, props changed) vendor/compiler-rt/dist/lib/sanitizer_common/tests/CMakeLists.txt vendor/compiler-rt/dist/lib/sanitizer_common/tests/lit.cfg vendor/compiler-rt/dist/lib/sanitizer_common/tests/lit.site.cfg.in vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_allocator_testlib.cc vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_libc_test.cc vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_mutex_test.cc vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_printf_test.cc vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_scanf_interceptor_test.cc vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_stackdepot_test.cc vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_test_main.cc vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_test_utils.h vendor/compiler-rt/dist/lib/sanitizer_common/tests/standalone_malloc_test.cc vendor/compiler-rt/dist/lib/tsan/check_cmake.sh (contents, props changed) vendor/compiler-rt/dist/lib/tsan/lit_tests/ vendor/compiler-rt/dist/lib/tsan/lit_tests/CMakeLists.txt vendor/compiler-rt/dist/lib/tsan/lit_tests/Helpers/ vendor/compiler-rt/dist/lib/tsan/lit_tests/Helpers/blacklist.txt vendor/compiler-rt/dist/lib/tsan/lit_tests/Helpers/lit.local.cfg vendor/compiler-rt/dist/lib/tsan/lit_tests/Unit/ vendor/compiler-rt/dist/lib/tsan/lit_tests/Unit/lit.cfg vendor/compiler-rt/dist/lib/tsan/lit_tests/Unit/lit.site.cfg.in vendor/compiler-rt/dist/lib/tsan/lit_tests/blacklist.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/fd_close_norace.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/fd_dup_norace.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/fd_location.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/fd_pipe_norace.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/fd_pipe_race.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/fd_socket_connect_norace.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/fd_socket_norace.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/fd_socketpair_norace.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/fd_stdout_race.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/free_race.c vendor/compiler-rt/dist/lib/tsan/lit_tests/free_race2.c vendor/compiler-rt/dist/lib/tsan/lit_tests/global_race.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/heap_race.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/ignore_race.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/java.h vendor/compiler-rt/dist/lib/tsan/lit_tests/java_alloc.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/java_lock.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/java_lock_move.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/java_race.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/java_race_move.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/java_rwlock.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/lit.cfg vendor/compiler-rt/dist/lib/tsan/lit_tests/lit.site.cfg.in vendor/compiler-rt/dist/lib/tsan/lit_tests/memcpy_race.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/mop_with_offset.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/mop_with_offset2.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/mutex_destroy_locked.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/mutexset1.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/mutexset2.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/mutexset3.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/mutexset4.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/mutexset5.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/mutexset6.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/mutexset7.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/race_on_barrier.c vendor/compiler-rt/dist/lib/tsan/lit_tests/race_on_barrier2.c vendor/compiler-rt/dist/lib/tsan/lit_tests/race_on_heap.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/race_on_mutex.c vendor/compiler-rt/dist/lib/tsan/lit_tests/race_on_read.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/race_with_finished_thread.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/signal_errno.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/signal_malloc.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/simple_race.c vendor/compiler-rt/dist/lib/tsan/lit_tests/simple_race.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/simple_stack.c vendor/compiler-rt/dist/lib/tsan/lit_tests/simple_stack2.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/sleep_sync.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/sleep_sync2.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/stack_race.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/stack_race2.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/static_init1.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/static_init2.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/static_init3.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/static_init4.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/static_init5.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/static_init6.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/suppress_same_address.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/suppress_same_stacks.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/test_output.sh (contents, props changed) vendor/compiler-rt/dist/lib/tsan/lit_tests/thread_leak.c vendor/compiler-rt/dist/lib/tsan/lit_tests/thread_leak2.c vendor/compiler-rt/dist/lib/tsan/lit_tests/thread_leak3.c vendor/compiler-rt/dist/lib/tsan/lit_tests/thread_name.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/tiny_race.c vendor/compiler-rt/dist/lib/tsan/lit_tests/tls_race.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/tls_race2.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/user_fopen.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/user_malloc.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/virtual_inheritance_compile_bug.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/vptr_benign_race.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/vptr_harmful_race.cc vendor/compiler-rt/dist/lib/tsan/lit_tests/write_in_reader_lock.cc vendor/compiler-rt/dist/lib/tsan/rtl/CMakeLists.txt vendor/compiler-rt/dist/lib/tsan/rtl/tsan_fd.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_fd.h vendor/compiler-rt/dist/lib/tsan/rtl/tsan_interface_java.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_interface_java.h vendor/compiler-rt/dist/lib/tsan/rtl/tsan_mutexset.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_mutexset.h vendor/compiler-rt/dist/lib/tsan/rtl/tsan_platform_windows.cc vendor/compiler-rt/dist/lib/tsan/tests/ vendor/compiler-rt/dist/lib/tsan/tests/CMakeLists.txt vendor/compiler-rt/dist/lib/tsan/tests/rtl/ vendor/compiler-rt/dist/lib/tsan/tests/rtl/CMakeLists.txt vendor/compiler-rt/dist/lib/tsan/tests/rtl/tsan_bench.cc vendor/compiler-rt/dist/lib/tsan/tests/rtl/tsan_mop.cc vendor/compiler-rt/dist/lib/tsan/tests/rtl/tsan_mutex.cc vendor/compiler-rt/dist/lib/tsan/tests/rtl/tsan_posix.cc vendor/compiler-rt/dist/lib/tsan/tests/rtl/tsan_string.cc vendor/compiler-rt/dist/lib/tsan/tests/rtl/tsan_test.cc vendor/compiler-rt/dist/lib/tsan/tests/rtl/tsan_test_util.h vendor/compiler-rt/dist/lib/tsan/tests/rtl/tsan_test_util_linux.cc vendor/compiler-rt/dist/lib/tsan/tests/rtl/tsan_thread.cc vendor/compiler-rt/dist/lib/tsan/tests/unit/ vendor/compiler-rt/dist/lib/tsan/tests/unit/CMakeLists.txt vendor/compiler-rt/dist/lib/tsan/tests/unit/tsan_clock_test.cc vendor/compiler-rt/dist/lib/tsan/tests/unit/tsan_flags_test.cc vendor/compiler-rt/dist/lib/tsan/tests/unit/tsan_mman_test.cc vendor/compiler-rt/dist/lib/tsan/tests/unit/tsan_mutex_test.cc vendor/compiler-rt/dist/lib/tsan/tests/unit/tsan_mutexset_test.cc vendor/compiler-rt/dist/lib/tsan/tests/unit/tsan_platform_test.cc vendor/compiler-rt/dist/lib/tsan/tests/unit/tsan_shadow_test.cc vendor/compiler-rt/dist/lib/tsan/tests/unit/tsan_stack_test.cc vendor/compiler-rt/dist/lib/tsan/tests/unit/tsan_suppressions_test.cc vendor/compiler-rt/dist/lib/tsan/tests/unit/tsan_sync_test.cc vendor/compiler-rt/dist/lib/tsan/tests/unit/tsan_vector_test.cc vendor/compiler-rt/dist/lib/ubsan/ vendor/compiler-rt/dist/lib/ubsan/CMakeLists.txt vendor/compiler-rt/dist/lib/ubsan/Makefile.mk vendor/compiler-rt/dist/lib/ubsan/lit_tests/ vendor/compiler-rt/dist/lib/ubsan/lit_tests/CMakeLists.txt vendor/compiler-rt/dist/lib/ubsan/lit_tests/Float/ vendor/compiler-rt/dist/lib/ubsan/lit_tests/Float/cast-overflow.cpp vendor/compiler-rt/dist/lib/ubsan/lit_tests/Integer/ vendor/compiler-rt/dist/lib/ubsan/lit_tests/Integer/add-overflow.cpp vendor/compiler-rt/dist/lib/ubsan/lit_tests/Integer/div-overflow.cpp vendor/compiler-rt/dist/lib/ubsan/lit_tests/Integer/div-zero.cpp vendor/compiler-rt/dist/lib/ubsan/lit_tests/Integer/incdec-overflow.cpp vendor/compiler-rt/dist/lib/ubsan/lit_tests/Integer/mul-overflow.cpp vendor/compiler-rt/dist/lib/ubsan/lit_tests/Integer/negate-overflow.cpp vendor/compiler-rt/dist/lib/ubsan/lit_tests/Integer/no-recover.cpp vendor/compiler-rt/dist/lib/ubsan/lit_tests/Integer/shift.cpp vendor/compiler-rt/dist/lib/ubsan/lit_tests/Integer/sub-overflow.cpp vendor/compiler-rt/dist/lib/ubsan/lit_tests/Integer/uadd-overflow.cpp vendor/compiler-rt/dist/lib/ubsan/lit_tests/Integer/uincdec-overflow.cpp vendor/compiler-rt/dist/lib/ubsan/lit_tests/Integer/umul-overflow.cpp vendor/compiler-rt/dist/lib/ubsan/lit_tests/Integer/usub-overflow.cpp vendor/compiler-rt/dist/lib/ubsan/lit_tests/Misc/ vendor/compiler-rt/dist/lib/ubsan/lit_tests/Misc/bool.cpp vendor/compiler-rt/dist/lib/ubsan/lit_tests/Misc/deduplication.cpp vendor/compiler-rt/dist/lib/ubsan/lit_tests/Misc/enum.cpp vendor/compiler-rt/dist/lib/ubsan/lit_tests/Misc/missing_return.cpp vendor/compiler-rt/dist/lib/ubsan/lit_tests/Misc/unreachable.cpp vendor/compiler-rt/dist/lib/ubsan/lit_tests/Misc/vla.c vendor/compiler-rt/dist/lib/ubsan/lit_tests/TypeCheck/ vendor/compiler-rt/dist/lib/ubsan/lit_tests/TypeCheck/misaligned.cpp vendor/compiler-rt/dist/lib/ubsan/lit_tests/TypeCheck/null.cpp vendor/compiler-rt/dist/lib/ubsan/lit_tests/TypeCheck/vptr.cpp vendor/compiler-rt/dist/lib/ubsan/lit_tests/lit.cfg vendor/compiler-rt/dist/lib/ubsan/lit_tests/lit.site.cfg.in vendor/compiler-rt/dist/lib/ubsan/ubsan_diag.cc vendor/compiler-rt/dist/lib/ubsan/ubsan_diag.h vendor/compiler-rt/dist/lib/ubsan/ubsan_handlers.cc vendor/compiler-rt/dist/lib/ubsan/ubsan_handlers.h vendor/compiler-rt/dist/lib/ubsan/ubsan_handlers_cxx.cc vendor/compiler-rt/dist/lib/ubsan/ubsan_handlers_cxx.h vendor/compiler-rt/dist/lib/ubsan/ubsan_type_hash.cc vendor/compiler-rt/dist/lib/ubsan/ubsan_type_hash.h vendor/compiler-rt/dist/lib/ubsan/ubsan_value.cc vendor/compiler-rt/dist/lib/ubsan/ubsan_value.h vendor/compiler-rt/dist/make/platform/clang_linux_test_input.c Deleted: vendor/compiler-rt/dist/lib/asan/Makefile.old vendor/compiler-rt/dist/lib/asan/asan_interface.h vendor/compiler-rt/dist/lib/asan/asan_printf.cc vendor/compiler-rt/dist/lib/asan/output_tests/ vendor/compiler-rt/dist/lib/asan/tests/asan_break_optimization.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator64.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_interface_defs.h vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_allocator64_test.cc vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_allocator64_testlib.cc vendor/compiler-rt/dist/lib/tsan/output_tests/ vendor/compiler-rt/dist/lib/tsan/rtl/tsan_printf.cc vendor/compiler-rt/dist/lib/tsan/rtl_tests/ vendor/compiler-rt/dist/lib/tsan/unit_tests/ Modified: vendor/compiler-rt/dist/CMakeLists.txt vendor/compiler-rt/dist/LICENSE.TXT vendor/compiler-rt/dist/Makefile vendor/compiler-rt/dist/SDKs/darwin/usr/include/stdio.h vendor/compiler-rt/dist/SDKs/linux/usr/include/stdio.h vendor/compiler-rt/dist/lib/CMakeLists.txt vendor/compiler-rt/dist/lib/Makefile.mk vendor/compiler-rt/dist/lib/arm/Makefile.mk vendor/compiler-rt/dist/lib/arm/divsi3.S vendor/compiler-rt/dist/lib/arm/udivsi3.S vendor/compiler-rt/dist/lib/asan/CMakeLists.txt vendor/compiler-rt/dist/lib/asan/Makefile.mk vendor/compiler-rt/dist/lib/asan/README.txt vendor/compiler-rt/dist/lib/asan/asan_allocator.cc vendor/compiler-rt/dist/lib/asan/asan_allocator.h vendor/compiler-rt/dist/lib/asan/asan_flags.h vendor/compiler-rt/dist/lib/asan/asan_globals.cc vendor/compiler-rt/dist/lib/asan/asan_interceptors.cc vendor/compiler-rt/dist/lib/asan/asan_interceptors.h vendor/compiler-rt/dist/lib/asan/asan_internal.h vendor/compiler-rt/dist/lib/asan/asan_linux.cc vendor/compiler-rt/dist/lib/asan/asan_lock.h vendor/compiler-rt/dist/lib/asan/asan_mac.cc vendor/compiler-rt/dist/lib/asan/asan_mac.h vendor/compiler-rt/dist/lib/asan/asan_malloc_linux.cc vendor/compiler-rt/dist/lib/asan/asan_malloc_mac.cc vendor/compiler-rt/dist/lib/asan/asan_malloc_win.cc vendor/compiler-rt/dist/lib/asan/asan_mapping.h vendor/compiler-rt/dist/lib/asan/asan_new_delete.cc vendor/compiler-rt/dist/lib/asan/asan_poisoning.cc vendor/compiler-rt/dist/lib/asan/asan_posix.cc vendor/compiler-rt/dist/lib/asan/asan_rtl.cc vendor/compiler-rt/dist/lib/asan/asan_stack.cc vendor/compiler-rt/dist/lib/asan/asan_stack.h vendor/compiler-rt/dist/lib/asan/asan_stats.cc vendor/compiler-rt/dist/lib/asan/asan_stats.h vendor/compiler-rt/dist/lib/asan/asan_thread.cc vendor/compiler-rt/dist/lib/asan/asan_thread.h vendor/compiler-rt/dist/lib/asan/asan_thread_registry.cc vendor/compiler-rt/dist/lib/asan/asan_thread_registry.h vendor/compiler-rt/dist/lib/asan/asan_win.cc vendor/compiler-rt/dist/lib/asan/scripts/asan_symbolize.py vendor/compiler-rt/dist/lib/asan/tests/CMakeLists.txt vendor/compiler-rt/dist/lib/asan/tests/asan_benchmarks_test.cc vendor/compiler-rt/dist/lib/asan/tests/asan_globals_test.cc vendor/compiler-rt/dist/lib/asan/tests/asan_mac_test.mm vendor/compiler-rt/dist/lib/asan/tests/asan_noinst_test.cc vendor/compiler-rt/dist/lib/asan/tests/asan_test.cc vendor/compiler-rt/dist/lib/asan/tests/asan_test.ignore vendor/compiler-rt/dist/lib/asan/tests/asan_test_config.h vendor/compiler-rt/dist/lib/asan/tests/asan_test_utils.h vendor/compiler-rt/dist/lib/cmpdi2.c vendor/compiler-rt/dist/lib/fixsfdi.c vendor/compiler-rt/dist/lib/int_endianness.h vendor/compiler-rt/dist/lib/interception/CMakeLists.txt vendor/compiler-rt/dist/lib/interception/interception.h vendor/compiler-rt/dist/lib/interception/interception_linux.cc vendor/compiler-rt/dist/lib/interception/interception_linux.h vendor/compiler-rt/dist/lib/interception/interception_mac.cc vendor/compiler-rt/dist/lib/interception/interception_mac.h vendor/compiler-rt/dist/lib/interception/interception_win.cc vendor/compiler-rt/dist/lib/interception/interception_win.h vendor/compiler-rt/dist/lib/interception/mach_override/mach_override.c vendor/compiler-rt/dist/lib/profile/GCDAProfiling.c vendor/compiler-rt/dist/lib/sanitizer_common/CMakeLists.txt vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_atomic_clang.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_atomic_msvc.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_flags.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_internal_defs.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_libc.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_libc.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_linux.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_list.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_mac.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_mutex.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_placement_new.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_posix.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_printf.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_procmaps.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_symbolizer.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_symbolizer.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_win.cc vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_allocator_test.cc vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_common_test.cc vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_flags_test.cc vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_list_test.cc vendor/compiler-rt/dist/lib/tsan/CMakeLists.txt vendor/compiler-rt/dist/lib/tsan/Makefile.old vendor/compiler-rt/dist/lib/tsan/go/buildgo.sh vendor/compiler-rt/dist/lib/tsan/go/test.c vendor/compiler-rt/dist/lib/tsan/go/tsan_go.cc vendor/compiler-rt/dist/lib/tsan/rtl/Makefile.mk vendor/compiler-rt/dist/lib/tsan/rtl/Makefile.old vendor/compiler-rt/dist/lib/tsan/rtl/tsan_clock.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_clock.h vendor/compiler-rt/dist/lib/tsan/rtl/tsan_defs.h vendor/compiler-rt/dist/lib/tsan/rtl/tsan_flags.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_flags.h vendor/compiler-rt/dist/lib/tsan/rtl/tsan_interceptors.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_interface.h vendor/compiler-rt/dist/lib/tsan/rtl/tsan_interface_ann.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_interface_ann.h vendor/compiler-rt/dist/lib/tsan/rtl/tsan_interface_atomic.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_interface_atomic.h vendor/compiler-rt/dist/lib/tsan/rtl/tsan_interface_inl.h vendor/compiler-rt/dist/lib/tsan/rtl/tsan_mman.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_mman.h vendor/compiler-rt/dist/lib/tsan/rtl/tsan_mutex.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_mutex.h vendor/compiler-rt/dist/lib/tsan/rtl/tsan_platform.h vendor/compiler-rt/dist/lib/tsan/rtl/tsan_platform_linux.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_platform_mac.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_report.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_report.h vendor/compiler-rt/dist/lib/tsan/rtl/tsan_rtl.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_rtl.h vendor/compiler-rt/dist/lib/tsan/rtl/tsan_rtl_amd64.S vendor/compiler-rt/dist/lib/tsan/rtl/tsan_rtl_mutex.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_rtl_report.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_rtl_thread.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_stat.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_stat.h vendor/compiler-rt/dist/lib/tsan/rtl/tsan_suppressions.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_suppressions.h vendor/compiler-rt/dist/lib/tsan/rtl/tsan_symbolize.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_symbolize.h vendor/compiler-rt/dist/lib/tsan/rtl/tsan_symbolize_addr2line_linux.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_sync.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_sync.h vendor/compiler-rt/dist/lib/tsan/rtl/tsan_trace.h vendor/compiler-rt/dist/lib/tsan/rtl/tsan_update_shadow_word_inl.h vendor/compiler-rt/dist/lib/ucmpdi2.c vendor/compiler-rt/dist/make/AppleBI.mk vendor/compiler-rt/dist/make/config.mk vendor/compiler-rt/dist/make/lib_info.mk vendor/compiler-rt/dist/make/options.mk vendor/compiler-rt/dist/make/platform/clang_darwin.mk vendor/compiler-rt/dist/make/platform/clang_linux.mk vendor/compiler-rt/dist/make/platform/darwin_bni.mk vendor/compiler-rt/dist/test/Unit/endianness.h Added: vendor/compiler-rt/dist/.arcconfig ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/dist/.arcconfig Fri Jan 18 20:06:45 2013 (r245614) @@ -0,0 +1,4 @@ +{ + "project_id" : "compiler-rt", + "conduit_uri" : "http://llvm-reviews.chandlerc.com/" +} Modified: vendor/compiler-rt/dist/CMakeLists.txt ============================================================================== --- vendor/compiler-rt/dist/CMakeLists.txt Fri Jan 18 19:42:08 2013 (r245613) +++ vendor/compiler-rt/dist/CMakeLists.txt Fri Jan 18 20:06:45 2013 (r245614) @@ -15,49 +15,157 @@ include(LLVMParseArguments) # runtime libraries. cmake_minimum_required(VERSION 2.8.8) -# FIXME: Below we assume that the target build of LLVM/Clang is x86, which is -# not at all valid. Much of this can be fixed just by switching to use -# a just-built-clang binary for the compiles. +# Add path for custom modules +set(CMAKE_MODULE_PATH + ${CMAKE_MODULE_PATH} + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules" + ) +include(AddCompilerRT) + +set(COMPILER_RT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) # Detect whether the current target platform is 32-bit or 64-bit, and setup # the correct commandline flags needed to attempt to target 32-bit and 64-bit. -if(CMAKE_SIZEOF_VOID_P EQUAL 4) - set(TARGET_X86_64_CFLAGS "-m64") - set(TARGET_I386_CFLAGS "") +if(CMAKE_SIZEOF_VOID_P EQUAL 4 OR LLVM_BUILD_32_BITS) + set(TARGET_64_BIT_CFLAGS "-m64") + set(TARGET_32_BIT_CFLAGS "") else() if(NOT CMAKE_SIZEOF_VOID_P EQUAL 8) message(FATAL_ERROR "Please use a sane architecture with 4 or 8 byte pointers.") endif() - set(TARGET_X86_64_CFLAGS "") - set(TARGET_I386_CFLAGS "-m32") + set(TARGET_64_BIT_CFLAGS "") + set(TARGET_32_BIT_CFLAGS "-m32") endif() +# FIXME: Below we assume that the target build of LLVM/Clang is x86, which is +# not at all valid. Much of this can be fixed just by switching to use +# a just-built-clang binary for the compiles. + +set(TARGET_x86_64_CFLAGS ${TARGET_64_BIT_CFLAGS}) +set(TARGET_i386_CFLAGS ${TARGET_32_BIT_CFLAGS}) + +set(COMPILER_RT_SUPPORTED_ARCH + x86_64 i386) + +function(get_target_flags_for_arch arch out_var) + list(FIND COMPILER_RT_SUPPORTED_ARCH ${arch} ARCH_INDEX) + if(ARCH_INDEX EQUAL -1) + message(FATAL_ERROR "Unsupported architecture: ${arch}") + else() + set(${out_var} ${TARGET_${arch}_CFLAGS} PARENT_SCOPE) + endif() +endfunction() + # Try to compile a very simple source file to ensure we can target the given # platform. We use the results of these tests to build only the various target # runtime libraries supported by our current compilers cross-compiling # abilities. set(SIMPLE_SOURCE64 ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/simple64.c) file(WRITE ${SIMPLE_SOURCE64} "#include \nint main() {}") -try_compile(CAN_TARGET_X86_64 ${CMAKE_BINARY_DIR} ${SIMPLE_SOURCE64} - COMPILE_DEFINITIONS "${TARGET_X86_64_CFLAGS}" - CMAKE_FLAGS "-DCMAKE_EXE_LINKER_FLAGS:STRING=${TARGET_X86_64_CFLAGS}") +try_compile(CAN_TARGET_x86_64 ${CMAKE_BINARY_DIR} ${SIMPLE_SOURCE64} + COMPILE_DEFINITIONS "${TARGET_x86_64_CFLAGS}" + CMAKE_FLAGS "-DCMAKE_EXE_LINKER_FLAGS:STRING=${TARGET_x86_64_CFLAGS}") set(SIMPLE_SOURCE32 ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/simple32.c) file(WRITE ${SIMPLE_SOURCE32} "#include \nint main() {}") -try_compile(CAN_TARGET_I386 ${CMAKE_BINARY_DIR} ${SIMPLE_SOURCE32} - COMPILE_DEFINITIONS "${TARGET_I386_CFLAGS}" - CMAKE_FLAGS "-DCMAKE_EXE_LINKER_FLAGS:STRING=${TARGET_I386_CFLAGS}") - -# Because compiler-rt spends a lot of time setting up custom compile flags, -# define a handy helper function for it. The compile flags setting in CMake -# has serious issues that make its syntax challenging at best. -function(set_target_compile_flags target) - foreach(arg ${ARGN}) - set(argstring "${argstring} ${arg}") +try_compile(CAN_TARGET_i386 ${CMAKE_BINARY_DIR} ${SIMPLE_SOURCE32} + COMPILE_DEFINITIONS "${TARGET_i386_CFLAGS}" + CMAKE_FLAGS "-DCMAKE_EXE_LINKER_FLAGS:STRING=${TARGET_i386_CFLAGS}") + +# We only support running instrumented tests when we're not cross compiling +# and target a unix-like system. On Android we define the rules for building +# unit tests, but don't execute them. +if("${CMAKE_HOST_SYSTEM}" STREQUAL "${CMAKE_SYSTEM}" AND UNIX AND NOT ANDROID) + set(COMPILER_RT_CAN_EXECUTE_TESTS TRUE) +else() + set(COMPILER_RT_CAN_EXECUTE_TESTS FALSE) +endif() + +function(filter_available_targets out_var) + set(archs) + foreach(arch ${ARGN}) + list(FIND COMPILER_RT_SUPPORTED_ARCH ${arch} ARCH_INDEX) + if(NOT (ARCH_INDEX EQUAL -1) AND CAN_TARGET_${arch}) + list(APPEND archs ${arch}) + endif() endforeach() - set_property(TARGET ${target} PROPERTY COMPILE_FLAGS "${argstring}") + set(${out_var} ${archs} PARENT_SCOPE) endfunction() +# Provide some common commmandline flags for Sanitizer runtimes. +set(SANITIZER_COMMON_CFLAGS + -fPIC + -fno-builtin + -fno-exceptions + -fomit-frame-pointer + -funwind-tables + -O3 + ) +if(NOT WIN32) + list(APPEND SANITIZER_COMMON_CFLAGS -fvisibility=hidden) +endif() +# Build sanitizer runtimes with debug info. +check_cxx_compiler_flag(-gline-tables-only SUPPORTS_GLINE_TABLES_ONLY_FLAG) +if(SUPPORTS_GLINE_TABLES_ONLY_FLAG) + list(APPEND SANITIZER_COMMON_CFLAGS -gline-tables-only) +else() + list(APPEND SANITIZER_COMMON_CFLAGS -g) +endif() +# Warnings suppressions. +check_cxx_compiler_flag(-Wno-variadic-macros SUPPORTS_NO_VARIADIC_MACROS_FLAG) +if(SUPPORTS_NO_VARIADIC_MACROS_FLAG) + list(APPEND SANITIZER_COMMON_CFLAGS -Wno-variadic-macros) +endif() +check_cxx_compiler_flag(-Wno-c99-extensions SUPPORTS_NO_C99_EXTENSIONS_FLAG) +if(SUPPORTS_NO_C99_EXTENSIONS_FLAG) + list(APPEND SANITIZER_COMMON_CFLAGS -Wno-c99-extensions) +endif() +if(APPLE) + list(APPEND SANITIZER_COMMON_CFLAGS -mmacosx-version-min=10.5) +endif() + +# Architectures supported by Sanitizer runtimes. Specific sanitizers may +# support only subset of these (e.g. TSan works on x86_64 only). +filter_available_targets(SANITIZER_COMMON_SUPPORTED_ARCH + x86_64 i386) + +# Compute the Clang version from the LLVM version. +# FIXME: We should be able to reuse CLANG_VERSION variable calculated +# in Clang cmake files, instead of copying the rules here. +string(REGEX MATCH "[0-9]+\\.[0-9]+(\\.[0-9]+)?" CLANG_VERSION + ${PACKAGE_VERSION}) +# Setup the paths where compiler-rt runtimes and headers should be stored. +set(LIBCLANG_INSTALL_PATH lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}) +string(TOLOWER ${CMAKE_SYSTEM_NAME} LIBCLANG_OS_DIR) + +# Install compiler-rt headers. +install(DIRECTORY include/ + DESTINATION ${LIBCLANG_INSTALL_PATH}/include + FILES_MATCHING + PATTERN "*.h" + PATTERN ".svn" EXCLUDE + ) + +# Call add_clang_compiler_rt_libraries to make sure that targets are built +# and installed in the directories where Clang driver expects to find them. +macro(add_clang_compiler_rt_libraries) + # Setup output directories so that clang in build tree works. + set_target_properties(${ARGN} PROPERTIES + ARCHIVE_OUTPUT_DIRECTORY + ${LLVM_BINARY_DIR}/lib/clang/${CLANG_VERSION}/lib/${LIBCLANG_OS_DIR} + LIBRARY_OUTPUT_DIRECTORY + ${LLVM_BINARY_DIR}/lib/clang/${CLANG_VERSION}/lib/${LIBCLANG_OS_DIR} + ) + # Add installation command. + install(TARGETS ${ARGN} + ARCHIVE DESTINATION ${LIBCLANG_INSTALL_PATH}/lib/${LIBCLANG_OS_DIR} + LIBRARY DESTINATION ${LIBCLANG_INSTALL_PATH}/lib/${LIBCLANG_OS_DIR} + ) +endmacro(add_clang_compiler_rt_libraries) + +# Add the public header's directory to the includes for all of compiler-rt. +include_directories(include) + add_subdirectory(lib) if(LLVM_INCLUDE_TESTS) Modified: vendor/compiler-rt/dist/LICENSE.TXT ============================================================================== --- vendor/compiler-rt/dist/LICENSE.TXT Fri Jan 18 19:42:08 2013 (r245613) +++ vendor/compiler-rt/dist/LICENSE.TXT Fri Jan 18 20:06:45 2013 (r245614) @@ -14,7 +14,7 @@ Full text of the relevant licenses is in University of Illinois/NCSA Open Source License -Copyright (c) 2009-2012 by the contributors listed in CREDITS.TXT +Copyright (c) 2009-2013 by the contributors listed in CREDITS.TXT All rights reserved. @@ -55,7 +55,7 @@ SOFTWARE. ============================================================================== -Copyright (c) 2009-2012 by the contributors listed in CREDITS.TXT +Copyright (c) 2009-2013 by the contributors listed in CREDITS.TXT Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal Modified: vendor/compiler-rt/dist/Makefile ============================================================================== --- vendor/compiler-rt/dist/Makefile Fri Jan 18 19:42:08 2013 (r245613) +++ vendor/compiler-rt/dist/Makefile Fri Jan 18 20:06:45 2013 (r245614) @@ -92,7 +92,7 @@ test: %/.dir: $(Summary) " MKDIR: $*" $(Verb) $(MKDIR) $* > /dev/null - $(Verb) $(DATE) > $@ + $(Verb) echo 'Created.' > $@ # Remove directories %/.remove: @@ -117,7 +117,7 @@ $(call Set,Tmp.Configs,$($(Tmp.Key).Conf $(call Set,Tmp.ObjPath,$(ProjObjRoot)/$(Tmp.Name)) # Top-Level Platform Target -$(Tmp.Name):: $(Tmp.Configs:%=$(Tmp.ObjPath)/%/libcompiler_rt.a) +$(Tmp.Name):: $(Tmp.Configs:%=$(Tmp.Name)-%) .PHONY: $(Tmp.Name) clean:: @@ -131,6 +131,15 @@ endef define PerPlatformConfig_template $(call Set,Tmp.Config,$(1)) $(call Set,Tmp.ObjPath,$(ProjObjRoot)/$(Tmp.Name)/$(Tmp.Config)) +$(call Set,Tmp.SHARED_LIBRARY,$(strip \ + $(call GetCNAVar,SHARED_LIBRARY,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) +$(call Set,Tmp.SHARED_LIBRARY_SUFFIX,$(strip \ + $(call GetCNAVar,SHARED_LIBRARY_SUFFIX,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) + +# Compute the library suffix. +$(if $(call streq,1,$(Tmp.SHARED_LIBRARY)), + $(call Set,Tmp.LibrarySuffix,$(Tmp.SHARED_LIBRARY_SUFFIX)), + $(call Set,Tmp.LibrarySuffix,a)) # Compute the archs to build, depending on whether this is a universal build or # not. @@ -142,8 +151,8 @@ $(call Set,Tmp.ArchsToBuild,\ $(call VarOrDefault,$(Tmp.Key).Arch.$(Tmp.Config),$($(Tmp.Key).Arch)))) # Copy or lipo to create the per-config library. -$(call Set,Tmp.Inputs,$(Tmp.ArchsToBuild:%=$(Tmp.ObjPath)/%/libcompiler_rt.a)) -$(Tmp.ObjPath)/libcompiler_rt.a: $(Tmp.Inputs) $(Tmp.ObjPath)/.dir +$(call Set,Tmp.Inputs,$(Tmp.ArchsToBuild:%=$(Tmp.ObjPath)/%/libcompiler_rt.$(Tmp.LibrarySuffix))) +$(Tmp.ObjPath)/libcompiler_rt.$(Tmp.LibrarySuffix): $(Tmp.Inputs) $(Tmp.ObjPath)/.dir $(Summary) " FINAL-ARCHIVE: $(Tmp.Name)/$(Tmp.Config): $$@" -$(Verb) $(RM) $$@ $(if $(call streq,1,$(words $(Tmp.ArchsToBuild))), \ @@ -152,7 +161,7 @@ $(Tmp.ObjPath)/libcompiler_rt.a: $(Tmp.I .PRECIOUS: $(Tmp.ObjPath)/.dir # Per-Config Targets -$(Tmp.Name)-$(Tmp.Config):: $(Tmp.ObjPath)/libcompiler_rt.a +$(Tmp.Name)-$(Tmp.Config):: $(Tmp.ObjPath)/libcompiler_rt.$(Tmp.LibrarySuffix) .PHONY: $(Tmp.Name)-$(Tmp.Config) # Per-Config-Arch Libraries @@ -172,10 +181,21 @@ $(call Set,Tmp.AR,$(strip \ $(call GetCNAVar,AR,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) $(call Set,Tmp.ARFLAGS,$(strip \ $(call GetCNAVar,ARFLAGS,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) +$(call Set,Tmp.CC,$(strip \ + $(call GetCNAVar,CC,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) +$(call Set,Tmp.LDFLAGS,$(strip \ + $(call GetCNAVar,LDFLAGS,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) $(call Set,Tmp.RANLIB,$(strip \ $(call GetCNAVar,RANLIB,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) $(call Set,Tmp.RANLIBFLAGS,$(strip \ $(call GetCNAVar,RANLIBFLAGS,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) +$(call Set,Tmp.SHARED_LIBRARY,$(strip \ + $(call GetCNAVar,SHARED_LIBRARY,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) + +# Compute the library suffix. +$(if $(call streq,1,$(Tmp.SHARED_LIBRARY)), + $(call Set,Tmp.LibrarySuffix,$(Tmp.SHARED_LIBRARY_SUFFIX)), + $(call Set,Tmp.LibrarySuffix,a)) # Compute the object inputs for this library. $(call Set,Tmp.Inputs,\ @@ -188,10 +208,18 @@ $(Tmp.ObjPath)/libcompiler_rt.a: $(Tmp.I -$(Verb) $(RM) $$@ $(Verb) $(Tmp.AR) $(Tmp.ARFLAGS) $$@ $(Tmp.Inputs) $(Verb) $(Tmp.RANLIB) $(Tmp.RANLIBFLAGS) $$@ +$(Tmp.ObjPath)/libcompiler_rt.dylib: $(Tmp.Inputs) $(Tmp.ObjPath)/.dir + $(Summary) " DYLIB: $(Tmp.Name)/$(Tmp.Config)/$(Tmp.Arch): $$@" + $(Verb) $(Tmp.CC) -arch $(Tmp.Arch) -dynamiclib -o $$@ \ + $(Tmp.Inputs) $(Tmp.LDFLAGS) +$(Tmp.ObjPath)/libcompiler_rt.so: $(Tmp.Inputs) $(Tmp.ObjPath)/.dir + $(Summary) " SO: $(Tmp.Name)/$(Tmp.Config)/$(Tmp.Arch): $$@" + $(Verb) $(Tmp.CC) -shared -o $$@ \ + $(Tmp.Inputs) $(Tmp.LDFLAGS) .PRECIOUS: $(Tmp.ObjPath)/.dir # Per-Config-Arch Targets -$(Tmp.Name)-$(Tmp.Config)-$(Tmp.Arch):: $(Tmp.ObjPath)/libcompiler_rt.a +$(Tmp.Name)-$(Tmp.Config)-$(Tmp.Arch):: $(Tmp.ObjPath)/libcompiler_rt.$(Tmp.LibrarySuffix) .PHONY: $(Tmp.Name)-$(Tmp.Config)-$(Tmp.Arch) # Per-Config-Arch-SubDir Objects Modified: vendor/compiler-rt/dist/SDKs/darwin/usr/include/stdio.h ============================================================================== --- vendor/compiler-rt/dist/SDKs/darwin/usr/include/stdio.h Fri Jan 18 19:42:08 2013 (r245613) +++ vendor/compiler-rt/dist/SDKs/darwin/usr/include/stdio.h Fri Jan 18 20:06:45 2013 (r245614) @@ -17,6 +17,10 @@ #ifndef __STDIO_H__ #define __STDIO_H__ +#if defined(__cplusplus) +extern "C" { +#endif + typedef struct __sFILE FILE; typedef __SIZE_TYPE__ size_t; @@ -51,11 +55,30 @@ typedef __SIZE_TYPE__ size_t; # define stderr __stderrp extern FILE *__stderrp; +#ifndef SEEK_SET +#define SEEK_SET 0 /* set file offset to offset */ +#endif +#ifndef SEEK_CUR +#define SEEK_CUR 1 /* set file offset to current plus offset */ +#endif +#ifndef SEEK_END +#define SEEK_END 2 /* set file offset to EOF plus offset */ +#endif + int fclose(FILE *); int fflush(FILE *); -FILE *fopen(const char * restrict, const char * restrict) __asm(__FOPEN_NAME); -int fprintf(FILE * restrict, const char * restrict, ...); -size_t fwrite(const void * restrict, size_t, size_t, FILE * restrict) +FILE *fopen(const char * __restrict, const char * __restrict) __asm(__FOPEN_NAME); +int fprintf(FILE * __restrict, const char * __restrict, ...); +size_t fwrite(const void * __restrict, size_t, size_t, FILE * __restrict) __asm(__FWRITE_NAME); +size_t fread(void * __restrict, size_t, size_t, FILE * __restrict); +long ftell(FILE *); +int fseek(FILE *, long, int); + +int snprintf(char * __restrict, size_t, const char * __restrict, ...); + +#if defined(__cplusplus) +} +#endif #endif /* __STDIO_H__ */ Modified: vendor/compiler-rt/dist/SDKs/linux/usr/include/stdio.h ============================================================================== --- vendor/compiler-rt/dist/SDKs/linux/usr/include/stdio.h Fri Jan 18 19:42:08 2013 (r245613) +++ vendor/compiler-rt/dist/SDKs/linux/usr/include/stdio.h Fri Jan 18 20:06:45 2013 (r245614) @@ -26,10 +26,17 @@ extern struct _IO_FILE *stdin; extern struct _IO_FILE *stdout; extern struct _IO_FILE *stderr; +#define SEEK_SET 0 /* set file offset to offset */ +#define SEEK_CUR 1 /* set file offset to current plus offset */ +#define SEEK_END 2 /* set file offset to EOF plus offset */ + extern int fclose(FILE *); extern int fflush(FILE *); extern FILE *fopen(const char * restrict, const char * restrict); extern int fprintf(FILE * restrict, const char * restrict, ...); extern size_t fwrite(const void * restrict, size_t, size_t, FILE * restrict); +extern size_t fread(void * restrict, size_t, size_t, FILE * restrict); +extern long ftell(FILE *); +extern int fseek(FILE *, long, int); #endif /* __STDIO_H__ */ Added: vendor/compiler-rt/dist/cmake/Modules/AddCompilerRT.cmake ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/dist/cmake/Modules/AddCompilerRT.cmake Fri Jan 18 20:06:45 2013 (r245614) @@ -0,0 +1,49 @@ +include(AddLLVM) +include(LLVMParseArguments) +include(CompilerRTUtils) + +# Tries to add "object library" target for a given architecture +# with name "." if architecture can be targeted. +# add_compiler_rt_object_library( +# SOURCES +# CFLAGS ) +macro(add_compiler_rt_object_library name arch) + if(CAN_TARGET_${arch}) + parse_arguments(LIB "SOURCES;CFLAGS" "" ${ARGN}) + add_library(${name}.${arch} OBJECT ${LIB_SOURCES}) + set_target_compile_flags(${name}.${arch} + ${TARGET_${arch}_CFLAGS} ${LIB_CFLAGS}) + else() + message(FATAL_ERROR "Archtecture ${arch} can't be targeted") + endif() +endmacro() + +# Unittests support. +set(COMPILER_RT_GTEST_PATH ${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest) +set(COMPILER_RT_GTEST_SOURCE ${COMPILER_RT_GTEST_PATH}/gtest-all.cc) +set(COMPILER_RT_GTEST_INCLUDE_CFLAGS + -DGTEST_NO_LLVM_RAW_OSTREAM=1 + -I${COMPILER_RT_GTEST_PATH}/include +) + +# Use Clang to link objects into a single executable with just-built +# Clang, using specific link flags. Make executable a part of provided +# test_suite. +# add_compiler_rt_test( +# OBJECTS +# DEPS +# LINK_FLAGS ) +macro(add_compiler_rt_test test_suite test_name) + parse_arguments(TEST "OBJECTS;DEPS;LINK_FLAGS" "" ${ARGN}) + get_unittest_directory(OUTPUT_DIR) + file(MAKE_DIRECTORY ${OUTPUT_DIR}) + set(output_bin "${OUTPUT_DIR}/${test_name}") + add_custom_command( + OUTPUT ${output_bin} + COMMAND clang ${TEST_OBJECTS} -o "${output_bin}" + ${TEST_LINK_FLAGS} + DEPENDS clang ${TEST_DEPS}) + add_custom_target(${test_name} DEPENDS ${output_bin}) + # Make the test suite depend on the binary. + add_dependencies(${test_suite} ${test_name}) +endmacro() Added: vendor/compiler-rt/dist/cmake/Modules/CompilerRTCompile.cmake ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/dist/cmake/Modules/CompilerRTCompile.cmake Fri Jan 18 20:06:45 2013 (r245614) @@ -0,0 +1,16 @@ +include(LLVMParseArguments) + +# Compile a source into an object file with just-built Clang using +# a provided compile flags and dependenices. +# clang_compile( +# CFLAGS +# DEPS ) +macro(clang_compile object_file source) + parse_arguments(SOURCE "CFLAGS;DEPS" "" ${ARGN}) + get_filename_component(source_rpath ${source} REALPATH) + add_custom_command( + OUTPUT ${object_file} + COMMAND clang ${SOURCE_CFLAGS} -c -o "${object_file}" ${source_rpath} + MAIN_DEPENDENCY ${source} + DEPENDS clang ${SOURCE_DEPS}) +endmacro() Added: vendor/compiler-rt/dist/cmake/Modules/CompilerRTLink.cmake ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/dist/cmake/Modules/CompilerRTLink.cmake Fri Jan 18 20:06:45 2013 (r245614) @@ -0,0 +1,14 @@ +include(LLVMParseArguments) + +# Link a shared library with just-built Clang. +# clang_link_shared( +# OBJECTS +# LINKFLAGS +# DEPS ) +macro(clang_link_shared so_file) + parse_arguments(SOURCE "OBJECTS;LINKFLAGS;DEPS" "" ${ARGN}) + add_custom_command( + OUTPUT ${so_file} + COMMAND clang -o "${so_file}" -shared ${SOURCE_LINKFLAGS} ${SOURCE_OBJECTS} + DEPENDS clang ${SOURCE_DEPS}) +endmacro() Added: vendor/compiler-rt/dist/cmake/Modules/CompilerRTUtils.cmake ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/dist/cmake/Modules/CompilerRTUtils.cmake Fri Jan 18 20:06:45 2013 (r245614) @@ -0,0 +1,17 @@ +# Because compiler-rt spends a lot of time setting up custom compile flags, +# define a handy helper function for it. The compile flags setting in CMake +# has serious issues that make its syntax challenging at best. +function(set_target_compile_flags target) + foreach(arg ${ARGN}) + set(argstring "${argstring} ${arg}") + endforeach() + set_property(TARGET ${target} PROPERTY COMPILE_FLAGS "${argstring}") +endfunction() + +function(set_target_link_flags target) + foreach(arg ${ARGN}) + set(argstring "${argstring} ${arg}") + endforeach() + set_property(TARGET ${target} PROPERTY LINK_FLAGS "${argstring}") +endfunction() + Added: vendor/compiler-rt/dist/include/sanitizer/asan_interface.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/dist/include/sanitizer/asan_interface.h Fri Jan 18 20:06:45 2013 (r245614) @@ -0,0 +1,212 @@ +//===-- sanitizer/asan_interface.h ------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file is a part of AddressSanitizer, an address sanity checker. +// +// This header can be included by the instrumented program to fetch +// data (mostly allocator statistics) from ASan runtime library. +//===----------------------------------------------------------------------===// +#ifndef SANITIZER_ASAN_INTERFACE_H +#define SANITIZER_ASAN_INTERFACE_H + +#include + +// ----------- ATTENTION ------------- +// This header should NOT include any other headers from ASan runtime. +// All functions in this header are extern "C" and start with __asan_. + +using __sanitizer::uptr; + +extern "C" { + // This function should be called at the very beginning of the process, + // before any instrumented code is executed and before any call to malloc. + void __asan_init() SANITIZER_INTERFACE_ATTRIBUTE; + + // This structure describes an instrumented global variable. + struct __asan_global { + uptr beg; // The address of the global. + uptr size; // The original size of the global. + uptr size_with_redzone; // The size with the redzone. + const char *name; // Name as a C string. + uptr has_dynamic_init; // Non-zero if the global has dynamic initializer. + }; + + // These two functions should be called by the instrumented code. + // 'globals' is an array of structures describing 'n' globals. + void __asan_register_globals(__asan_global *globals, uptr n) + SANITIZER_INTERFACE_ATTRIBUTE; + void __asan_unregister_globals(__asan_global *globals, uptr n) + SANITIZER_INTERFACE_ATTRIBUTE; + + // These two functions should be called before and after dynamic initializers + // run, respectively. They should be called with parameters describing all + // dynamically initialized globals defined in the calling TU. + void __asan_before_dynamic_init(uptr first_addr, uptr last_addr) + SANITIZER_INTERFACE_ATTRIBUTE; + void __asan_after_dynamic_init() + SANITIZER_INTERFACE_ATTRIBUTE; + + // These two functions are used by the instrumented code in the + // use-after-return mode. __asan_stack_malloc allocates size bytes of + // fake stack and __asan_stack_free poisons it. real_stack is a pointer to + // the real stack region. + uptr __asan_stack_malloc(uptr size, uptr real_stack) + SANITIZER_INTERFACE_ATTRIBUTE; + void __asan_stack_free(uptr ptr, uptr size, uptr real_stack) + SANITIZER_INTERFACE_ATTRIBUTE; + + // These two functions are used by instrumented code in the + // use-after-scope mode. They mark memory for local variables as + // unaddressable when they leave scope and addressable before the + // function exits. + void __asan_poison_stack_memory(uptr addr, uptr size) + SANITIZER_INTERFACE_ATTRIBUTE; + void __asan_unpoison_stack_memory(uptr addr, uptr size) + SANITIZER_INTERFACE_ATTRIBUTE; + + // Marks memory region [addr, addr+size) as unaddressable. + // This memory must be previously allocated by the user program. Accessing + // addresses in this region from instrumented code is forbidden until + // this region is unpoisoned. This function is not guaranteed to poison + // the whole region - it may poison only subregion of [addr, addr+size) due + // to ASan alignment restrictions. + // Method is NOT thread-safe in the sense that no two threads can + // (un)poison memory in the same memory region simultaneously. + void __asan_poison_memory_region(void const volatile *addr, uptr size) + SANITIZER_INTERFACE_ATTRIBUTE; + // Marks memory region [addr, addr+size) as addressable. + // This memory must be previously allocated by the user program. Accessing + // addresses in this region is allowed until this region is poisoned again. + // This function may unpoison a superregion of [addr, addr+size) due to + // ASan alignment restrictions. + // Method is NOT thread-safe in the sense that no two threads can + // (un)poison memory in the same memory region simultaneously. + void __asan_unpoison_memory_region(void const volatile *addr, uptr size) + SANITIZER_INTERFACE_ATTRIBUTE; + + // Performs cleanup before a NoReturn function. Must be called before things + // like _exit and execl to avoid false positives on stack. + void __asan_handle_no_return() SANITIZER_INTERFACE_ATTRIBUTE; + +// User code should use macro instead of functions. +#if __has_feature(address_sanitizer) +#define ASAN_POISON_MEMORY_REGION(addr, size) \ + __asan_poison_memory_region((addr), (size)) +#define ASAN_UNPOISON_MEMORY_REGION(addr, size) \ + __asan_unpoison_memory_region((addr), (size)) +#else +#define ASAN_POISON_MEMORY_REGION(addr, size) \ + ((void)(addr), (void)(size)) +#define ASAN_UNPOISON_MEMORY_REGION(addr, size) \ + ((void)(addr), (void)(size)) +#endif + + // Returns true iff addr is poisoned (i.e. 1-byte read/write access to this + // address will result in error report from AddressSanitizer). + bool __asan_address_is_poisoned(void const volatile *addr) + SANITIZER_INTERFACE_ATTRIBUTE; + + // If at least on byte in [beg, beg+size) is poisoned, return the address + // of the first such byte. Otherwise return 0. + uptr __asan_region_is_poisoned(uptr beg, uptr size) + SANITIZER_INTERFACE_ATTRIBUTE; + + // Print the description of addr (useful when debugging in gdb). + void __asan_describe_address(uptr addr) + SANITIZER_INTERFACE_ATTRIBUTE; + + // This is an internal function that is called to report an error. + // However it is still a part of the interface because users may want to + // set a breakpoint on this function in a debugger. + void __asan_report_error(uptr pc, uptr bp, uptr sp, + uptr addr, bool is_write, uptr access_size) + SANITIZER_INTERFACE_ATTRIBUTE; + + // Sets the exit code to use when reporting an error. + // Returns the old value. + int __asan_set_error_exit_code(int exit_code) + SANITIZER_INTERFACE_ATTRIBUTE; + + // Sets the callback to be called right before death on error. + // Passing 0 will unset the callback. + void __asan_set_death_callback(void (*callback)(void)) + SANITIZER_INTERFACE_ATTRIBUTE; + + void __asan_set_error_report_callback(void (*callback)(const char*)) + SANITIZER_INTERFACE_ATTRIBUTE; + + // User may provide function that would be called right when ASan detects + // an error. This can be used to notice cases when ASan detects an error, but + // the program crashes before ASan report is printed. + /* OPTIONAL */ void __asan_on_error() + SANITIZER_WEAK_ATTRIBUTE SANITIZER_INTERFACE_ATTRIBUTE; + + // User may provide its own implementation for symbolization function. + // It should print the description of instruction at address "pc" to + // "out_buffer". Description should be at most "out_size" bytes long. + // User-specified function should return true if symbolization was + // successful. + /* OPTIONAL */ bool __asan_symbolize(const void *pc, char *out_buffer, + int out_size) + SANITIZER_WEAK_ATTRIBUTE SANITIZER_INTERFACE_ATTRIBUTE; + + // Returns the estimated number of bytes that will be reserved by allocator + // for request of "size" bytes. If ASan allocator can't allocate that much + // memory, returns the maximal possible allocation size, otherwise returns + // "size". + uptr __asan_get_estimated_allocated_size(uptr size) + SANITIZER_INTERFACE_ATTRIBUTE; + // Returns true if p was returned by the ASan allocator and + // is not yet freed. + bool __asan_get_ownership(const void *p) + SANITIZER_INTERFACE_ATTRIBUTE; + // Returns the number of bytes reserved for the pointer p. + // Requires (get_ownership(p) == true) or (p == 0). + uptr __asan_get_allocated_size(const void *p) + SANITIZER_INTERFACE_ATTRIBUTE; + // Number of bytes, allocated and not yet freed by the application. + uptr __asan_get_current_allocated_bytes() + SANITIZER_INTERFACE_ATTRIBUTE; + // Number of bytes, mmaped by asan allocator to fulfill allocation requests. + // Generally, for request of X bytes, allocator can reserve and add to free + // lists a large number of chunks of size X to use them for future requests. + // All these chunks count toward the heap size. Currently, allocator never + // releases memory to OS (instead, it just puts freed chunks to free lists). + uptr __asan_get_heap_size() + SANITIZER_INTERFACE_ATTRIBUTE; + // Number of bytes, mmaped by asan allocator, which can be used to fulfill + // allocation requests. When a user program frees memory chunk, it can first + // fall into quarantine and will count toward __asan_get_free_bytes() later. + uptr __asan_get_free_bytes() + SANITIZER_INTERFACE_ATTRIBUTE; + // Number of bytes in unmapped pages, that are released to OS. Currently, + // always returns 0. + uptr __asan_get_unmapped_bytes() + SANITIZER_INTERFACE_ATTRIBUTE; + // Prints accumulated stats to stderr. Used for debugging. + void __asan_print_accumulated_stats() + SANITIZER_INTERFACE_ATTRIBUTE; + + // This function may be optionally provided by user and should return + // a string containing ASan runtime options. See asan_flags.h for details. + /* OPTIONAL */ const char* __asan_default_options() + SANITIZER_WEAK_ATTRIBUTE SANITIZER_INTERFACE_ATTRIBUTE; + + // Malloc hooks that may be optionally provided by user. + // __asan_malloc_hook(ptr, size) is called immediately after + // allocation of "size" bytes, which returned "ptr". + // __asan_free_hook(ptr) is called immediately before + // deallocation of "ptr". + /* OPTIONAL */ void __asan_malloc_hook(void *ptr, uptr size) + SANITIZER_WEAK_ATTRIBUTE SANITIZER_INTERFACE_ATTRIBUTE; + /* OPTIONAL */ void __asan_free_hook(void *ptr) + SANITIZER_WEAK_ATTRIBUTE SANITIZER_INTERFACE_ATTRIBUTE; +} // extern "C" + +#endif // SANITIZER_ASAN_INTERFACE_H Added: vendor/compiler-rt/dist/include/sanitizer/common_interface_defs.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/dist/include/sanitizer/common_interface_defs.h Fri Jan 18 20:06:45 2013 (r245614) @@ -0,0 +1,92 @@ +//===-- sanitizer/common_interface_defs.h -----------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file is shared between AddressSanitizer and ThreadSanitizer. +// It contains basic macro and types. +// NOTE: This file may be included into user code. +//===----------------------------------------------------------------------===// + +#ifndef SANITIZER_COMMON_INTERFACE_DEFS_H +#define SANITIZER_COMMON_INTERFACE_DEFS_H + +// ----------- ATTENTION ------------- +// This header should NOT include any other headers to avoid portability issues. + +#if defined(_WIN32) +// FIXME find out what we need on Windows. __declspec(dllexport) ? +# define SANITIZER_INTERFACE_ATTRIBUTE +# define SANITIZER_WEAK_ATTRIBUTE +#elif defined(SANITIZER_GO) +# define SANITIZER_INTERFACE_ATTRIBUTE +# define SANITIZER_WEAK_ATTRIBUTE +#else +# define SANITIZER_INTERFACE_ATTRIBUTE __attribute__((visibility("default"))) +# define SANITIZER_WEAK_ATTRIBUTE __attribute__((weak)) +#endif + +#ifdef __linux__ +# define SANITIZER_SUPPORTS_WEAK_HOOKS 1 +#else +# define SANITIZER_SUPPORTS_WEAK_HOOKS 0 +#endif + +// __has_feature +#if !defined(__has_feature) +# define __has_feature(x) 0 +#endif + +// For portability reasons we do not include stddef.h, stdint.h or any other +// system header, but we do need some basic types that are not defined +// in a portable way by the language itself. +namespace __sanitizer { + +#if defined(_WIN64) +// 64-bit Windows uses LLP64 data model. +typedef unsigned long long uptr; // NOLINT +typedef signed long long sptr; // NOLINT +#else +typedef unsigned long uptr; // NOLINT +typedef signed long sptr; // NOLINT +#endif // defined(_WIN64) +#if defined(__x86_64__) +// Since x32 uses ILP32 data model in 64-bit hardware mode, we must use +// 64-bit pointer to unwind stack frame. +typedef unsigned long long uhwptr; // NOLINT +#else +typedef uptr uhwptr; // NOLINT +#endif +typedef unsigned char u8; +typedef unsigned short u16; // NOLINT +typedef unsigned int u32; +typedef unsigned long long u64; // NOLINT +typedef signed char s8; +typedef signed short s16; // NOLINT +typedef signed int s32; +typedef signed long long s64; // NOLINT + +} // namespace __sanitizer + +extern "C" { + // Tell the tools to write their reports to "path." instead of stderr. + void __sanitizer_set_report_path(const char *path) + SANITIZER_INTERFACE_ATTRIBUTE; + + // Tell the tools to write their reports to given file descriptor instead of + // stderr. + void __sanitizer_set_report_fd(int fd) + SANITIZER_INTERFACE_ATTRIBUTE; + + // Notify the tools that the sandbox is going to be turned on. The reserved + // parameter will be used in the future to hold a structure with functions + // that the tools may call to bypass the sandbox. + void __sanitizer_sandbox_on_notify(void *reserved) + SANITIZER_WEAK_ATTRIBUTE SANITIZER_INTERFACE_ATTRIBUTE; +} // extern "C" + +#endif // SANITIZER_COMMON_INTERFACE_DEFS_H Added: vendor/compiler-rt/dist/include/sanitizer/msan_interface.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/dist/include/sanitizer/msan_interface.h Fri Jan 18 20:06:45 2013 (r245614) @@ -0,0 +1,124 @@ +//===-- msan_interface.h --------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file is a part of MemorySanitizer. +// +// Public interface header. +//===----------------------------------------------------------------------===// +#ifndef MSAN_INTERFACE_H +#define MSAN_INTERFACE_H + +#include + +using __sanitizer::uptr; +using __sanitizer::sptr; +using __sanitizer::u32; + +#ifdef __cplusplus +extern "C" { +#endif + +// FIXME: document all interface functions. + +SANITIZER_INTERFACE_ATTRIBUTE +int __msan_get_track_origins(); + +SANITIZER_INTERFACE_ATTRIBUTE +void __msan_init(); + +// Print a warning and maybe return. +// This function can die based on flags()->exit_code. +SANITIZER_INTERFACE_ATTRIBUTE +void __msan_warning(); + +// Print a warning and die. +// Intrumentation inserts calls to this function when building in "fast" mode +// (i.e. -mllvm -msan-keep-going) +SANITIZER_INTERFACE_ATTRIBUTE __attribute__((noreturn)) +void __msan_warning_noreturn(); + +SANITIZER_INTERFACE_ATTRIBUTE +void __msan_unpoison(void *a, uptr size); +SANITIZER_INTERFACE_ATTRIBUTE +void __msan_clear_and_unpoison(void *a, uptr size); +SANITIZER_INTERFACE_ATTRIBUTE +void* __msan_memcpy(void *dst, const void *src, uptr size); +SANITIZER_INTERFACE_ATTRIBUTE +void* __msan_memset(void *s, int c, uptr n); +SANITIZER_INTERFACE_ATTRIBUTE +void* __msan_memmove(void* dest, const void* src, uptr n); +SANITIZER_INTERFACE_ATTRIBUTE +void __msan_copy_poison(void *dst, const void *src, uptr size); +SANITIZER_INTERFACE_ATTRIBUTE +void __msan_copy_origin(void *dst, const void *src, uptr size); +SANITIZER_INTERFACE_ATTRIBUTE +void __msan_move_poison(void *dst, const void *src, uptr size); +SANITIZER_INTERFACE_ATTRIBUTE +void __msan_poison(void *a, uptr size); +SANITIZER_INTERFACE_ATTRIBUTE +void __msan_poison_stack(void *a, uptr size); + +// Copy size bytes from src to dst and unpoison the result. +// Useful to implement unsafe loads. +SANITIZER_INTERFACE_ATTRIBUTE +void __msan_load_unpoisoned(void *src, uptr size, void *dst); + +// Returns the offset of the first (at least partially) poisoned byte, +// or -1 if the whole range is good. +SANITIZER_INTERFACE_ATTRIBUTE +sptr __msan_test_shadow(const void *x, uptr size); + +SANITIZER_INTERFACE_ATTRIBUTE +void __msan_set_origin(void *a, uptr size, u32 origin); +SANITIZER_INTERFACE_ATTRIBUTE +void __msan_set_alloca_origin(void *a, uptr size, const char *descr); +SANITIZER_INTERFACE_ATTRIBUTE +u32 __msan_get_origin(void *a); + +SANITIZER_INTERFACE_ATTRIBUTE +void __msan_clear_on_return(); + +// Default: -1 (don't exit on error). +SANITIZER_INTERFACE_ATTRIBUTE +void __msan_set_exit_code(int exit_code); + +SANITIZER_INTERFACE_ATTRIBUTE +int __msan_set_poison_in_malloc(int do_poison); + +// For testing. +SANITIZER_INTERFACE_ATTRIBUTE +void __msan_set_expect_umr(int expect_umr); +SANITIZER_INTERFACE_ATTRIBUTE +void __msan_break_optimization(void *x); +SANITIZER_INTERFACE_ATTRIBUTE +void __msan_print_shadow(const void *x, uptr size); +SANITIZER_INTERFACE_ATTRIBUTE +void __msan_print_param_shadow(); +SANITIZER_INTERFACE_ATTRIBUTE +int __msan_has_dynamic_component(); + +// Returns x such that %fs:x is the first byte of __msan_retval_tls. +SANITIZER_INTERFACE_ATTRIBUTE +int __msan_get_retval_tls_offset(); +SANITIZER_INTERFACE_ATTRIBUTE +int __msan_get_param_tls_offset(); + +// For testing. +SANITIZER_INTERFACE_ATTRIBUTE +u32 __msan_get_origin_tls(); +SANITIZER_INTERFACE_ATTRIBUTE +const char *__msan_get_origin_descr_if_stack(u32 id); +SANITIZER_INTERFACE_ATTRIBUTE +void __msan_partial_poison(void* data, void* shadow, uptr size); + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif Modified: vendor/compiler-rt/dist/lib/CMakeLists.txt ============================================================================== --- vendor/compiler-rt/dist/lib/CMakeLists.txt Fri Jan 18 19:42:08 2013 (r245613) +++ vendor/compiler-rt/dist/lib/CMakeLists.txt Fri Jan 18 20:06:45 2013 (r245614) @@ -1,34 +1,23 @@ -# Compute the Clang version from the LLVM version. -# FIXME: We should be able to reuse CLANG_VERSION variable calculated -# in Clang cmake files, instead of copying the rules here. -string(REGEX MATCH "[0-9]+\\.[0-9]+(\\.[0-9]+)?" CLANG_VERSION - ${PACKAGE_VERSION}) - -# Call add_clang_runtime_static_library() to make -# sure that static is built in the directory -# where Clang driver expects to find it. -if (APPLE) - set(CLANG_RUNTIME_LIB_DIR - ${LLVM_BINARY_DIR}/lib/clang/${CLANG_VERSION}/lib/darwin) -elseif (UNIX) - # Assume Linux. - set(CLANG_RUNTIME_LIB_DIR - ${LLVM_BINARY_DIR}/lib/clang/${CLANG_VERSION}/lib/linux) -endif() -function(add_clang_runtime_static_library target_name) - set_target_properties(${target_name} PROPERTIES - ARCHIVE_OUTPUT_DIRECTORY ${CLANG_RUNTIME_LIB_DIR}) -endfunction() - # First, add the subdirectories which contain feature-based runtime libraries # and several convenience helper libraries. -add_subdirectory(asan) -add_subdirectory(interception) -add_subdirectory(sanitizer_common) +if(CMAKE_SYSTEM_NAME MATCHES "Darwin|Linux") + # AddressSanitizer is supported on Linux and Mac OS X. + # Windows support is work in progress. + add_subdirectory(asan) + add_subdirectory(interception) + add_subdirectory(sanitizer_common) + if(NOT ANDROID) + add_subdirectory(ubsan) + endif() +endif() +if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux" AND NOT ANDROID) + # ThreadSanitizer and MemorySanitizer are supported on Linux only. + add_subdirectory(tsan) + add_subdirectory(msan) +endif() # FIXME: Add support for the profile library. - # The top-level lib directory contains a large amount of C code which provides # generic implementations of the core runtime library along with optimized # architecture-specific code in various subdirectories. @@ -163,7 +152,7 @@ set(GENERIC_SOURCES umodti3.c ) -if(CAN_TARGET_X86_64) +if(CAN_TARGET_x86_64) add_library(clang_rt.x86_64 STATIC x86_64/floatdidf.c x86_64/floatdisf.c @@ -173,9 +162,10 @@ if(CAN_TARGET_X86_64) x86_64/floatundixf.S ${GENERIC_SOURCES} ) - set_target_properties(clang_rt.x86_64 PROPERTIES COMPILE_FLAGS "-std=c99 ${TARGET_X86_64_CFLAGS}") + set_target_properties(clang_rt.x86_64 PROPERTIES COMPILE_FLAGS "-std=c99 ${TARGET_x86_64_CFLAGS}") + add_clang_compiler_rt_libraries(clang_rt.x86_64) endif() -if(CAN_TARGET_I386) +if(CAN_TARGET_i386) add_library(clang_rt.i386 STATIC i386/ashldi3.S i386/ashrdi3.S @@ -193,5 +183,6 @@ if(CAN_TARGET_I386) i386/umoddi3.S ${GENERIC_SOURCES} ) - set_target_properties(clang_rt.i386 PROPERTIES COMPILE_FLAGS "-std=c99 ${TARGET_I386_CFLAGS}") + set_target_properties(clang_rt.i386 PROPERTIES COMPILE_FLAGS "-std=c99 ${TARGET_i386_CFLAGS}") + add_clang_compiler_rt_libraries(clang_rt.i386) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@FreeBSD.ORG Fri Jan 18 20:08:23 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 866B6A08; Fri, 18 Jan 2013 20:08:23 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 756A633D; Fri, 18 Jan 2013 20:08:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0IK8NWK025113; Fri, 18 Jan 2013 20:08:23 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0IK8Lka025094; Fri, 18 Jan 2013 20:08:21 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201301182008.r0IK8Lka025094@svn.freebsd.org> From: Andrew Turner Date: Fri, 18 Jan 2013 20:08:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r245615 - in vendor/compiler-rt/compiler-rt-r172839: . SDKs/darwin/usr/include SDKs/linux/usr/include cmake/Modules include lib lib/arm lib/asan lib/asan/dynamic lib/asan/lit_tests lib/... 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.14 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, 18 Jan 2013 20:08:23 -0000 Author: andrew Date: Fri Jan 18 20:08:20 2013 New Revision: 245615 URL: http://svnweb.freebsd.org/changeset/base/245615 Log: Tag compiler-rt r172839 Added: vendor/compiler-rt/compiler-rt-r172839/ - copied from r245613, vendor/compiler-rt/dist/ vendor/compiler-rt/compiler-rt-r172839/.arcconfig - copied unchanged from r245614, vendor/compiler-rt/dist/.arcconfig vendor/compiler-rt/compiler-rt-r172839/cmake/Modules/AddCompilerRT.cmake - copied unchanged from r245614, vendor/compiler-rt/dist/cmake/Modules/AddCompilerRT.cmake vendor/compiler-rt/compiler-rt-r172839/cmake/Modules/CompilerRTCompile.cmake - copied unchanged from r245614, vendor/compiler-rt/dist/cmake/Modules/CompilerRTCompile.cmake vendor/compiler-rt/compiler-rt-r172839/cmake/Modules/CompilerRTLink.cmake - copied unchanged from r245614, vendor/compiler-rt/dist/cmake/Modules/CompilerRTLink.cmake vendor/compiler-rt/compiler-rt-r172839/cmake/Modules/CompilerRTUtils.cmake - copied unchanged from r245614, vendor/compiler-rt/dist/cmake/Modules/CompilerRTUtils.cmake vendor/compiler-rt/compiler-rt-r172839/include/ - copied from r245614, vendor/compiler-rt/dist/include/ vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_allocator2.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_allocator2.cc vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_fake_stack.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_fake_stack.cc vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_intercepted_functions.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_intercepted_functions.h vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_report.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_report.cc vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_report.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_report.h vendor/compiler-rt/compiler-rt-r172839/lib/asan/dynamic/ - copied from r245614, vendor/compiler-rt/dist/lib/asan/dynamic/ vendor/compiler-rt/compiler-rt-r172839/lib/asan/lit_tests/ - copied from r245614, vendor/compiler-rt/dist/lib/asan/lit_tests/ vendor/compiler-rt/compiler-rt-r172839/lib/asan/tests/asan_test_main.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/tests/asan_test_main.cc vendor/compiler-rt/compiler-rt-r172839/lib/lit.common.cfg - copied unchanged from r245614, vendor/compiler-rt/dist/lib/lit.common.cfg vendor/compiler-rt/compiler-rt-r172839/lib/lit.common.unit.cfg - copied unchanged from r245614, vendor/compiler-rt/dist/lib/lit.common.unit.cfg vendor/compiler-rt/compiler-rt-r172839/lib/msan/ - copied from r245614, vendor/compiler-rt/dist/lib/msan/ vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_allocator.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator.h vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_common_interceptors.inc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common_interceptors.inc vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_common_interceptors_scanf.inc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common_interceptors_scanf.inc vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_lfstack.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_lfstack.h vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_platform_interceptors.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_platform_interceptors.h vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_quarantine.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_quarantine.h vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_report_decorator.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_report_decorator.h vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_stackdepot.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_stackdepot.cc vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_stackdepot.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_stackdepot.h vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_stacktrace.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_stacktrace.cc vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_stacktrace.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_stacktrace.h vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_symbolizer_itanium.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_symbolizer_itanium.cc vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_symbolizer_linux.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_symbolizer_linux.cc vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_symbolizer_mac.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_symbolizer_mac.cc vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_symbolizer_win.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_symbolizer_win.cc vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/scripts/ - copied from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/scripts/ vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/tests/CMakeLists.txt - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/tests/CMakeLists.txt vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/tests/lit.cfg - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/tests/lit.cfg vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/tests/lit.site.cfg.in - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/tests/lit.site.cfg.in vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/tests/sanitizer_allocator_testlib.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_allocator_testlib.cc vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/tests/sanitizer_libc_test.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_libc_test.cc vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/tests/sanitizer_mutex_test.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_mutex_test.cc vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/tests/sanitizer_printf_test.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_printf_test.cc vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/tests/sanitizer_scanf_interceptor_test.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_scanf_interceptor_test.cc vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/tests/sanitizer_stackdepot_test.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_stackdepot_test.cc vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/tests/sanitizer_test_main.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_test_main.cc vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/tests/sanitizer_test_utils.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_test_utils.h vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/tests/standalone_malloc_test.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/tests/standalone_malloc_test.cc vendor/compiler-rt/compiler-rt-r172839/lib/tsan/check_cmake.sh - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/check_cmake.sh vendor/compiler-rt/compiler-rt-r172839/lib/tsan/lit_tests/ - copied from r245614, vendor/compiler-rt/dist/lib/tsan/lit_tests/ vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/CMakeLists.txt - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/CMakeLists.txt vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_fd.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_fd.cc vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_fd.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_fd.h vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_interface_java.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_interface_java.cc vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_interface_java.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_interface_java.h vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_mutexset.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_mutexset.cc vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_mutexset.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_mutexset.h vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_platform_windows.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_platform_windows.cc vendor/compiler-rt/compiler-rt-r172839/lib/tsan/tests/ - copied from r245614, vendor/compiler-rt/dist/lib/tsan/tests/ vendor/compiler-rt/compiler-rt-r172839/lib/ubsan/ - copied from r245614, vendor/compiler-rt/dist/lib/ubsan/ vendor/compiler-rt/compiler-rt-r172839/make/platform/clang_linux_test_input.c - copied unchanged from r245614, vendor/compiler-rt/dist/make/platform/clang_linux_test_input.c Replaced: vendor/compiler-rt/compiler-rt-r172839/CMakeLists.txt - copied unchanged from r245614, vendor/compiler-rt/dist/CMakeLists.txt vendor/compiler-rt/compiler-rt-r172839/LICENSE.TXT - copied unchanged from r245614, vendor/compiler-rt/dist/LICENSE.TXT vendor/compiler-rt/compiler-rt-r172839/Makefile - copied unchanged from r245614, vendor/compiler-rt/dist/Makefile vendor/compiler-rt/compiler-rt-r172839/SDKs/darwin/usr/include/stdio.h - copied unchanged from r245614, vendor/compiler-rt/dist/SDKs/darwin/usr/include/stdio.h vendor/compiler-rt/compiler-rt-r172839/SDKs/linux/usr/include/stdio.h - copied unchanged from r245614, vendor/compiler-rt/dist/SDKs/linux/usr/include/stdio.h vendor/compiler-rt/compiler-rt-r172839/lib/CMakeLists.txt - copied unchanged from r245614, vendor/compiler-rt/dist/lib/CMakeLists.txt vendor/compiler-rt/compiler-rt-r172839/lib/Makefile.mk - copied unchanged from r245614, vendor/compiler-rt/dist/lib/Makefile.mk vendor/compiler-rt/compiler-rt-r172839/lib/arm/Makefile.mk - copied unchanged from r245614, vendor/compiler-rt/dist/lib/arm/Makefile.mk vendor/compiler-rt/compiler-rt-r172839/lib/arm/divsi3.S - copied unchanged from r245614, vendor/compiler-rt/dist/lib/arm/divsi3.S vendor/compiler-rt/compiler-rt-r172839/lib/arm/udivsi3.S - copied unchanged from r245614, vendor/compiler-rt/dist/lib/arm/udivsi3.S vendor/compiler-rt/compiler-rt-r172839/lib/asan/CMakeLists.txt - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/CMakeLists.txt vendor/compiler-rt/compiler-rt-r172839/lib/asan/Makefile.mk - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/Makefile.mk vendor/compiler-rt/compiler-rt-r172839/lib/asan/README.txt - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/README.txt vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_allocator.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_allocator.cc vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_allocator.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_allocator.h vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_flags.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_flags.h vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_globals.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_globals.cc vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_interceptors.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_interceptors.cc vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_interceptors.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_interceptors.h vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_internal.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_internal.h vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_linux.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_linux.cc vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_lock.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_lock.h vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_mac.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_mac.cc vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_mac.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_mac.h vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_malloc_linux.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_malloc_linux.cc vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_malloc_mac.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_malloc_mac.cc vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_malloc_win.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_malloc_win.cc vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_mapping.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_mapping.h vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_new_delete.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_new_delete.cc vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_poisoning.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_poisoning.cc vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_posix.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_posix.cc vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_rtl.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_rtl.cc vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_stack.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_stack.cc vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_stack.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_stack.h vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_stats.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_stats.cc vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_stats.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_stats.h vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_thread.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_thread.cc vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_thread.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_thread.h vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_thread_registry.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_thread_registry.cc vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_thread_registry.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_thread_registry.h vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_win.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/asan_win.cc vendor/compiler-rt/compiler-rt-r172839/lib/asan/scripts/asan_symbolize.py - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/scripts/asan_symbolize.py vendor/compiler-rt/compiler-rt-r172839/lib/asan/tests/CMakeLists.txt - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/tests/CMakeLists.txt vendor/compiler-rt/compiler-rt-r172839/lib/asan/tests/asan_benchmarks_test.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/tests/asan_benchmarks_test.cc vendor/compiler-rt/compiler-rt-r172839/lib/asan/tests/asan_globals_test.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/tests/asan_globals_test.cc vendor/compiler-rt/compiler-rt-r172839/lib/asan/tests/asan_mac_test.mm - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/tests/asan_mac_test.mm vendor/compiler-rt/compiler-rt-r172839/lib/asan/tests/asan_noinst_test.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/tests/asan_noinst_test.cc vendor/compiler-rt/compiler-rt-r172839/lib/asan/tests/asan_test.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/tests/asan_test.cc vendor/compiler-rt/compiler-rt-r172839/lib/asan/tests/asan_test.ignore - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/tests/asan_test.ignore vendor/compiler-rt/compiler-rt-r172839/lib/asan/tests/asan_test_config.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/tests/asan_test_config.h vendor/compiler-rt/compiler-rt-r172839/lib/asan/tests/asan_test_utils.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/asan/tests/asan_test_utils.h vendor/compiler-rt/compiler-rt-r172839/lib/cmpdi2.c - copied unchanged from r245614, vendor/compiler-rt/dist/lib/cmpdi2.c vendor/compiler-rt/compiler-rt-r172839/lib/fixsfdi.c - copied unchanged from r245614, vendor/compiler-rt/dist/lib/fixsfdi.c vendor/compiler-rt/compiler-rt-r172839/lib/int_endianness.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/int_endianness.h vendor/compiler-rt/compiler-rt-r172839/lib/interception/CMakeLists.txt - copied unchanged from r245614, vendor/compiler-rt/dist/lib/interception/CMakeLists.txt vendor/compiler-rt/compiler-rt-r172839/lib/interception/interception.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/interception/interception.h vendor/compiler-rt/compiler-rt-r172839/lib/interception/interception_linux.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/interception/interception_linux.cc vendor/compiler-rt/compiler-rt-r172839/lib/interception/interception_linux.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/interception/interception_linux.h vendor/compiler-rt/compiler-rt-r172839/lib/interception/interception_mac.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/interception/interception_mac.cc vendor/compiler-rt/compiler-rt-r172839/lib/interception/interception_mac.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/interception/interception_mac.h vendor/compiler-rt/compiler-rt-r172839/lib/interception/interception_win.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/interception/interception_win.cc vendor/compiler-rt/compiler-rt-r172839/lib/interception/interception_win.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/interception/interception_win.h vendor/compiler-rt/compiler-rt-r172839/lib/interception/mach_override/mach_override.c - copied unchanged from r245614, vendor/compiler-rt/dist/lib/interception/mach_override/mach_override.c vendor/compiler-rt/compiler-rt-r172839/lib/profile/GCDAProfiling.c - copied unchanged from r245614, vendor/compiler-rt/dist/lib/profile/GCDAProfiling.c vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/CMakeLists.txt - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/CMakeLists.txt vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_allocator.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator.cc vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_atomic_clang.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_atomic_clang.h vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_atomic_msvc.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_atomic_msvc.h vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_common.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common.cc vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_common.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common.h vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_flags.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_flags.cc vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_internal_defs.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_internal_defs.h vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_libc.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_libc.cc vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_libc.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_libc.h vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_linux.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_linux.cc vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_list.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_list.h vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_mac.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_mac.cc vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_mutex.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_mutex.h vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_placement_new.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_placement_new.h vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_posix.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_posix.cc vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_printf.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_printf.cc vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_procmaps.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_procmaps.h vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_symbolizer.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_symbolizer.cc vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_symbolizer.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_symbolizer.h vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_win.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_win.cc vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/tests/sanitizer_allocator_test.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_allocator_test.cc vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/tests/sanitizer_common_test.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_common_test.cc vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/tests/sanitizer_flags_test.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_flags_test.cc vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/tests/sanitizer_list_test.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_list_test.cc vendor/compiler-rt/compiler-rt-r172839/lib/tsan/CMakeLists.txt - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/CMakeLists.txt vendor/compiler-rt/compiler-rt-r172839/lib/tsan/Makefile.old - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/Makefile.old vendor/compiler-rt/compiler-rt-r172839/lib/tsan/go/buildgo.sh - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/go/buildgo.sh vendor/compiler-rt/compiler-rt-r172839/lib/tsan/go/test.c - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/go/test.c vendor/compiler-rt/compiler-rt-r172839/lib/tsan/go/tsan_go.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/go/tsan_go.cc vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/Makefile.mk - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/Makefile.mk vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/Makefile.old - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/Makefile.old vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_clock.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_clock.cc vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_clock.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_clock.h vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_defs.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_defs.h vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_flags.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_flags.cc vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_flags.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_flags.h vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_interceptors.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_interceptors.cc vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_interface.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_interface.h vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_interface_ann.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_interface_ann.cc vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_interface_ann.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_interface_ann.h vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_interface_atomic.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_interface_atomic.cc vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_interface_atomic.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_interface_atomic.h vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_interface_inl.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_interface_inl.h vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_mman.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_mman.cc vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_mman.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_mman.h vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_mutex.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_mutex.cc vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_mutex.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_mutex.h vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_platform.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_platform.h vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_platform_linux.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_platform_linux.cc vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_platform_mac.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_platform_mac.cc vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_report.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_report.cc vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_report.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_report.h vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_rtl.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_rtl.cc vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_rtl.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_rtl.h vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_rtl_amd64.S - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_rtl_amd64.S vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_rtl_mutex.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_rtl_mutex.cc vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_rtl_report.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_rtl_report.cc vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_rtl_thread.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_rtl_thread.cc vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_stat.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_stat.cc vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_stat.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_stat.h vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_suppressions.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_suppressions.cc vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_suppressions.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_suppressions.h vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_symbolize.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_symbolize.cc vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_symbolize.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_symbolize.h vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_symbolize_addr2line_linux.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_symbolize_addr2line_linux.cc vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_sync.cc - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_sync.cc vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_sync.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_sync.h vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_trace.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_trace.h vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_update_shadow_word_inl.h - copied unchanged from r245614, vendor/compiler-rt/dist/lib/tsan/rtl/tsan_update_shadow_word_inl.h vendor/compiler-rt/compiler-rt-r172839/lib/ucmpdi2.c - copied unchanged from r245614, vendor/compiler-rt/dist/lib/ucmpdi2.c vendor/compiler-rt/compiler-rt-r172839/make/AppleBI.mk - copied unchanged from r245614, vendor/compiler-rt/dist/make/AppleBI.mk vendor/compiler-rt/compiler-rt-r172839/make/config.mk - copied unchanged from r245614, vendor/compiler-rt/dist/make/config.mk vendor/compiler-rt/compiler-rt-r172839/make/lib_info.mk - copied unchanged from r245614, vendor/compiler-rt/dist/make/lib_info.mk vendor/compiler-rt/compiler-rt-r172839/make/options.mk - copied unchanged from r245614, vendor/compiler-rt/dist/make/options.mk vendor/compiler-rt/compiler-rt-r172839/make/platform/clang_darwin.mk - copied unchanged from r245614, vendor/compiler-rt/dist/make/platform/clang_darwin.mk vendor/compiler-rt/compiler-rt-r172839/make/platform/clang_linux.mk - copied unchanged from r245614, vendor/compiler-rt/dist/make/platform/clang_linux.mk vendor/compiler-rt/compiler-rt-r172839/make/platform/darwin_bni.mk - copied unchanged from r245614, vendor/compiler-rt/dist/make/platform/darwin_bni.mk vendor/compiler-rt/compiler-rt-r172839/test/Unit/endianness.h - copied unchanged from r245614, vendor/compiler-rt/dist/test/Unit/endianness.h Deleted: vendor/compiler-rt/compiler-rt-r172839/lib/asan/Makefile.old vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_interface.h vendor/compiler-rt/compiler-rt-r172839/lib/asan/asan_printf.cc vendor/compiler-rt/compiler-rt-r172839/lib/asan/output_tests/ vendor/compiler-rt/compiler-rt-r172839/lib/asan/tests/asan_break_optimization.cc vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_allocator64.h vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/sanitizer_interface_defs.h vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/tests/sanitizer_allocator64_test.cc vendor/compiler-rt/compiler-rt-r172839/lib/sanitizer_common/tests/sanitizer_allocator64_testlib.cc vendor/compiler-rt/compiler-rt-r172839/lib/tsan/output_tests/ vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl/tsan_printf.cc vendor/compiler-rt/compiler-rt-r172839/lib/tsan/rtl_tests/ vendor/compiler-rt/compiler-rt-r172839/lib/tsan/unit_tests/ Copied: vendor/compiler-rt/compiler-rt-r172839/.arcconfig (from r245614, vendor/compiler-rt/dist/.arcconfig) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/compiler-rt-r172839/.arcconfig Fri Jan 18 20:08:20 2013 (r245615, copy of r245614, vendor/compiler-rt/dist/.arcconfig) @@ -0,0 +1,4 @@ +{ + "project_id" : "compiler-rt", + "conduit_uri" : "http://llvm-reviews.chandlerc.com/" +} Copied: vendor/compiler-rt/compiler-rt-r172839/CMakeLists.txt (from r245614, vendor/compiler-rt/dist/CMakeLists.txt) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/compiler-rt-r172839/CMakeLists.txt Fri Jan 18 20:08:20 2013 (r245615, copy of r245614, vendor/compiler-rt/dist/CMakeLists.txt) @@ -0,0 +1,176 @@ +# CMake build for CompilerRT. +# +# This build assumes that CompilerRT is checked out into the +# 'projects/compiler-rt' inside of an LLVM tree, it is not a stand-alone build +# system. +# +# An important constraint of the build is that it only produces libraries +# based on the ability of the host toolchain to target various platforms. + +include(LLVMParseArguments) + +# The CompilerRT build system requires CMake version 2.8.8 or higher in order +# to use its support for building convenience "libraries" as a collection of +# .o files. This is particularly useful in producing larger, more complex +# runtime libraries. +cmake_minimum_required(VERSION 2.8.8) + +# Add path for custom modules +set(CMAKE_MODULE_PATH + ${CMAKE_MODULE_PATH} + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules" + ) +include(AddCompilerRT) + +set(COMPILER_RT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) + +# Detect whether the current target platform is 32-bit or 64-bit, and setup +# the correct commandline flags needed to attempt to target 32-bit and 64-bit. +if(CMAKE_SIZEOF_VOID_P EQUAL 4 OR LLVM_BUILD_32_BITS) + set(TARGET_64_BIT_CFLAGS "-m64") + set(TARGET_32_BIT_CFLAGS "") +else() + if(NOT CMAKE_SIZEOF_VOID_P EQUAL 8) + message(FATAL_ERROR "Please use a sane architecture with 4 or 8 byte pointers.") + endif() + set(TARGET_64_BIT_CFLAGS "") + set(TARGET_32_BIT_CFLAGS "-m32") +endif() + +# FIXME: Below we assume that the target build of LLVM/Clang is x86, which is +# not at all valid. Much of this can be fixed just by switching to use +# a just-built-clang binary for the compiles. + +set(TARGET_x86_64_CFLAGS ${TARGET_64_BIT_CFLAGS}) +set(TARGET_i386_CFLAGS ${TARGET_32_BIT_CFLAGS}) + +set(COMPILER_RT_SUPPORTED_ARCH + x86_64 i386) + +function(get_target_flags_for_arch arch out_var) + list(FIND COMPILER_RT_SUPPORTED_ARCH ${arch} ARCH_INDEX) + if(ARCH_INDEX EQUAL -1) + message(FATAL_ERROR "Unsupported architecture: ${arch}") + else() + set(${out_var} ${TARGET_${arch}_CFLAGS} PARENT_SCOPE) + endif() +endfunction() + +# Try to compile a very simple source file to ensure we can target the given +# platform. We use the results of these tests to build only the various target +# runtime libraries supported by our current compilers cross-compiling +# abilities. +set(SIMPLE_SOURCE64 ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/simple64.c) +file(WRITE ${SIMPLE_SOURCE64} "#include \nint main() {}") +try_compile(CAN_TARGET_x86_64 ${CMAKE_BINARY_DIR} ${SIMPLE_SOURCE64} + COMPILE_DEFINITIONS "${TARGET_x86_64_CFLAGS}" + CMAKE_FLAGS "-DCMAKE_EXE_LINKER_FLAGS:STRING=${TARGET_x86_64_CFLAGS}") + +set(SIMPLE_SOURCE32 ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/simple32.c) +file(WRITE ${SIMPLE_SOURCE32} "#include \nint main() {}") +try_compile(CAN_TARGET_i386 ${CMAKE_BINARY_DIR} ${SIMPLE_SOURCE32} + COMPILE_DEFINITIONS "${TARGET_i386_CFLAGS}" + CMAKE_FLAGS "-DCMAKE_EXE_LINKER_FLAGS:STRING=${TARGET_i386_CFLAGS}") + +# We only support running instrumented tests when we're not cross compiling +# and target a unix-like system. On Android we define the rules for building +# unit tests, but don't execute them. +if("${CMAKE_HOST_SYSTEM}" STREQUAL "${CMAKE_SYSTEM}" AND UNIX AND NOT ANDROID) + set(COMPILER_RT_CAN_EXECUTE_TESTS TRUE) +else() + set(COMPILER_RT_CAN_EXECUTE_TESTS FALSE) +endif() + +function(filter_available_targets out_var) + set(archs) + foreach(arch ${ARGN}) + list(FIND COMPILER_RT_SUPPORTED_ARCH ${arch} ARCH_INDEX) + if(NOT (ARCH_INDEX EQUAL -1) AND CAN_TARGET_${arch}) + list(APPEND archs ${arch}) + endif() + endforeach() + set(${out_var} ${archs} PARENT_SCOPE) +endfunction() + +# Provide some common commmandline flags for Sanitizer runtimes. +set(SANITIZER_COMMON_CFLAGS + -fPIC + -fno-builtin + -fno-exceptions + -fomit-frame-pointer + -funwind-tables + -O3 + ) +if(NOT WIN32) + list(APPEND SANITIZER_COMMON_CFLAGS -fvisibility=hidden) +endif() +# Build sanitizer runtimes with debug info. +check_cxx_compiler_flag(-gline-tables-only SUPPORTS_GLINE_TABLES_ONLY_FLAG) +if(SUPPORTS_GLINE_TABLES_ONLY_FLAG) + list(APPEND SANITIZER_COMMON_CFLAGS -gline-tables-only) +else() + list(APPEND SANITIZER_COMMON_CFLAGS -g) +endif() +# Warnings suppressions. +check_cxx_compiler_flag(-Wno-variadic-macros SUPPORTS_NO_VARIADIC_MACROS_FLAG) +if(SUPPORTS_NO_VARIADIC_MACROS_FLAG) + list(APPEND SANITIZER_COMMON_CFLAGS -Wno-variadic-macros) +endif() +check_cxx_compiler_flag(-Wno-c99-extensions SUPPORTS_NO_C99_EXTENSIONS_FLAG) +if(SUPPORTS_NO_C99_EXTENSIONS_FLAG) + list(APPEND SANITIZER_COMMON_CFLAGS -Wno-c99-extensions) +endif() +if(APPLE) + list(APPEND SANITIZER_COMMON_CFLAGS -mmacosx-version-min=10.5) +endif() + +# Architectures supported by Sanitizer runtimes. Specific sanitizers may +# support only subset of these (e.g. TSan works on x86_64 only). +filter_available_targets(SANITIZER_COMMON_SUPPORTED_ARCH + x86_64 i386) + +# Compute the Clang version from the LLVM version. +# FIXME: We should be able to reuse CLANG_VERSION variable calculated +# in Clang cmake files, instead of copying the rules here. +string(REGEX MATCH "[0-9]+\\.[0-9]+(\\.[0-9]+)?" CLANG_VERSION + ${PACKAGE_VERSION}) +# Setup the paths where compiler-rt runtimes and headers should be stored. +set(LIBCLANG_INSTALL_PATH lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}) +string(TOLOWER ${CMAKE_SYSTEM_NAME} LIBCLANG_OS_DIR) + +# Install compiler-rt headers. +install(DIRECTORY include/ + DESTINATION ${LIBCLANG_INSTALL_PATH}/include + FILES_MATCHING + PATTERN "*.h" + PATTERN ".svn" EXCLUDE + ) + +# Call add_clang_compiler_rt_libraries to make sure that targets are built +# and installed in the directories where Clang driver expects to find them. +macro(add_clang_compiler_rt_libraries) + # Setup output directories so that clang in build tree works. + set_target_properties(${ARGN} PROPERTIES + ARCHIVE_OUTPUT_DIRECTORY + ${LLVM_BINARY_DIR}/lib/clang/${CLANG_VERSION}/lib/${LIBCLANG_OS_DIR} + LIBRARY_OUTPUT_DIRECTORY + ${LLVM_BINARY_DIR}/lib/clang/${CLANG_VERSION}/lib/${LIBCLANG_OS_DIR} + ) + # Add installation command. + install(TARGETS ${ARGN} + ARCHIVE DESTINATION ${LIBCLANG_INSTALL_PATH}/lib/${LIBCLANG_OS_DIR} + LIBRARY DESTINATION ${LIBCLANG_INSTALL_PATH}/lib/${LIBCLANG_OS_DIR} + ) +endmacro(add_clang_compiler_rt_libraries) + +# Add the public header's directory to the includes for all of compiler-rt. +include_directories(include) + +add_subdirectory(lib) + +if(LLVM_INCLUDE_TESTS) + # Currently the tests have not been ported to CMake, so disable this + # directory. + # + #add_subdirectory(test) +endif() Copied: vendor/compiler-rt/compiler-rt-r172839/LICENSE.TXT (from r245614, vendor/compiler-rt/dist/LICENSE.TXT) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/compiler-rt-r172839/LICENSE.TXT Fri Jan 18 20:08:20 2013 (r245615, copy of r245614, vendor/compiler-rt/dist/LICENSE.TXT) @@ -0,0 +1,97 @@ +============================================================================== +compiler_rt License +============================================================================== + +The compiler_rt library is dual licensed under both the University of Illinois +"BSD-Like" license and the MIT license. As a user of this code you may choose +to use it under either license. As a contributor, you agree to allow your code +to be used under both. + +Full text of the relevant licenses is included below. + +============================================================================== + +University of Illinois/NCSA +Open Source License + +Copyright (c) 2009-2013 by the contributors listed in CREDITS.TXT + +All rights reserved. + +Developed by: + + LLVM Team + + University of Illinois at Urbana-Champaign + + http://llvm.org + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal with +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimers. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimers in the + documentation and/or other materials provided with the distribution. + + * Neither the names of the LLVM Team, University of Illinois at + Urbana-Champaign, nor the names of its contributors may be used to + endorse or promote products derived from this Software without specific + prior written permission. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE +SOFTWARE. + +============================================================================== + +Copyright (c) 2009-2013 by the contributors listed in CREDITS.TXT + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +============================================================================== +Copyrights and Licenses for Third Party Software Distributed with LLVM: +============================================================================== +The LLVM software contains code written by third parties. Such software will +have its own individual LICENSE.TXT file in the directory in which it appears. +This file will describe the copyrights, license, and restrictions which apply +to that code. + +The disclaimer of warranty in the University of Illinois Open Source License +applies to all code in the LLVM Distribution, and nothing in any of the +other licenses gives permission to use the names of the LLVM Team or the +University of Illinois to endorse or promote products derived from this +Software. + +The following pieces of software have additional or alternate copyrights, +licenses, and/or restrictions: + +Program Directory +------- --------- +mach_override lib/interception/mach_override Copied: vendor/compiler-rt/compiler-rt-r172839/Makefile (from r245614, vendor/compiler-rt/dist/Makefile) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/compiler-rt-r172839/Makefile Fri Jan 18 20:08:20 2013 (r245615, copy of r245614, vendor/compiler-rt/dist/Makefile) @@ -0,0 +1,275 @@ +SubDirs := lib + +# Set default rule before anything else. +all: help + +include make/config.mk +include make/util.mk +# If SRCROOT is defined, assume we are doing an Apple style build. We should be +# able to use RC_XBS for this but that is unused during "make installsrc". +ifdef SRCROOT + include make/AppleBI.mk +endif + +# Make sure we don't build with a missing ProjObjRoot. +ifeq ($(ProjObjRoot),) +$(error Refusing to build with empty ProjObjRoot variable) +endif + +############## + +### +# Rules + +### +# Top level targets + +# FIXME: Document the available subtargets. +help: + @echo "usage: make [{VARIABLE=VALUE}*] target" + @echo + @echo "User variables:" + @echo " VERBOSE=1: Use to show all commands [default=0]" + @echo + @echo "Available targets:" + @echo " : build the libraries for 'platform'" + @echo " clean: clean all configurations" + @echo " test: run unit tests" + @echo + @echo " info-platforms: list available platforms" + @echo " help-devel: print additional help for developers" + @echo + +help-devel: help + @echo "Development targets:" + @echo " -:" + @echo " build the libraries for a single platform config" + @echo " --:" + @echo " build the libraries for a single config and arch" + @echo " info-functions: list available compiler-rt functions" + @echo " help-hidden: print help for Makefile debugging" + @echo + +help-hidden: help-devel + @echo "Debugging variables:" + @echo " DEBUGMAKE=1: enable some Makefile logging [default=]" + @echo " =2: enable more Makefile logging" + @echo + @echo "Debugging targets:" + @echo " make-print-FOO: print information on the variable 'FOO'" + @echo + +info-functions: + @echo "compiler-rt Available Functions" + @echo + @echo "All Functions: $(AvailableFunctions)" + @$(foreach fn,$(AvailableFunctions),\ + printf " %-20s - available in (%s)\n" $(fn)\ + "$(foreach key,$(AvailableIn.$(fn)),$($(key).Dir))";) + +info-platforms: + @echo "compiler-rt Available Platforms" + @echo + @echo "Platforms:" + @$(foreach key,$(PlatformKeys),\ + printf " %s - from '%s'\n" $($(key).Name) $($(key).Path);\ + printf " %s\n" "$($(key).Description)";\ + printf " Configurations: %s\n\n" "$($(key).Configs)";) + +# Provide default clean target which is extended by other templates. +.PHONY: clean +clean:: + +# Test +.PHONY: test +test: + cd test/Unit && ./test + +### +# Directory handling magic. + +# Create directories as needed, and timestamp their creation. +%/.dir: + $(Summary) " MKDIR: $*" + $(Verb) $(MKDIR) $* > /dev/null + $(Verb) echo 'Created.' > $@ + +# Remove directories +%/.remove: + $(Verb) $(RM) -r $* + +### +# Include child makefile fragments + +Dir := . +include make/subdir.mk +include make/lib_info.mk +include make/lib_util.mk +include make/lib_platforms.mk + +### +# Define Platform Rules + +define PerPlatform_template +$(call Set,Tmp.Key,$(1)) +$(call Set,Tmp.Name,$($(Tmp.Key).Name)) +$(call Set,Tmp.Configs,$($(Tmp.Key).Configs)) +$(call Set,Tmp.ObjPath,$(ProjObjRoot)/$(Tmp.Name)) + +# Top-Level Platform Target +$(Tmp.Name):: $(Tmp.Configs:%=$(Tmp.Name)-%) +.PHONY: $(Tmp.Name) + +clean:: + $(Verb) rm -rf $(Tmp.ObjPath) + +# Per-Config Libraries +$(foreach config,$(Tmp.Configs),\ + $(call PerPlatformConfig_template,$(config))) +endef + +define PerPlatformConfig_template +$(call Set,Tmp.Config,$(1)) +$(call Set,Tmp.ObjPath,$(ProjObjRoot)/$(Tmp.Name)/$(Tmp.Config)) +$(call Set,Tmp.SHARED_LIBRARY,$(strip \ + $(call GetCNAVar,SHARED_LIBRARY,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) +$(call Set,Tmp.SHARED_LIBRARY_SUFFIX,$(strip \ + $(call GetCNAVar,SHARED_LIBRARY_SUFFIX,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) + +# Compute the library suffix. +$(if $(call streq,1,$(Tmp.SHARED_LIBRARY)), + $(call Set,Tmp.LibrarySuffix,$(Tmp.SHARED_LIBRARY_SUFFIX)), + $(call Set,Tmp.LibrarySuffix,a)) + +# Compute the archs to build, depending on whether this is a universal build or +# not. +$(call Set,Tmp.ArchsToBuild,\ + $(if $(call IsDefined,$(Tmp.Key).UniversalArchs),\ + $(strip \ + $(or $($(Tmp.Key).UniversalArchs.$(Tmp.Config)),\ + $($(Tmp.Key).UniversalArchs))),\ + $(call VarOrDefault,$(Tmp.Key).Arch.$(Tmp.Config),$($(Tmp.Key).Arch)))) + +# Copy or lipo to create the per-config library. +$(call Set,Tmp.Inputs,$(Tmp.ArchsToBuild:%=$(Tmp.ObjPath)/%/libcompiler_rt.$(Tmp.LibrarySuffix))) +$(Tmp.ObjPath)/libcompiler_rt.$(Tmp.LibrarySuffix): $(Tmp.Inputs) $(Tmp.ObjPath)/.dir + $(Summary) " FINAL-ARCHIVE: $(Tmp.Name)/$(Tmp.Config): $$@" + -$(Verb) $(RM) $$@ + $(if $(call streq,1,$(words $(Tmp.ArchsToBuild))), \ + $(Verb) $(CP) $(Tmp.Inputs) $$@, \ + $(Verb) $(LIPO) -create -output $$@ $(Tmp.Inputs)) +.PRECIOUS: $(Tmp.ObjPath)/.dir + +# Per-Config Targets +$(Tmp.Name)-$(Tmp.Config):: $(Tmp.ObjPath)/libcompiler_rt.$(Tmp.LibrarySuffix) +.PHONY: $(Tmp.Name)-$(Tmp.Config) + +# Per-Config-Arch Libraries +$(foreach arch,$(Tmp.ArchsToBuild),\ + $(call PerPlatformConfigArch_template,$(arch))) +endef + +define PerPlatformConfigArch_template +$(call Set,Tmp.Arch,$(1)) +$(call Set,Tmp.ObjPath,$(ProjObjRoot)/$(Tmp.Name)/$(Tmp.Config)/$(Tmp.Arch)) +$(call Set,Tmp.Functions,$(strip \ + $(AlwaysRequiredModules) \ + $(call GetCNAVar,FUNCTIONS,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) +$(call Set,Tmp.Optimized,$(strip \ + $(call GetCNAVar,OPTIMIZED,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) +$(call Set,Tmp.AR,$(strip \ + $(call GetCNAVar,AR,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) +$(call Set,Tmp.ARFLAGS,$(strip \ + $(call GetCNAVar,ARFLAGS,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) +$(call Set,Tmp.CC,$(strip \ + $(call GetCNAVar,CC,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) +$(call Set,Tmp.LDFLAGS,$(strip \ + $(call GetCNAVar,LDFLAGS,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) +$(call Set,Tmp.RANLIB,$(strip \ + $(call GetCNAVar,RANLIB,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) +$(call Set,Tmp.RANLIBFLAGS,$(strip \ + $(call GetCNAVar,RANLIBFLAGS,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) +$(call Set,Tmp.SHARED_LIBRARY,$(strip \ + $(call GetCNAVar,SHARED_LIBRARY,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) + +# Compute the library suffix. +$(if $(call streq,1,$(Tmp.SHARED_LIBRARY)), + $(call Set,Tmp.LibrarySuffix,$(Tmp.SHARED_LIBRARY_SUFFIX)), + $(call Set,Tmp.LibrarySuffix,a)) + +# Compute the object inputs for this library. +$(call Set,Tmp.Inputs,\ + $(foreach fn,$(sort $(Tmp.Functions)),\ + $(call Set,Tmp.FnDir,\ + $(call SelectFunctionDir,$(Tmp.Config),$(Tmp.Arch),$(fn),$(Tmp.Optimized)))\ + $(Tmp.ObjPath)/$(Tmp.FnDir)/$(fn).o)) +$(Tmp.ObjPath)/libcompiler_rt.a: $(Tmp.Inputs) $(Tmp.ObjPath)/.dir + $(Summary) " ARCHIVE: $(Tmp.Name)/$(Tmp.Config)/$(Tmp.Arch): $$@" + -$(Verb) $(RM) $$@ + $(Verb) $(Tmp.AR) $(Tmp.ARFLAGS) $$@ $(Tmp.Inputs) + $(Verb) $(Tmp.RANLIB) $(Tmp.RANLIBFLAGS) $$@ +$(Tmp.ObjPath)/libcompiler_rt.dylib: $(Tmp.Inputs) $(Tmp.ObjPath)/.dir + $(Summary) " DYLIB: $(Tmp.Name)/$(Tmp.Config)/$(Tmp.Arch): $$@" + $(Verb) $(Tmp.CC) -arch $(Tmp.Arch) -dynamiclib -o $$@ \ + $(Tmp.Inputs) $(Tmp.LDFLAGS) +$(Tmp.ObjPath)/libcompiler_rt.so: $(Tmp.Inputs) $(Tmp.ObjPath)/.dir + $(Summary) " SO: $(Tmp.Name)/$(Tmp.Config)/$(Tmp.Arch): $$@" + $(Verb) $(Tmp.CC) -shared -o $$@ \ + $(Tmp.Inputs) $(Tmp.LDFLAGS) +.PRECIOUS: $(Tmp.ObjPath)/.dir + +# Per-Config-Arch Targets +$(Tmp.Name)-$(Tmp.Config)-$(Tmp.Arch):: $(Tmp.ObjPath)/libcompiler_rt.$(Tmp.LibrarySuffix) +.PHONY: $(Tmp.Name)-$(Tmp.Config)-$(Tmp.Arch) + +# Per-Config-Arch-SubDir Objects +$(foreach key,$(SubDirKeys),\ + $(call PerPlatformConfigArchSubDir_template,$(key))) +endef + +define PerPlatformConfigArchSubDir_template +$(call Set,Tmp.SubDirKey,$(1)) +$(call Set,Tmp.SubDir,$($(Tmp.SubDirKey).Dir)) +$(call Set,Tmp.SrcPath,$(ProjSrcRoot)/$(Tmp.SubDir)) +$(call Set,Tmp.ObjPath,$(ProjObjRoot)/$(Tmp.Name)/$(Tmp.Config)/$(Tmp.Arch)/$(Tmp.SubDirKey)) +$(call Set,Tmp.Dependencies,$($(Tmp.SubDirKey).Dependencies)) +$(call Set,Tmp.CC,$(strip \ + $(call GetCNAVar,CC,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) +$(call Set,Tmp.KERNEL_USE,$(strip \ + $(call GetCNAVar,KERNEL_USE,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) +$(call Set,Tmp.VISIBILITY_HIDDEN,$(strip \ + $(call GetCNAVar,VISIBILITY_HIDDEN,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) +$(call Set,Tmp.CFLAGS,$(strip \ + $(if $(call IsDefined,$(Tmp.Key).UniversalArchs),-arch $(Tmp.Arch),)\ + $(if $(call streq,$(Tmp.VISIBILITY_HIDDEN),1),\ + -fvisibility=hidden -DVISIBILITY_HIDDEN,)\ + $(if $(call streq,$(Tmp.KERNEL_USE),1),\ + -mkernel -DKERNEL_USE,)\ + $(call GetCNAVar,CFLAGS,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) + +$(Tmp.ObjPath)/%.o: $(Tmp.SrcPath)/%.s $(Tmp.Dependencies) $(Tmp.ObjPath)/.dir + $(Summary) " ASSEMBLE: $(Tmp.Name)/$(Tmp.Config)/$(Tmp.Arch): $$<" + $(Verb) $(Tmp.CC) $(Tmp.CFLAGS) -c -o $$@ $$< +$(Tmp.ObjPath)/%.o: $(Tmp.SrcPath)/%.S $(Tmp.Dependencies) $(Tmp.ObjPath)/.dir + $(Summary) " ASSEMBLE: $(Tmp.Name)/$(Tmp.Config)/$(Tmp.Arch): $$<" + $(Verb) $(Tmp.CC) $(Tmp.CFLAGS) -c -o $$@ $$< +$(Tmp.ObjPath)/%.o: $(Tmp.SrcPath)/%.c $(Tmp.Dependencies) $(Tmp.ObjPath)/.dir + $(Summary) " COMPILE: $(Tmp.Name)/$(Tmp.Config)/$(Tmp.Arch): $$<" + $(Verb) $(Tmp.CC) $(Tmp.CFLAGS) -c $(COMMON_CFLAGS) -o $$@ $$< +$(Tmp.ObjPath)/%.o: $(Tmp.SrcPath)/%.cc $(Tmp.Dependencies) $(Tmp.ObjPath)/.dir + $(Summary) " COMPILE: $(Tmp.Name)/$(Tmp.Config)/$(Tmp.Arch): $$<" + $(Verb) $(Tmp.CC) $(Tmp.CFLAGS) -c $(COMMON_CXXFLAGS) -o $$@ $$< +.PRECIOUS: $(Tmp.ObjPath)/.dir + +endef + +# Run templates. +$(foreach key,$(PlatformKeys),\ + $(eval $(call PerPlatform_template,$(key)))) + +### + +ifneq ($(DEBUGMAKE),) + $(info MAKE: Done processing Makefile) + $(info ) +endif Copied: vendor/compiler-rt/compiler-rt-r172839/SDKs/darwin/usr/include/stdio.h (from r245614, vendor/compiler-rt/dist/SDKs/darwin/usr/include/stdio.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/compiler-rt-r172839/SDKs/darwin/usr/include/stdio.h Fri Jan 18 20:08:20 2013 (r245615, copy of r245614, vendor/compiler-rt/dist/SDKs/darwin/usr/include/stdio.h) @@ -0,0 +1,84 @@ +/* ===-- stdio.h - stub SDK header for compiler-rt --------------------------=== + * + * 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. + * + * ===-----------------------------------------------------------------------=== + * + * This is a stub SDK header file. This file is not part of the interface of + * this library nor an official version of the appropriate SDK header. It is + * intended only to stub the features of this header required by compiler-rt. + * + * ===-----------------------------------------------------------------------=== + */ + +#ifndef __STDIO_H__ +#define __STDIO_H__ + +#if defined(__cplusplus) +extern "C" { +#endif + +typedef struct __sFILE FILE; +typedef __SIZE_TYPE__ size_t; + +/* Determine the appropriate fopen() and fwrite() functions. */ +#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) +# if defined(__i386) +# define __FOPEN_NAME "_fopen$UNIX2003" +# define __FWRITE_NAME "_fwrite$UNIX2003" +# elif defined(__x86_64__) +# define __FOPEN_NAME "_fopen" +# define __FWRITE_NAME "_fwrite" +# elif defined(__arm) +# define __FOPEN_NAME "_fopen" +# define __FWRITE_NAME "_fwrite" +# else +# error "unrecognized architecture for targetting OS X" +# endif +#elif defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) +# if defined(__i386) || defined (__x86_64) +# define __FOPEN_NAME "_fopen" +# define __FWRITE_NAME "_fwrite" +# elif defined(__arm) +# define __FOPEN_NAME "_fopen" +# define __FWRITE_NAME "_fwrite" +# else +# error "unrecognized architecture for targetting iOS" +# endif +#else +# error "unrecognized architecture for targetting Darwin" +#endif + +# define stderr __stderrp +extern FILE *__stderrp; + +#ifndef SEEK_SET +#define SEEK_SET 0 /* set file offset to offset */ +#endif +#ifndef SEEK_CUR +#define SEEK_CUR 1 /* set file offset to current plus offset */ +#endif +#ifndef SEEK_END +#define SEEK_END 2 /* set file offset to EOF plus offset */ +#endif + +int fclose(FILE *); +int fflush(FILE *); +FILE *fopen(const char * __restrict, const char * __restrict) __asm(__FOPEN_NAME); +int fprintf(FILE * __restrict, const char * __restrict, ...); +size_t fwrite(const void * __restrict, size_t, size_t, FILE * __restrict) + __asm(__FWRITE_NAME); +size_t fread(void * __restrict, size_t, size_t, FILE * __restrict); +long ftell(FILE *); +int fseek(FILE *, long, int); + +int snprintf(char * __restrict, size_t, const char * __restrict, ...); + +#if defined(__cplusplus) +} +#endif + +#endif /* __STDIO_H__ */ Copied: vendor/compiler-rt/compiler-rt-r172839/SDKs/linux/usr/include/stdio.h (from r245614, vendor/compiler-rt/dist/SDKs/linux/usr/include/stdio.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/compiler-rt-r172839/SDKs/linux/usr/include/stdio.h Fri Jan 18 20:08:20 2013 (r245615, copy of r245614, vendor/compiler-rt/dist/SDKs/linux/usr/include/stdio.h) @@ -0,0 +1,42 @@ +/* ===-- stdio.h - stub SDK header for compiler-rt --------------------------=== + * + * 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. + * + * ===-----------------------------------------------------------------------=== + * + * This is a stub SDK header file. This file is not part of the interface of + * this library nor an official version of the appropriate SDK header. It is + * intended only to stub the features of this header required by compiler-rt. + * + * ===-----------------------------------------------------------------------=== + */ + +#ifndef __STDIO_H__ +#define __STDIO_H__ + +typedef __SIZE_TYPE__ size_t; + +struct _IO_FILE; +typedef struct _IO_FILE FILE; + +extern struct _IO_FILE *stdin; +extern struct _IO_FILE *stdout; +extern struct _IO_FILE *stderr; + +#define SEEK_SET 0 /* set file offset to offset */ +#define SEEK_CUR 1 /* set file offset to current plus offset */ +#define SEEK_END 2 /* set file offset to EOF plus offset */ + +extern int fclose(FILE *); +extern int fflush(FILE *); +extern FILE *fopen(const char * restrict, const char * restrict); +extern int fprintf(FILE * restrict, const char * restrict, ...); +extern size_t fwrite(const void * restrict, size_t, size_t, FILE * restrict); +extern size_t fread(void * restrict, size_t, size_t, FILE * restrict); +extern long ftell(FILE *); +extern int fseek(FILE *, long, int); + +#endif /* __STDIO_H__ */ Copied: vendor/compiler-rt/compiler-rt-r172839/cmake/Modules/AddCompilerRT.cmake (from r245614, vendor/compiler-rt/dist/cmake/Modules/AddCompilerRT.cmake) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/compiler-rt-r172839/cmake/Modules/AddCompilerRT.cmake Fri Jan 18 20:08:20 2013 (r245615, copy of r245614, vendor/compiler-rt/dist/cmake/Modules/AddCompilerRT.cmake) @@ -0,0 +1,49 @@ +include(AddLLVM) +include(LLVMParseArguments) +include(CompilerRTUtils) + +# Tries to add "object library" target for a given architecture +# with name "." if architecture can be targeted. +# add_compiler_rt_object_library( +# SOURCES +# CFLAGS ) +macro(add_compiler_rt_object_library name arch) + if(CAN_TARGET_${arch}) + parse_arguments(LIB "SOURCES;CFLAGS" "" ${ARGN}) + add_library(${name}.${arch} OBJECT ${LIB_SOURCES}) + set_target_compile_flags(${name}.${arch} + ${TARGET_${arch}_CFLAGS} ${LIB_CFLAGS}) + else() + message(FATAL_ERROR "Archtecture ${arch} can't be targeted") + endif() +endmacro() + +# Unittests support. +set(COMPILER_RT_GTEST_PATH ${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest) +set(COMPILER_RT_GTEST_SOURCE ${COMPILER_RT_GTEST_PATH}/gtest-all.cc) +set(COMPILER_RT_GTEST_INCLUDE_CFLAGS + -DGTEST_NO_LLVM_RAW_OSTREAM=1 + -I${COMPILER_RT_GTEST_PATH}/include +) + +# Use Clang to link objects into a single executable with just-built +# Clang, using specific link flags. Make executable a part of provided +# test_suite. +# add_compiler_rt_test( +# OBJECTS +# DEPS +# LINK_FLAGS ) +macro(add_compiler_rt_test test_suite test_name) + parse_arguments(TEST "OBJECTS;DEPS;LINK_FLAGS" "" ${ARGN}) + get_unittest_directory(OUTPUT_DIR) + file(MAKE_DIRECTORY ${OUTPUT_DIR}) + set(output_bin "${OUTPUT_DIR}/${test_name}") + add_custom_command( + OUTPUT ${output_bin} + COMMAND clang ${TEST_OBJECTS} -o "${output_bin}" + ${TEST_LINK_FLAGS} + DEPENDS clang ${TEST_DEPS}) + add_custom_target(${test_name} DEPENDS ${output_bin}) + # Make the test suite depend on the binary. + add_dependencies(${test_suite} ${test_name}) +endmacro() Copied: vendor/compiler-rt/compiler-rt-r172839/cmake/Modules/CompilerRTCompile.cmake (from r245614, vendor/compiler-rt/dist/cmake/Modules/CompilerRTCompile.cmake) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/compiler-rt-r172839/cmake/Modules/CompilerRTCompile.cmake Fri Jan 18 20:08:20 2013 (r245615, copy of r245614, vendor/compiler-rt/dist/cmake/Modules/CompilerRTCompile.cmake) @@ -0,0 +1,16 @@ +include(LLVMParseArguments) + +# Compile a source into an object file with just-built Clang using +# a provided compile flags and dependenices. +# clang_compile( +# CFLAGS +# DEPS ) +macro(clang_compile object_file source) + parse_arguments(SOURCE "CFLAGS;DEPS" "" ${ARGN}) + get_filename_component(source_rpath ${source} REALPATH) + add_custom_command( + OUTPUT ${object_file} + COMMAND clang ${SOURCE_CFLAGS} -c -o "${object_file}" ${source_rpath} + MAIN_DEPENDENCY ${source} + DEPENDS clang ${SOURCE_DEPS}) +endmacro() Copied: vendor/compiler-rt/compiler-rt-r172839/cmake/Modules/CompilerRTLink.cmake (from r245614, vendor/compiler-rt/dist/cmake/Modules/CompilerRTLink.cmake) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/compiler-rt-r172839/cmake/Modules/CompilerRTLink.cmake Fri Jan 18 20:08:20 2013 (r245615, copy of r245614, vendor/compiler-rt/dist/cmake/Modules/CompilerRTLink.cmake) @@ -0,0 +1,14 @@ +include(LLVMParseArguments) + +# Link a shared library with just-built Clang. +# clang_link_shared( +# OBJECTS +# LINKFLAGS +# DEPS ) +macro(clang_link_shared so_file) + parse_arguments(SOURCE "OBJECTS;LINKFLAGS;DEPS" "" ${ARGN}) + add_custom_command( + OUTPUT ${so_file} + COMMAND clang -o "${so_file}" -shared ${SOURCE_LINKFLAGS} ${SOURCE_OBJECTS} + DEPENDS clang ${SOURCE_DEPS}) +endmacro() Copied: vendor/compiler-rt/compiler-rt-r172839/cmake/Modules/CompilerRTUtils.cmake (from r245614, vendor/compiler-rt/dist/cmake/Modules/CompilerRTUtils.cmake) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/compiler-rt-r172839/cmake/Modules/CompilerRTUtils.cmake Fri Jan 18 20:08:20 2013 (r245615, copy of r245614, vendor/compiler-rt/dist/cmake/Modules/CompilerRTUtils.cmake) @@ -0,0 +1,17 @@ +# Because compiler-rt spends a lot of time setting up custom compile flags, +# define a handy helper function for it. The compile flags setting in CMake +# has serious issues that make its syntax challenging at best. +function(set_target_compile_flags target) + foreach(arg ${ARGN}) + set(argstring "${argstring} ${arg}") + endforeach() + set_property(TARGET ${target} PROPERTY COMPILE_FLAGS "${argstring}") +endfunction() + +function(set_target_link_flags target) + foreach(arg ${ARGN}) + set(argstring "${argstring} ${arg}") + endforeach() + set_property(TARGET ${target} PROPERTY LINK_FLAGS "${argstring}") +endfunction() + Copied: vendor/compiler-rt/compiler-rt-r172839/lib/CMakeLists.txt (from r245614, vendor/compiler-rt/dist/lib/CMakeLists.txt) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/compiler-rt-r172839/lib/CMakeLists.txt Fri Jan 18 20:08:20 2013 (r245615, copy of r245614, vendor/compiler-rt/dist/lib/CMakeLists.txt) @@ -0,0 +1,188 @@ +# First, add the subdirectories which contain feature-based runtime libraries +# and several convenience helper libraries. +if(CMAKE_SYSTEM_NAME MATCHES "Darwin|Linux") + # AddressSanitizer is supported on Linux and Mac OS X. + # Windows support is work in progress. + add_subdirectory(asan) + add_subdirectory(interception) + add_subdirectory(sanitizer_common) + if(NOT ANDROID) + add_subdirectory(ubsan) + endif() +endif() +if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux" AND NOT ANDROID) + # ThreadSanitizer and MemorySanitizer are supported on Linux only. + add_subdirectory(tsan) + add_subdirectory(msan) +endif() + +# FIXME: Add support for the profile library. + +# The top-level lib directory contains a large amount of C code which provides +# generic implementations of the core runtime library along with optimized +# architecture-specific code in various subdirectories. + +set(GENERIC_SOURCES + absvdi2.c + absvsi2.c + absvti2.c + adddf3.c + addsf3.c + addvdi3.c + addvsi3.c + addvti3.c + apple_versioning.c + ashldi3.c + ashlti3.c + ashrdi3.c + ashrti3.c + clear_cache.c + clzdi2.c + clzsi2.c + clzti2.c + cmpdi2.c + cmpti2.c + comparedf2.c + comparesf2.c + ctzdi2.c + ctzsi2.c + ctzti2.c + divdc3.c + divdf3.c + divdi3.c + divmoddi4.c + divmodsi4.c + divsc3.c + divsf3.c + divsi3.c + divti3.c + divxc3.c + enable_execute_stack.c + eprintf.c + extendsfdf2.c + ffsdi2.c + ffsti2.c + fixdfdi.c + fixdfsi.c + fixdfti.c + fixsfdi.c + fixsfsi.c + fixsfti.c + fixunsdfdi.c + fixunsdfsi.c + fixunsdfti.c + fixunssfdi.c + fixunssfsi.c + fixunssfti.c + fixunsxfdi.c + fixunsxfsi.c + fixunsxfti.c + fixxfdi.c + fixxfti.c + floatdidf.c + floatdisf.c + floatdixf.c + floatsidf.c + floatsisf.c + floattidf.c + floattisf.c + floattixf.c + floatundidf.c + floatundisf.c + floatundixf.c + floatunsidf.c + floatunsisf.c + floatuntidf.c + floatuntisf.c + floatuntixf.c + gcc_personality_v0.c + int_util.c + lshrdi3.c + lshrti3.c + moddi3.c + modsi3.c + modti3.c + muldc3.c + muldf3.c + muldi3.c + mulodi4.c + mulosi4.c + muloti4.c + mulsc3.c + mulsf3.c + multi3.c + mulvdi3.c + mulvsi3.c + mulvti3.c + mulxc3.c + negdf2.c + negdi2.c + negsf2.c + negti2.c + negvdi2.c + negvsi2.c + negvti2.c + paritydi2.c + paritysi2.c + parityti2.c + popcountdi2.c + popcountsi2.c + popcountti2.c + powidf2.c + powisf2.c + powitf2.c + powixf2.c + subdf3.c + subsf3.c + subvdi3.c + subvsi3.c + subvti3.c + trampoline_setup.c + truncdfsf2.c + ucmpdi2.c + ucmpti2.c + udivdi3.c + udivmoddi4.c + udivmodsi4.c + udivmodti4.c + udivsi3.c + udivti3.c + umoddi3.c + umodsi3.c + umodti3.c + ) + +if(CAN_TARGET_x86_64) + add_library(clang_rt.x86_64 STATIC + x86_64/floatdidf.c + x86_64/floatdisf.c + x86_64/floatdixf.c + x86_64/floatundidf.S + x86_64/floatundisf.S + x86_64/floatundixf.S + ${GENERIC_SOURCES} + ) + set_target_properties(clang_rt.x86_64 PROPERTIES COMPILE_FLAGS "-std=c99 ${TARGET_x86_64_CFLAGS}") + add_clang_compiler_rt_libraries(clang_rt.x86_64) +endif() +if(CAN_TARGET_i386) + add_library(clang_rt.i386 STATIC + i386/ashldi3.S + i386/ashrdi3.S + i386/divdi3.S + i386/floatdidf.S + i386/floatdisf.S + i386/floatdixf.S + i386/floatundidf.S + i386/floatundisf.S + i386/floatundixf.S + i386/lshrdi3.S + i386/moddi3.S + i386/muldi3.S + i386/udivdi3.S + i386/umoddi3.S + ${GENERIC_SOURCES} + ) + set_target_properties(clang_rt.i386 PROPERTIES COMPILE_FLAGS "-std=c99 ${TARGET_i386_CFLAGS}") + add_clang_compiler_rt_libraries(clang_rt.i386) +endif() Copied: vendor/compiler-rt/compiler-rt-r172839/lib/Makefile.mk (from r245614, vendor/compiler-rt/dist/lib/Makefile.mk) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/compiler-rt-r172839/lib/Makefile.mk Fri Jan 18 20:08:20 2013 (r245615, copy of r245614, vendor/compiler-rt/dist/lib/Makefile.mk) @@ -0,0 +1,35 @@ +#===- lib/Makefile.mk --------------------------------------*- Makefile -*--===# +# *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***