From owner-svn-src-all@freebsd.org Sun Sep 6 05:50:53 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2220C9CB5EA; Sun, 6 Sep 2015 05:50:53 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1358112EA; Sun, 6 Sep 2015 05:50:53 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t865oqNJ068448; Sun, 6 Sep 2015 05:50:52 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t865oqkB068441; Sun, 6 Sep 2015 05:50:52 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <201509060550.t865oqkB068441@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Sun, 6 Sep 2015 05:50:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287497 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Sep 2015 05:50:53 -0000 Author: mckusick Date: Sun Sep 6 05:50:51 2015 New Revision: 287497 URL: https://svnweb.freebsd.org/changeset/base/287497 Log: Track changes to kern.maxvnodes and appropriately increase or decrease the size of the name cache hash table (mapping file names to vnodes) and the vnode hash table (mapping mount point and inode number to vnode). An appropriate locking strategy is the key to changing hash table sizes while they are in active use. Reviewed by: kib Tested by: Peter Holm Differential Revision: https://reviews.freebsd.org/D2265 MFC after: 2 weeks Modified: head/sys/kern/vfs_cache.c head/sys/kern/vfs_hash.c head/sys/kern/vfs_subr.c head/sys/sys/vnode.h Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Sat Sep 5 23:22:59 2015 (r287496) +++ head/sys/kern/vfs_cache.c Sun Sep 6 05:50:51 2015 (r287497) @@ -327,11 +327,17 @@ sysctl_debug_hashstat_rawnchash(SYSCTL_H struct namecache *ncp; int i, error, n_nchash, *cntbuf; +retry: n_nchash = nchash + 1; /* nchash is max index, not count */ if (req->oldptr == NULL) return SYSCTL_OUT(req, 0, n_nchash * sizeof(int)); cntbuf = malloc(n_nchash * sizeof(int), M_TEMP, M_ZERO | M_WAITOK); CACHE_RLOCK(); + if (n_nchash != nchash + 1) { + CACHE_RUNLOCK(); + free(cntbuf, M_TEMP); + goto retry; + } /* Scan hash tables counting entries */ for (ncpp = nchashtbl, i = 0; i < n_nchash; ncpp++, i++) LIST_FOREACH(ncp, ncpp, nc_hash) @@ -930,6 +936,44 @@ nchinit(void *dummy __unused) } SYSINIT(vfs, SI_SUB_VFS, SI_ORDER_SECOND, nchinit, NULL); +void +cache_changesize(int newmaxvnodes) +{ + struct nchashhead *new_nchashtbl, *old_nchashtbl; + u_long new_nchash, old_nchash; + struct namecache *ncp; + uint32_t hash; + int i; + + new_nchashtbl = hashinit(newmaxvnodes * 2, M_VFSCACHE, &new_nchash); + /* If same hash table size, nothing to do */ + if (nchash == new_nchash) { + free(new_nchashtbl, M_VFSCACHE); + return; + } + /* + * Move everything from the old hash table to the new table. + * None of the namecache entries in the table can be removed + * because to do so, they have to be removed from the hash table. + */ + CACHE_WLOCK(); + old_nchashtbl = nchashtbl; + old_nchash = nchash; + nchashtbl = new_nchashtbl; + nchash = new_nchash; + for (i = 0; i <= old_nchash; i++) { + while ((ncp = LIST_FIRST(&old_nchashtbl[i])) != NULL) { + hash = fnv_32_buf(nc_get_name(ncp), ncp->nc_nlen, + FNV1_32_INIT); + hash = fnv_32_buf(&ncp->nc_dvp, sizeof(ncp->nc_dvp), + hash); + LIST_REMOVE(ncp, nc_hash); + LIST_INSERT_HEAD(NCHHASH(hash), ncp, nc_hash); + } + } + CACHE_WUNLOCK(); + free(old_nchashtbl, M_VFSCACHE); +} /* * Invalidate all entries to a particular vnode. Modified: head/sys/kern/vfs_hash.c ============================================================================== --- head/sys/kern/vfs_hash.c Sat Sep 5 23:22:59 2015 (r287496) +++ head/sys/kern/vfs_hash.c Sun Sep 6 05:50:51 2015 (r287497) @@ -161,3 +161,40 @@ vfs_hash_rehash(struct vnode *vp, u_int vp->v_hash = hash; rw_wunlock(&vfs_hash_lock); } + +void +vfs_hash_changesize(int newmaxvnodes) +{ + struct vfs_hash_head *vfs_hash_newtbl, *vfs_hash_oldtbl; + u_long vfs_hash_newmask, vfs_hash_oldmask; + struct vnode *vp; + int i; + + vfs_hash_newtbl = hashinit(newmaxvnodes, M_VFS_HASH, + &vfs_hash_newmask); + /* If same hash table size, nothing to do */ + if (vfs_hash_mask == vfs_hash_newmask) { + free(vfs_hash_newtbl, M_VFS_HASH); + return; + } + /* + * Move everything from the old hash table to the new table. + * None of the vnodes in the table can be recycled because to + * do so, they have to be removed from the hash table. + */ + rw_wlock(&vfs_hash_lock); + vfs_hash_oldtbl = vfs_hash_tbl; + vfs_hash_oldmask = vfs_hash_mask; + vfs_hash_tbl = vfs_hash_newtbl; + vfs_hash_mask = vfs_hash_newmask; + for (i = 0; i <= vfs_hash_oldmask; i++) { + while ((vp = LIST_FIRST(&vfs_hash_oldtbl[i])) != NULL) { + LIST_REMOVE(vp, v_hashlist); + LIST_INSERT_HEAD( + vfs_hash_bucket(vp->v_mount, vp->v_hash), + vp, v_hashlist); + } + } + rw_wunlock(&vfs_hash_lock); + free(vfs_hash_oldtbl, M_VFS_HASH); +} Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Sat Sep 5 23:22:59 2015 (r287496) +++ head/sys/kern/vfs_subr.c Sun Sep 6 05:50:51 2015 (r287497) @@ -281,8 +281,25 @@ static enum { SYNCER_RUNNING, SYNCER_SHU * XXX desiredvnodes is historical cruft and should not exist. */ int desiredvnodes; -SYSCTL_INT(_kern, KERN_MAXVNODES, maxvnodes, CTLFLAG_RW, - &desiredvnodes, 0, "Maximum number of vnodes"); + +static int +sysctl_update_desiredvnodes(SYSCTL_HANDLER_ARGS) +{ + int error, old_desiredvnodes; + + old_desiredvnodes = desiredvnodes; + if ((error = sysctl_handle_int(oidp, arg1, arg2, req)) != 0) + return (error); + if (old_desiredvnodes != desiredvnodes) { + vfs_hash_changesize(desiredvnodes); + cache_changesize(desiredvnodes); + } + return (0); +} + +SYSCTL_PROC(_kern, KERN_MAXVNODES, maxvnodes, + CTLTYPE_INT | CTLFLAG_MPSAFE | CTLFLAG_RW, &desiredvnodes, 0, + sysctl_update_desiredvnodes, "I", "Maximum number of vnodes"); SYSCTL_ULONG(_kern, OID_AUTO, minvnodes, CTLFLAG_RW, &wantfreevnodes, 0, "Minimum number of vnodes (legacy)"); static int vnlru_nowhere; Modified: head/sys/sys/vnode.h ============================================================================== --- head/sys/sys/vnode.h Sat Sep 5 23:22:59 2015 (r287496) +++ head/sys/sys/vnode.h Sun Sep 6 05:50:51 2015 (r287497) @@ -607,6 +607,7 @@ struct vnode; typedef int (*vn_get_ino_t)(struct mount *, void *, int, struct vnode **); /* cache_* may belong in namei.h. */ +void cache_changesize(int newhashsize); #define cache_enter(dvp, vp, cnp) \ cache_enter_time(dvp, vp, cnp, NULL, NULL) void cache_enter_time(struct vnode *dvp, struct vnode *vp, @@ -843,6 +844,7 @@ int fifo_printinfo(struct vnode *); /* vfs_hash.c */ typedef int vfs_hash_cmp_t(struct vnode *vp, void *arg); +void vfs_hash_changesize(int newhashsize); int vfs_hash_get(const struct mount *mp, u_int hash, int flags, struct thread *td, struct vnode **vpp, vfs_hash_cmp_t *fn, void *arg); u_int vfs_hash_index(struct vnode *vp); int vfs_hash_insert(struct vnode *vp, u_int hash, int flags, struct thread *td, struct vnode **vpp, vfs_hash_cmp_t *fn, void *arg); From owner-svn-src-all@freebsd.org Sun Sep 6 09:41:09 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8F73B9CB1D5; Sun, 6 Sep 2015 09:41:09 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7C2251054; Sun, 6 Sep 2015 09:41:09 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t869f9qs063937; Sun, 6 Sep 2015 09:41:09 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t869f90O063936; Sun, 6 Sep 2015 09:41:09 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201509060941.t869f90O063936@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 6 Sep 2015 09:41:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r287498 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Sep 2015 09:41:09 -0000 Author: mav Date: Sun Sep 6 09:41:08 2015 New Revision: 287498 URL: https://svnweb.freebsd.org/changeset/base/287498 Log: MFC r287432: Fix copy-paste bug introduced in r275458. Modified: stable/10/sys/cam/ctl/ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Sun Sep 6 05:50:51 2015 (r287497) +++ stable/10/sys/cam/ctl/ctl.c Sun Sep 6 09:41:08 2015 (r287498) @@ -9473,7 +9473,7 @@ ctl_report_luns(struct ctl_scsiio *ctsio */ if (request_lun != NULL) { mtx_lock(&lun->lun_lock); - ctl_clr_ua(lun, initidx, CTL_UA_RES_RELEASE); + ctl_clr_ua(lun, initidx, CTL_UA_LUN_CHANGE); mtx_unlock(&lun->lun_lock); } } From owner-svn-src-all@freebsd.org Sun Sep 6 09:54:57 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 793C99CB9B1; Sun, 6 Sep 2015 09:54:57 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 686861915; Sun, 6 Sep 2015 09:54:57 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t869svaI069257; Sun, 6 Sep 2015 09:54:57 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t869sufK069253; Sun, 6 Sep 2015 09:54:56 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201509060954.t869sufK069253@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 6 Sep 2015 09:54:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287499 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Sep 2015 09:54:57 -0000 Author: mav Date: Sun Sep 6 09:54:56 2015 New Revision: 287499 URL: https://svnweb.freebsd.org/changeset/base/287499 Log: Move setting of media parameters inside open routines. This is preparation for possibility to open/close media several times per LUN life cycle. While there, rename variables to reduce confusion. As additional bonus this allows to open read-only media, such as ZFS snapshots. Modified: head/sys/cam/ctl/ctl.c head/sys/cam/ctl/ctl_backend.h head/sys/cam/ctl/ctl_backend_block.c head/sys/cam/ctl/ctl_backend_ramdisk.c head/sys/cam/ctl/ctl_private.h Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Sun Sep 6 09:41:08 2015 (r287498) +++ head/sys/cam/ctl/ctl.c Sun Sep 6 09:54:56 2015 (r287499) @@ -4001,7 +4001,7 @@ ctl_alloc_lun(struct ctl_softc *ctl_soft struct ctl_lun *nlun, *lun; struct scsi_vpd_id_descriptor *desc; struct scsi_vpd_id_t10 *t10id; - const char *eui, *naa, *scsiname, *vendor, *value; + const char *eui, *naa, *scsiname, *vendor; int lun_number, i, lun_malloced; int devidlen, idlen1, idlen2 = 0, len; @@ -4167,21 +4167,6 @@ ctl_alloc_lun(struct ctl_softc *ctl_soft if (be_lun->flags & CTL_LUN_FLAG_PRIMARY) lun->flags |= CTL_LUN_PRIMARY_SC; - value = ctl_get_opt(&be_lun->options, "readonly"); - if (value != NULL && strcmp(value, "on") == 0) - lun->flags |= CTL_LUN_READONLY; - - lun->serseq = CTL_LUN_SERSEQ_OFF; - if (be_lun->flags & CTL_LUN_FLAG_SERSEQ_READ) - lun->serseq = CTL_LUN_SERSEQ_READ; - value = ctl_get_opt(&be_lun->options, "serseq"); - if (value != NULL && strcmp(value, "on") == 0) - lun->serseq = CTL_LUN_SERSEQ_ON; - else if (value != NULL && strcmp(value, "read") == 0) - lun->serseq = CTL_LUN_SERSEQ_READ; - else if (value != NULL && strcmp(value, "off") == 0) - lun->serseq = CTL_LUN_SERSEQ_OFF; - lun->ctl_softc = ctl_softc; #ifdef CTL_TIME_IO lun->last_busy = getsbinuptime(); @@ -6274,7 +6259,7 @@ ctl_mode_sense(struct ctl_scsiio *ctsio) header->datalen = MIN(total_len - 1, 254); if (control_dev == 0) { header->dev_specific = 0x10; /* DPOFUA */ - if ((lun->flags & CTL_LUN_READONLY) || + if ((lun->be_lun->flags & CTL_LUN_FLAG_READONLY) || (lun->mode_pages.control_page[CTL_PAGE_CURRENT] .eca_and_aen & SCP_SWP) != 0) header->dev_specific |= 0x80; /* WP */ @@ -6297,7 +6282,7 @@ ctl_mode_sense(struct ctl_scsiio *ctsio) scsi_ulto2b(datalen, header->datalen); if (control_dev == 0) { header->dev_specific = 0x10; /* DPOFUA */ - if ((lun->flags & CTL_LUN_READONLY) || + if ((lun->be_lun->flags & CTL_LUN_FLAG_READONLY) || (lun->mode_pages.control_page[CTL_PAGE_CURRENT] .eca_and_aen & SCP_SWP) != 0) header->dev_specific |= 0x80; /* WP */ @@ -10530,15 +10515,16 @@ ctl_check_for_blockage(struct ctl_lun *l return (CTL_ACTION_BLOCK); case CTL_SER_EXTENT: return (ctl_extent_check(ooa_io, pending_io, - (lun->serseq == CTL_LUN_SERSEQ_ON))); + (lun->be_lun && lun->be_lun->serseq == CTL_LUN_SERSEQ_ON))); case CTL_SER_EXTENTOPT: if ((lun->mode_pages.control_page[CTL_PAGE_CURRENT].queue_flags & SCP_QUEUE_ALG_MASK) != SCP_QUEUE_ALG_UNRESTRICTED) return (ctl_extent_check(ooa_io, pending_io, - (lun->serseq == CTL_LUN_SERSEQ_ON))); + (lun->be_lun && + lun->be_lun->serseq == CTL_LUN_SERSEQ_ON))); return (CTL_ACTION_PASS); case CTL_SER_EXTENTSEQ: - if (lun->serseq != CTL_LUN_SERSEQ_OFF) + if (lun->be_lun && lun->be_lun->serseq != CTL_LUN_SERSEQ_OFF) return (ctl_extent_check_seq(ooa_io, pending_io)); return (CTL_ACTION_PASS); case CTL_SER_PASS: @@ -10765,7 +10751,8 @@ ctl_scsiio_lun_check(struct ctl_lun *lun } if (entry->pattern & CTL_LUN_PAT_WRITE) { - if (lun->flags & CTL_LUN_READONLY) { + if (lun->be_lun && + lun->be_lun->flags & CTL_LUN_FLAG_READONLY) { ctl_set_sense(ctsio, /*current_error*/ 1, /*sense_key*/ SSD_KEY_DATA_PROTECT, /*asc*/ 0x27, /*ascq*/ 0x01, SSD_ELEM_NONE); Modified: head/sys/cam/ctl/ctl_backend.h ============================================================================== --- head/sys/cam/ctl/ctl_backend.h Sun Sep 6 09:41:08 2015 (r287498) +++ head/sys/cam/ctl/ctl_backend.h Sun Sep 6 09:54:56 2015 (r287499) @@ -86,9 +86,15 @@ typedef enum { CTL_LUN_FLAG_DEV_TYPE = 0x40, CTL_LUN_FLAG_UNMAP = 0x80, CTL_LUN_FLAG_OFFLINE = 0x100, - CTL_LUN_FLAG_SERSEQ_READ = 0x200 + CTL_LUN_FLAG_READONLY = 0x200 } ctl_backend_lun_flags; +typedef enum { + CTL_LUN_SERSEQ_OFF, + CTL_LUN_SERSEQ_READ, + CTL_LUN_SERSEQ_ON +} ctl_lun_serseq; + #ifdef _KERNEL #define CTL_BACKEND_DECLARE(name, driver) \ @@ -195,6 +201,7 @@ typedef void (*be_lun_config_t)(void *be struct ctl_be_lun { uint8_t lun_type; /* passed to CTL */ ctl_backend_lun_flags flags; /* passed to CTL */ + ctl_lun_serseq serseq; /* passed to CTL */ void *be_lun; /* passed to CTL */ uint64_t maxlba; /* passed to CTL */ uint32_t blocksize; /* passed to CTL */ Modified: head/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- head/sys/cam/ctl/ctl_backend_block.c Sun Sep 6 09:41:08 2015 (r287498) +++ head/sys/cam/ctl/ctl_backend_block.c Sun Sep 6 09:54:56 2015 (r287499) @@ -116,7 +116,6 @@ typedef enum { CTL_BE_BLOCK_LUN_UNCONFIGURED = 0x01, CTL_BE_BLOCK_LUN_CONFIG_ERR = 0x02, CTL_BE_BLOCK_LUN_WAITING = 0x04, - CTL_BE_BLOCK_LUN_MULTI_THREAD = 0x08 } ctl_be_block_lun_flags; typedef enum { @@ -167,18 +166,11 @@ struct ctl_be_block_lun { uma_zone_t lun_zone; uint64_t size_blocks; uint64_t size_bytes; - uint32_t blocksize; - uint16_t pblockexp; - uint16_t pblockoff; - uint16_t ublockexp; - uint16_t ublockoff; - uint32_t atomicblock; - uint32_t opttxferlen; struct ctl_be_block_softc *softc; struct devstat *disk_stats; ctl_be_block_lun_flags flags; STAILQ_ENTRY(ctl_be_block_lun) links; - struct ctl_be_lun ctl_be_lun; + struct ctl_be_lun cbe_lun; struct taskqueue *io_taskqueue; struct task io_task; int num_threads; @@ -768,7 +760,7 @@ ctl_be_block_gls_file(struct ctl_be_bloc DPRINTF("entered\n"); - off = roff = ((off_t)lbalen->lba) * be_lun->blocksize; + off = roff = ((off_t)lbalen->lba) * be_lun->cbe_lun.blocksize; vn_lock(be_lun->vn, LK_SHARED | LK_RETRY); error = VOP_IOCTL(be_lun->vn, FIOSEEKHOLE, &off, 0, curthread->td_ucred, curthread); @@ -788,8 +780,8 @@ ctl_be_block_gls_file(struct ctl_be_bloc data = (struct scsi_get_lba_status_data *)io->scsiio.kern_data_ptr; scsi_u64to8b(lbalen->lba, data->descr[0].addr); - scsi_ulto4b(MIN(UINT32_MAX, off / be_lun->blocksize - lbalen->lba), - data->descr[0].length); + scsi_ulto4b(MIN(UINT32_MAX, off / be_lun->cbe_lun.blocksize - + lbalen->lba), data->descr[0].length); data->descr[0].status = status; ctl_complete_beio(beio); @@ -810,14 +802,14 @@ ctl_be_block_getattr_file(struct ctl_be_ if (strcmp(attrname, "blocksused") == 0) { error = VOP_GETATTR(be_lun->vn, &vattr, curthread->td_ucred); if (error == 0) - val = vattr.va_bytes / be_lun->blocksize; + val = vattr.va_bytes / be_lun->cbe_lun.blocksize; } if (strcmp(attrname, "blocksavail") == 0 && (be_lun->vn->v_iflag & VI_DOOMED) == 0) { error = VFS_STATFS(be_lun->vn->v_mount, &statfs); if (error == 0) val = statfs.f_bavail * statfs.f_bsize / - be_lun->blocksize; + be_lun->cbe_lun.blocksize; } VOP_UNLOCK(be_lun->vn, 0); return (val); @@ -928,7 +920,7 @@ ctl_be_block_gls_zvol(struct ctl_be_bloc DPRINTF("entered\n"); - off = roff = ((off_t)lbalen->lba) * be_lun->blocksize; + off = roff = ((off_t)lbalen->lba) * be_lun->cbe_lun.blocksize; error = (*dev_data->csw->d_ioctl)(dev_data->cdev, FIOSEEKHOLE, (caddr_t)&off, FREAD, curthread); if (error == 0 && off > roff) @@ -946,8 +938,8 @@ ctl_be_block_gls_zvol(struct ctl_be_bloc data = (struct scsi_get_lba_status_data *)io->scsiio.kern_data_ptr; scsi_u64to8b(lbalen->lba, data->descr[0].addr); - scsi_ulto4b(MIN(UINT32_MAX, off / be_lun->blocksize - lbalen->lba), - data->descr[0].length); + scsi_ulto4b(MIN(UINT32_MAX, off / be_lun->cbe_lun.blocksize - + lbalen->lba), data->descr[0].length); data->descr[0].status = status; ctl_complete_beio(beio); @@ -1003,7 +995,7 @@ ctl_be_block_unmap_dev_range(struct ctl_ uint64_t maxlen; dev_data = &be_lun->backend.dev; - maxlen = LONG_MAX - (LONG_MAX % be_lun->blocksize); + maxlen = LONG_MAX - (LONG_MAX % be_lun->cbe_lun.blocksize); while (len > 0) { bio = g_alloc_bio(); bio->bio_cmd = BIO_DELETE; @@ -1013,7 +1005,7 @@ ctl_be_block_unmap_dev_range(struct ctl_ bio->bio_data = 0; bio->bio_done = ctl_be_block_biodone; bio->bio_caller1 = beio; - bio->bio_pblkno = off / be_lun->blocksize; + bio->bio_pblkno = off / be_lun->cbe_lun.blocksize; off += bio->bio_length; len -= bio->bio_length; @@ -1055,11 +1047,11 @@ ctl_be_block_unmap_dev(struct ctl_be_blo end = buf + ptrlen->len / sizeof(*buf); for (; buf < end; buf++) { len = (uint64_t)scsi_4btoul(buf->length) * - be_lun->blocksize; + be_lun->cbe_lun.blocksize; beio->io_len += len; ctl_be_block_unmap_dev_range(be_lun, beio, - scsi_8btou64(buf->lba) * be_lun->blocksize, len, - (end - buf < 2) ? TRUE : FALSE); + scsi_8btou64(buf->lba) * be_lun->cbe_lun.blocksize, + len, (end - buf < 2) ? TRUE : FALSE); } } else ctl_be_block_unmap_dev_range(be_lun, beio, @@ -1111,7 +1103,7 @@ ctl_be_block_dispatch_dev(struct ctl_be_ bio->bio_offset = cur_offset; bio->bio_data = cur_ptr; bio->bio_done = ctl_be_block_biodone; - bio->bio_pblkno = cur_offset / be_lun->blocksize; + bio->bio_pblkno = cur_offset / be_lun->cbe_lun.blocksize; cur_offset += bio->bio_length; cur_ptr += bio->bio_length; @@ -1158,6 +1150,7 @@ static void ctl_be_block_cw_dispatch_sync(struct ctl_be_block_lun *be_lun, union ctl_io *io) { + struct ctl_be_lun *cbe_lun = &be_lun->cbe_lun; struct ctl_be_block_io *beio; struct ctl_lba_len_flags *lbalen; @@ -1165,8 +1158,8 @@ ctl_be_block_cw_dispatch_sync(struct ctl beio = (struct ctl_be_block_io *)PRIV(io)->ptr; lbalen = (struct ctl_lba_len_flags *)&io->io_hdr.ctl_private[CTL_PRIV_LBA_LEN]; - beio->io_len = lbalen->len * be_lun->blocksize; - beio->io_offset = lbalen->lba * be_lun->blocksize; + beio->io_len = lbalen->len * cbe_lun->blocksize; + beio->io_offset = lbalen->lba * cbe_lun->blocksize; beio->io_arg = (lbalen->flags & SSC_IMMED) != 0; beio->bio_cmd = BIO_FLUSH; beio->ds_trans_type = DEVSTAT_NO_DATA; @@ -1195,6 +1188,7 @@ static void ctl_be_block_cw_dispatch_ws(struct ctl_be_block_lun *be_lun, union ctl_io *io) { + struct ctl_be_lun *cbe_lun = &be_lun->cbe_lun; struct ctl_be_block_io *beio; struct ctl_lba_len_flags *lbalen; uint64_t len_left, lba; @@ -1221,8 +1215,8 @@ ctl_be_block_cw_dispatch_ws(struct ctl_b } if (lbalen->flags & (SWS_UNMAP | SWS_ANCHOR)) { - beio->io_offset = lbalen->lba * be_lun->blocksize; - beio->io_len = (uint64_t)lbalen->len * be_lun->blocksize; + beio->io_offset = lbalen->lba * cbe_lun->blocksize; + beio->io_len = (uint64_t)lbalen->len * cbe_lun->blocksize; beio->bio_cmd = BIO_DELETE; beio->ds_trans_type = DEVSTAT_FREE; @@ -1236,27 +1230,27 @@ ctl_be_block_cw_dispatch_ws(struct ctl_b DPRINTF("WRITE SAME at LBA %jx len %u\n", (uintmax_t)lbalen->lba, lbalen->len); - pb = be_lun->blocksize << be_lun->pblockexp; - if (be_lun->pblockoff > 0) - pbo = pb - be_lun->blocksize * be_lun->pblockoff; + pb = cbe_lun->blocksize << be_lun->cbe_lun.pblockexp; + if (be_lun->cbe_lun.pblockoff > 0) + pbo = pb - cbe_lun->blocksize * be_lun->cbe_lun.pblockoff; else pbo = 0; - len_left = (uint64_t)lbalen->len * be_lun->blocksize; + len_left = (uint64_t)lbalen->len * cbe_lun->blocksize; for (i = 0, lba = 0; i < CTLBLK_MAX_SEGS && len_left > 0; i++) { /* * Setup the S/G entry for this chunk. */ seglen = MIN(CTLBLK_MAX_SEG, len_left); - if (pb > be_lun->blocksize) { - adj = ((lbalen->lba + lba) * be_lun->blocksize + + if (pb > cbe_lun->blocksize) { + adj = ((lbalen->lba + lba) * cbe_lun->blocksize + seglen - pbo) % pb; if (seglen > adj) seglen -= adj; else - seglen -= seglen % be_lun->blocksize; + seglen -= seglen % cbe_lun->blocksize; } else - seglen -= seglen % be_lun->blocksize; + seglen -= seglen % cbe_lun->blocksize; beio->sg_segs[i].len = seglen; beio->sg_segs[i].addr = uma_zalloc(be_lun->lun_zone, M_WAITOK); @@ -1268,16 +1262,16 @@ ctl_be_block_cw_dispatch_ws(struct ctl_b buf = beio->sg_segs[i].addr; end = buf + seglen; - for (; buf < end; buf += be_lun->blocksize) { - memcpy(buf, io->scsiio.kern_data_ptr, be_lun->blocksize); + for (; buf < end; buf += cbe_lun->blocksize) { + memcpy(buf, io->scsiio.kern_data_ptr, cbe_lun->blocksize); if (lbalen->flags & SWS_LBDATA) scsi_ulto4b(lbalen->lba + lba, buf); lba++; } } - beio->io_offset = lbalen->lba * be_lun->blocksize; - beio->io_len = lba * be_lun->blocksize; + beio->io_offset = lbalen->lba * cbe_lun->blocksize; + beio->io_len = lba * cbe_lun->blocksize; /* We can not do all in one run. Correct and schedule rerun. */ if (len_left > 0) { @@ -1462,6 +1456,7 @@ static void ctl_be_block_dispatch(struct ctl_be_block_lun *be_lun, union ctl_io *io) { + struct ctl_be_lun *cbe_lun = &be_lun->cbe_lun; struct ctl_be_block_io *beio; struct ctl_be_block_softc *softc; struct ctl_lba_len_flags *lbalen; @@ -1516,9 +1511,9 @@ ctl_be_block_dispatch(struct ctl_be_bloc lbas = CTLBLK_HALF_IO_SIZE; else lbas = CTLBLK_MAX_IO_SIZE; - lbas = MIN(lbalen->len - bptrlen->len, lbas / be_lun->blocksize); - beio->io_offset = (lbalen->lba + bptrlen->len) * be_lun->blocksize; - beio->io_len = lbas * be_lun->blocksize; + lbas = MIN(lbalen->len - bptrlen->len, lbas / cbe_lun->blocksize); + beio->io_offset = (lbalen->lba + bptrlen->len) * cbe_lun->blocksize; + beio->io_len = lbas * cbe_lun->blocksize; bptrlen->len += lbas; for (i = 0, len_left = beio->io_len; len_left > 0; i++) { @@ -1663,13 +1658,13 @@ static int ctl_be_block_submit(union ctl_io *io) { struct ctl_be_block_lun *be_lun; - struct ctl_be_lun *ctl_be_lun; + struct ctl_be_lun *cbe_lun; DPRINTF("entered\n"); - ctl_be_lun = (struct ctl_be_lun *)io->io_hdr.ctl_private[ + cbe_lun = (struct ctl_be_lun *)io->io_hdr.ctl_private[ CTL_PRIV_BACKEND_LUN].ptr; - be_lun = (struct ctl_be_block_lun *)ctl_be_lun->be_lun; + be_lun = (struct ctl_be_block_lun *)cbe_lun->be_lun; /* * Make sure we only get SCSI I/O. @@ -1739,6 +1734,7 @@ ctl_be_block_ioctl(struct cdev *dev, u_l static int ctl_be_block_open_file(struct ctl_be_block_lun *be_lun, struct ctl_lun_req *req) { + struct ctl_be_lun *cbe_lun; struct ctl_be_block_filedata *file_data; struct ctl_lun_create_params *params; char *value; @@ -1747,6 +1743,7 @@ ctl_be_block_open_file(struct ctl_be_blo int error; error = 0; + cbe_lun = &be_lun->cbe_lun; file_data = &be_lun->backend.file; params = &be_lun->params; @@ -1755,6 +1752,8 @@ ctl_be_block_open_file(struct ctl_be_blo be_lun->lun_flush = ctl_be_block_flush_file; be_lun->get_lba_status = ctl_be_block_gls_file; be_lun->getattr = ctl_be_block_getattr_file; + be_lun->unmap = NULL; + cbe_lun->flags &= ~CTL_LUN_FLAG_UNMAP; error = VOP_GETATTR(be_lun->vn, &vattr, curthread->td_ucred); if (error != 0) { @@ -1779,19 +1778,11 @@ ctl_be_block_open_file(struct ctl_be_blo } } - file_data->cred = crhold(curthread->td_ucred); if (params->lun_size_bytes != 0) be_lun->size_bytes = params->lun_size_bytes; else be_lun->size_bytes = vattr.va_size; - /* - * We set the multi thread flag for file operations because all - * filesystems (in theory) are capable of allowing multiple readers - * of a file at once. So we want to get the maximum possible - * concurrency. - */ - be_lun->flags |= CTL_BE_BLOCK_LUN_MULTI_THREAD; /* * For files we can use any logical block size. Prefer 512 bytes @@ -1800,59 +1791,63 @@ ctl_be_block_open_file(struct ctl_be_blo * logical block size -- report it as physical block size. */ if (params->blocksize_bytes != 0) - be_lun->blocksize = params->blocksize_bytes; + cbe_lun->blocksize = params->blocksize_bytes; else - be_lun->blocksize = 512; + cbe_lun->blocksize = 512; + be_lun->size_blocks = be_lun->size_bytes / cbe_lun->blocksize; + cbe_lun->maxlba = (be_lun->size_blocks == 0) ? + 0 : (be_lun->size_blocks - 1); us = ps = vattr.va_blocksize; uo = po = 0; - value = ctl_get_opt(&be_lun->ctl_be_lun.options, "pblocksize"); + value = ctl_get_opt(&cbe_lun->options, "pblocksize"); if (value != NULL) ctl_expand_number(value, &ps); - value = ctl_get_opt(&be_lun->ctl_be_lun.options, "pblockoffset"); + value = ctl_get_opt(&cbe_lun->options, "pblockoffset"); if (value != NULL) ctl_expand_number(value, &po); - pss = ps / be_lun->blocksize; - pos = po / be_lun->blocksize; - if ((pss > 0) && (pss * be_lun->blocksize == ps) && (pss >= pos) && - ((pss & (pss - 1)) == 0) && (pos * be_lun->blocksize == po)) { - be_lun->pblockexp = fls(pss) - 1; - be_lun->pblockoff = (pss - pos) % pss; + pss = ps / cbe_lun->blocksize; + pos = po / cbe_lun->blocksize; + if ((pss > 0) && (pss * cbe_lun->blocksize == ps) && (pss >= pos) && + ((pss & (pss - 1)) == 0) && (pos * cbe_lun->blocksize == po)) { + cbe_lun->pblockexp = fls(pss) - 1; + cbe_lun->pblockoff = (pss - pos) % pss; } - value = ctl_get_opt(&be_lun->ctl_be_lun.options, "ublocksize"); + value = ctl_get_opt(&cbe_lun->options, "ublocksize"); if (value != NULL) ctl_expand_number(value, &us); - value = ctl_get_opt(&be_lun->ctl_be_lun.options, "ublockoffset"); + value = ctl_get_opt(&cbe_lun->options, "ublockoffset"); if (value != NULL) ctl_expand_number(value, &uo); - uss = us / be_lun->blocksize; - uos = uo / be_lun->blocksize; - if ((uss > 0) && (uss * be_lun->blocksize == us) && (uss >= uos) && - ((uss & (uss - 1)) == 0) && (uos * be_lun->blocksize == uo)) { - be_lun->ublockexp = fls(uss) - 1; - be_lun->ublockoff = (uss - uos) % uss; + uss = us / cbe_lun->blocksize; + uos = uo / cbe_lun->blocksize; + if ((uss > 0) && (uss * cbe_lun->blocksize == us) && (uss >= uos) && + ((uss & (uss - 1)) == 0) && (uos * cbe_lun->blocksize == uo)) { + cbe_lun->ublockexp = fls(uss) - 1; + cbe_lun->ublockoff = (uss - uos) % uss; } /* * Sanity check. The media size has to be at least one * sector long. */ - if (be_lun->size_bytes < be_lun->blocksize) { + if (be_lun->size_bytes < cbe_lun->blocksize) { error = EINVAL; snprintf(req->error_str, sizeof(req->error_str), "file %s size %ju < block size %u", be_lun->dev_path, - (uintmax_t)be_lun->size_bytes, be_lun->blocksize); + (uintmax_t)be_lun->size_bytes, cbe_lun->blocksize); } - be_lun->opttxferlen = CTLBLK_MAX_IO_SIZE / be_lun->blocksize; + cbe_lun->opttxferlen = CTLBLK_MAX_IO_SIZE / cbe_lun->blocksize; return (error); } static int ctl_be_block_open_dev(struct ctl_be_block_lun *be_lun, struct ctl_lun_req *req) { + struct ctl_be_lun *cbe_lun = &be_lun->cbe_lun; struct ctl_lun_create_params *params; struct vattr vattr; struct cdev *dev; @@ -1875,6 +1870,7 @@ ctl_be_block_open_dev(struct ctl_be_bloc atomic = maxio = CTLBLK_MAX_IO_SIZE; } else { be_lun->dispatch = ctl_be_block_dispatch_dev; + be_lun->get_lba_status = NULL; atomic = 0; maxio = be_lun->backend.dev.cdev->si_iosize_max; if (maxio <= 0) @@ -1884,6 +1880,7 @@ ctl_be_block_open_dev(struct ctl_be_bloc } be_lun->lun_flush = ctl_be_block_flush_dev; be_lun->getattr = ctl_be_block_getattr_dev; + be_lun->unmap = ctl_be_block_unmap_dev; error = VOP_GETATTR(be_lun->vn, &vattr, NOCRED); if (error) { @@ -1920,7 +1917,7 @@ ctl_be_block_open_dev(struct ctl_be_bloc if ((params->blocksize_bytes != 0) && (params->blocksize_bytes >= tmp)) { if (params->blocksize_bytes % tmp == 0) { - be_lun->blocksize = params->blocksize_bytes; + cbe_lun->blocksize = params->blocksize_bytes; } else { snprintf(req->error_str, sizeof(req->error_str), "requested blocksize %u is not an even " @@ -1935,7 +1932,7 @@ ctl_be_block_open_dev(struct ctl_be_bloc "blocksize %u", params->blocksize_bytes, tmp); return (EINVAL); } else - be_lun->blocksize = tmp; + cbe_lun->blocksize = tmp; error = devsw->d_ioctl(dev, DIOCGMEDIASIZE, (caddr_t)&otmp, FREAD, curthread); @@ -1960,6 +1957,9 @@ ctl_be_block_open_dev(struct ctl_be_bloc be_lun->size_bytes = params->lun_size_bytes; } else be_lun->size_bytes = otmp; + be_lun->size_blocks = be_lun->size_bytes / cbe_lun->blocksize; + cbe_lun->maxlba = (be_lun->size_blocks == 0) ? + 0 : (be_lun->size_blocks - 1); error = devsw->d_ioctl(dev, DIOCGSTRIPESIZE, (caddr_t)&ps, FREAD, curthread); @@ -1974,36 +1974,36 @@ ctl_be_block_open_dev(struct ctl_be_bloc us = ps; uo = po; - value = ctl_get_opt(&be_lun->ctl_be_lun.options, "pblocksize"); + value = ctl_get_opt(&cbe_lun->options, "pblocksize"); if (value != NULL) ctl_expand_number(value, &ps); - value = ctl_get_opt(&be_lun->ctl_be_lun.options, "pblockoffset"); + value = ctl_get_opt(&cbe_lun->options, "pblockoffset"); if (value != NULL) ctl_expand_number(value, &po); - pss = ps / be_lun->blocksize; - pos = po / be_lun->blocksize; - if ((pss > 0) && (pss * be_lun->blocksize == ps) && (pss >= pos) && - ((pss & (pss - 1)) == 0) && (pos * be_lun->blocksize == po)) { - be_lun->pblockexp = fls(pss) - 1; - be_lun->pblockoff = (pss - pos) % pss; + pss = ps / cbe_lun->blocksize; + pos = po / cbe_lun->blocksize; + if ((pss > 0) && (pss * cbe_lun->blocksize == ps) && (pss >= pos) && + ((pss & (pss - 1)) == 0) && (pos * cbe_lun->blocksize == po)) { + cbe_lun->pblockexp = fls(pss) - 1; + cbe_lun->pblockoff = (pss - pos) % pss; } - value = ctl_get_opt(&be_lun->ctl_be_lun.options, "ublocksize"); + value = ctl_get_opt(&cbe_lun->options, "ublocksize"); if (value != NULL) ctl_expand_number(value, &us); - value = ctl_get_opt(&be_lun->ctl_be_lun.options, "ublockoffset"); + value = ctl_get_opt(&cbe_lun->options, "ublockoffset"); if (value != NULL) ctl_expand_number(value, &uo); - uss = us / be_lun->blocksize; - uos = uo / be_lun->blocksize; - if ((uss > 0) && (uss * be_lun->blocksize == us) && (uss >= uos) && - ((uss & (uss - 1)) == 0) && (uos * be_lun->blocksize == uo)) { - be_lun->ublockexp = fls(uss) - 1; - be_lun->ublockoff = (uss - uos) % uss; + uss = us / cbe_lun->blocksize; + uos = uo / cbe_lun->blocksize; + if ((uss > 0) && (uss * cbe_lun->blocksize == us) && (uss >= uos) && + ((uss & (uss - 1)) == 0) && (uos * cbe_lun->blocksize == uo)) { + cbe_lun->ublockexp = fls(uss) - 1; + cbe_lun->ublockoff = (uss - uos) % uss; } - be_lun->atomicblock = atomic / be_lun->blocksize; - be_lun->opttxferlen = maxio / be_lun->blocksize; + cbe_lun->atomicblock = atomic / cbe_lun->blocksize; + cbe_lun->opttxferlen = maxio / cbe_lun->blocksize; if (be_lun->dispatch == ctl_be_block_dispatch_zvol) { unmap = 1; @@ -2016,11 +2016,13 @@ ctl_be_block_open_dev(struct ctl_be_bloc (caddr_t)&arg, FREAD, curthread); unmap = (error == 0) ? arg.value.i : 0; } - value = ctl_get_opt(&be_lun->ctl_be_lun.options, "unmap"); + value = ctl_get_opt(&cbe_lun->options, "unmap"); if (value != NULL) unmap = (strcmp(value, "on") == 0); if (unmap) - be_lun->unmap = ctl_be_block_unmap_dev; + cbe_lun->flags |= CTL_LUN_FLAG_UNMAP; + else + cbe_lun->flags &= ~CTL_LUN_FLAG_UNMAP; return (0); } @@ -2028,10 +2030,10 @@ ctl_be_block_open_dev(struct ctl_be_bloc static int ctl_be_block_close(struct ctl_be_block_lun *be_lun) { - DROP_GIANT(); - if (be_lun->vn) { - int flags = FREAD | FWRITE; + struct ctl_be_lun *cbe_lun = &be_lun->cbe_lun; + int flags; + if (be_lun->vn) { switch (be_lun->dev_type) { case CTL_BE_BLOCK_DEV: if (be_lun->backend.dev.csw) { @@ -2050,6 +2052,9 @@ ctl_be_block_close(struct ctl_be_block_l break; } + flags = FREAD; + if ((cbe_lun->flags & CTL_LUN_FLAG_READONLY) == 0) + flags |= FWRITE; (void)vn_close(be_lun->vn, flags, NOCRED, curthread); be_lun->vn = NULL; @@ -2070,36 +2075,47 @@ ctl_be_block_close(struct ctl_be_block_l } be_lun->dev_type = CTL_BE_BLOCK_NONE; } - PICKUP_GIANT(); - return (0); } static int ctl_be_block_open(struct ctl_be_block_softc *softc, - struct ctl_be_block_lun *be_lun, struct ctl_lun_req *req) + struct ctl_be_block_lun *be_lun, struct ctl_lun_req *req) { + struct ctl_be_lun *cbe_lun = &be_lun->cbe_lun; struct nameidata nd; - int flags; - int error; + char *value; + int error, flags; - /* - * XXX KDM allow a read-only option? - */ - flags = FREAD | FWRITE; error = 0; - if (rootvnode == NULL) { snprintf(req->error_str, sizeof(req->error_str), "Root filesystem is not mounted"); return (1); } - pwd_ensure_dirs(); - again: + value = ctl_get_opt(&cbe_lun->options, "file"); + if (value == NULL) { + snprintf(req->error_str, sizeof(req->error_str), + "no file argument specified"); + return (1); + } + free(be_lun->dev_path, M_CTLBLK); + be_lun->dev_path = strdup(value, M_CTLBLK); + + flags = FREAD; + value = ctl_get_opt(&cbe_lun->options, "readonly"); + if (value == NULL || strcmp(value, "on") != 0) + flags |= FWRITE; + +again: NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, be_lun->dev_path, curthread); error = vn_open(&nd, &flags, 0, NULL); + if ((error == EROFS || error == EACCES) && (flags & FWRITE)) { + flags &= ~FWRITE; + goto again; + } if (error) { /* * This is the only reasonable guess we can make as far as @@ -2108,28 +2124,24 @@ ctl_be_block_open(struct ctl_be_block_so * full path. */ if (be_lun->dev_path[0] != '/') { - char *dev_path = "/dev/"; char *dev_name; - /* Try adding device path at beginning of name */ - dev_name = malloc(strlen(be_lun->dev_path) - + strlen(dev_path) + 1, - M_CTLBLK, M_WAITOK); - if (dev_name) { - sprintf(dev_name, "%s%s", dev_path, - be_lun->dev_path); - free(be_lun->dev_path, M_CTLBLK); - be_lun->dev_path = dev_name; - goto again; - } + asprintf(&dev_name, M_CTLBLK, "/dev/%s", + be_lun->dev_path); + free(be_lun->dev_path, M_CTLBLK); + be_lun->dev_path = dev_name; + goto again; } snprintf(req->error_str, sizeof(req->error_str), "error opening %s: %d", be_lun->dev_path, error); return (error); } + if (flags & FWRITE) + cbe_lun->flags &= ~CTL_LUN_FLAG_READONLY; + else + cbe_lun->flags |= CTL_LUN_FLAG_READONLY; NDFREE(&nd, NDF_ONLY_PNBUF); - be_lun->vn = nd.ni_vp; /* We only support disks and files. */ @@ -2146,12 +2158,23 @@ ctl_be_block_open(struct ctl_be_block_so if (error != 0) ctl_be_block_close(be_lun); + cbe_lun->serseq = CTL_LUN_SERSEQ_OFF; + if (be_lun->dispatch != ctl_be_block_dispatch_dev) + cbe_lun->serseq = CTL_LUN_SERSEQ_READ; + value = ctl_get_opt(&cbe_lun->options, "serseq"); + if (value != NULL && strcmp(value, "on") == 0) + cbe_lun->serseq = CTL_LUN_SERSEQ_ON; + else if (value != NULL && strcmp(value, "read") == 0) + cbe_lun->serseq = CTL_LUN_SERSEQ_READ; + else if (value != NULL && strcmp(value, "off") == 0) + cbe_lun->serseq = CTL_LUN_SERSEQ_OFF; return (0); } static int ctl_be_block_create(struct ctl_be_block_softc *softc, struct ctl_lun_req *req) { + struct ctl_be_lun *cbe_lun; struct ctl_be_block_lun *be_lun; struct ctl_lun_create_params *params; char num_thread_str[16]; @@ -2164,10 +2187,9 @@ ctl_be_block_create(struct ctl_be_block_ retval = 0; req->status = CTL_LUN_OK; - num_threads = cbb_num_threads; - be_lun = malloc(sizeof(*be_lun), M_CTLBLK, M_ZERO | M_WAITOK); - + cbe_lun = &be_lun->cbe_lun; + cbe_lun->be_lun = be_lun; be_lun->params = req->reqdata.create; be_lun->softc = softc; STAILQ_INIT(&be_lun->input_queue); @@ -2177,12 +2199,10 @@ ctl_be_block_create(struct ctl_be_block_ sprintf(be_lun->lunname, "cblk%d", softc->num_luns); mtx_init(&be_lun->io_lock, "cblk io lock", NULL, MTX_DEF); mtx_init(&be_lun->queue_lock, "cblk queue lock", NULL, MTX_DEF); - ctl_init_opts(&be_lun->ctl_be_lun.options, + ctl_init_opts(&cbe_lun->options, req->num_be_args, req->kern_be_args); - be_lun->lun_zone = uma_zcreate(be_lun->lunname, CTLBLK_MAX_SEG, NULL, NULL, NULL, NULL, /*align*/ 0, /*flags*/0); - if (be_lun->lun_zone == NULL) { snprintf(req->error_str, sizeof(req->error_str), "error allocating UMA zone"); @@ -2190,46 +2210,29 @@ ctl_be_block_create(struct ctl_be_block_ } if (params->flags & CTL_LUN_FLAG_DEV_TYPE) - be_lun->ctl_be_lun.lun_type = params->device_type; + cbe_lun->lun_type = params->device_type; else - be_lun->ctl_be_lun.lun_type = T_DIRECT; + cbe_lun->lun_type = T_DIRECT; + be_lun->flags = CTL_BE_BLOCK_LUN_UNCONFIGURED; + cbe_lun->flags = CTL_LUN_FLAG_PRIMARY; - if (be_lun->ctl_be_lun.lun_type == T_DIRECT) { - value = ctl_get_opt(&be_lun->ctl_be_lun.options, "file"); - if (value == NULL) { - snprintf(req->error_str, sizeof(req->error_str), - "no file argument specified"); - goto bailout_error; - } - be_lun->dev_path = strdup(value, M_CTLBLK); + if (cbe_lun->lun_type == T_DIRECT) { be_lun->size_bytes = params->lun_size_bytes; if (params->blocksize_bytes != 0) - be_lun->blocksize = params->blocksize_bytes; + cbe_lun->blocksize = params->blocksize_bytes; else - be_lun->blocksize = 512; + cbe_lun->blocksize = 512; + be_lun->size_blocks = be_lun->size_bytes / cbe_lun->blocksize; + cbe_lun->maxlba = (be_lun->size_blocks == 0) ? + 0 : (be_lun->size_blocks - 1); retval = ctl_be_block_open(softc, be_lun, req); - be_lun->size_blocks = be_lun->size_bytes / be_lun->blocksize; if (retval != 0) { retval = 0; req->status = CTL_LUN_WARNING; } + num_threads = cbb_num_threads; } else { - /* - * For processor devices, we don't have any size. - */ - be_lun->blocksize = 0; - be_lun->pblockexp = 0; - be_lun->pblockoff = 0; - be_lun->ublockexp = 0; - be_lun->ublockoff = 0; - be_lun->size_blocks = 0; - be_lun->size_bytes = 0; - be_lun->ctl_be_lun.maxlba = 0; - - /* - * Default to just 1 thread for processor devices. - */ num_threads = 1; } @@ -2237,7 +2240,7 @@ ctl_be_block_create(struct ctl_be_block_ * XXX This searching loop might be refactored to be combined with * the loop above, */ - value = ctl_get_opt(&be_lun->ctl_be_lun.options, "num_threads"); + value = ctl_get_opt(&cbe_lun->options, "num_threads"); if (value != NULL) { tmp_num_threads = strtol(value, NULL, 0); @@ -2255,67 +2258,46 @@ ctl_be_block_create(struct ctl_be_block_ num_threads = tmp_num_threads; } - be_lun->flags = CTL_BE_BLOCK_LUN_UNCONFIGURED; - be_lun->ctl_be_lun.flags = CTL_LUN_FLAG_PRIMARY; if (be_lun->vn == NULL) - be_lun->ctl_be_lun.flags |= CTL_LUN_FLAG_OFFLINE; - if (be_lun->unmap != NULL) - be_lun->ctl_be_lun.flags |= CTL_LUN_FLAG_UNMAP; - if (be_lun->dispatch != ctl_be_block_dispatch_dev) - be_lun->ctl_be_lun.flags |= CTL_LUN_FLAG_SERSEQ_READ; - be_lun->ctl_be_lun.be_lun = be_lun; - be_lun->ctl_be_lun.maxlba = (be_lun->size_blocks == 0) ? - 0 : (be_lun->size_blocks - 1); - be_lun->ctl_be_lun.blocksize = be_lun->blocksize; - be_lun->ctl_be_lun.pblockexp = be_lun->pblockexp; - be_lun->ctl_be_lun.pblockoff = be_lun->pblockoff; - be_lun->ctl_be_lun.ublockexp = be_lun->ublockexp; - be_lun->ctl_be_lun.ublockoff = be_lun->ublockoff; - be_lun->ctl_be_lun.atomicblock = be_lun->atomicblock; - be_lun->ctl_be_lun.opttxferlen = be_lun->opttxferlen; + cbe_lun->flags |= CTL_LUN_FLAG_OFFLINE; /* Tell the user the blocksize we ended up using */ params->lun_size_bytes = be_lun->size_bytes; - params->blocksize_bytes = be_lun->blocksize; + params->blocksize_bytes = cbe_lun->blocksize; if (params->flags & CTL_LUN_FLAG_ID_REQ) { - be_lun->ctl_be_lun.req_lun_id = params->req_lun_id; - be_lun->ctl_be_lun.flags |= CTL_LUN_FLAG_ID_REQ; + cbe_lun->req_lun_id = params->req_lun_id; + cbe_lun->flags |= CTL_LUN_FLAG_ID_REQ; } else - be_lun->ctl_be_lun.req_lun_id = 0; + cbe_lun->req_lun_id = 0; - be_lun->ctl_be_lun.lun_shutdown = ctl_be_block_lun_shutdown; - be_lun->ctl_be_lun.lun_config_status = - ctl_be_block_lun_config_status; - be_lun->ctl_be_lun.be = &ctl_be_block_driver; + cbe_lun->lun_shutdown = ctl_be_block_lun_shutdown; + cbe_lun->lun_config_status = ctl_be_block_lun_config_status; + cbe_lun->be = &ctl_be_block_driver; if ((params->flags & CTL_LUN_FLAG_SERIAL_NUM) == 0) { snprintf(tmpstr, sizeof(tmpstr), "MYSERIAL%4d", softc->num_luns); - strncpy((char *)be_lun->ctl_be_lun.serial_num, tmpstr, - MIN(sizeof(be_lun->ctl_be_lun.serial_num), - sizeof(tmpstr))); + strncpy((char *)cbe_lun->serial_num, tmpstr, + MIN(sizeof(cbe_lun->serial_num), sizeof(tmpstr))); /* Tell the user what we used for a serial number */ strncpy((char *)params->serial_num, tmpstr, MIN(sizeof(params->serial_num), sizeof(tmpstr))); } else { - strncpy((char *)be_lun->ctl_be_lun.serial_num, - params->serial_num, - MIN(sizeof(be_lun->ctl_be_lun.serial_num), + strncpy((char *)cbe_lun->serial_num, params->serial_num, + MIN(sizeof(cbe_lun->serial_num), sizeof(params->serial_num))); } if ((params->flags & CTL_LUN_FLAG_DEVID) == 0) { snprintf(tmpstr, sizeof(tmpstr), "MYDEVID%4d", softc->num_luns); - strncpy((char *)be_lun->ctl_be_lun.device_id, tmpstr, - MIN(sizeof(be_lun->ctl_be_lun.device_id), - sizeof(tmpstr))); + strncpy((char *)cbe_lun->device_id, tmpstr, + MIN(sizeof(cbe_lun->device_id), sizeof(tmpstr))); /* Tell the user what we used for a device ID */ strncpy((char *)params->device_id, tmpstr, MIN(sizeof(params->device_id), sizeof(tmpstr))); } else { - strncpy((char *)be_lun->ctl_be_lun.device_id, - params->device_id, - MIN(sizeof(be_lun->ctl_be_lun.device_id), + strncpy((char *)cbe_lun->device_id, params->device_id, + MIN(sizeof(cbe_lun->device_id), sizeof(params->device_id))); } @@ -2361,7 +2343,7 @@ ctl_be_block_create(struct ctl_be_block_ mtx_unlock(&softc->lock); - retval = ctl_add_lun(&be_lun->ctl_be_lun); + retval = ctl_add_lun(&be_lun->cbe_lun); if (retval != 0) { mtx_lock(&softc->lock); STAILQ_REMOVE(&softc->lun_list, be_lun, ctl_be_block_lun, @@ -2399,15 +2381,15 @@ ctl_be_block_create(struct ctl_be_block_ mtx_unlock(&softc->lock); goto bailout_error; } else { - params->req_lun_id = be_lun->ctl_be_lun.lun_id; + params->req_lun_id = cbe_lun->lun_id; } mtx_unlock(&softc->lock); be_lun->disk_stats = devstat_new_entry("cbb", params->req_lun_id, - be_lun->blocksize, + cbe_lun->blocksize, DEVSTAT_ALL_SUPPORTED, - be_lun->ctl_be_lun.lun_type + cbe_lun->lun_type | DEVSTAT_TYPE_IF_OTHER, DEVSTAT_PRIORITY_OTHER); @@ -2423,7 +2405,7 @@ bailout_error: free(be_lun->dev_path, M_CTLBLK); if (be_lun->lun_zone != NULL) uma_zdestroy(be_lun->lun_zone); - ctl_free_opts(&be_lun->ctl_be_lun.options); + ctl_free_opts(&cbe_lun->options); mtx_destroy(&be_lun->queue_lock); mtx_destroy(&be_lun->io_lock); free(be_lun, M_CTLBLK); @@ -2445,7 +2427,7 @@ ctl_be_block_rm(struct ctl_be_block_soft be_lun = NULL; STAILQ_FOREACH(be_lun, &softc->lun_list, links) { - if (be_lun->ctl_be_lun.lun_id == params->lun_id) + if (be_lun->cbe_lun.lun_id == params->lun_id) break; } mtx_unlock(&softc->lock); @@ -2457,7 +2439,7 @@ ctl_be_block_rm(struct ctl_be_block_soft goto bailout_error; } - retval = ctl_disable_lun(&be_lun->ctl_be_lun); + retval = ctl_disable_lun(&be_lun->cbe_lun); if (retval != 0) { snprintf(req->error_str, sizeof(req->error_str), @@ -2467,7 +2449,7 @@ ctl_be_block_rm(struct ctl_be_block_soft } - retval = ctl_invalidate_lun(&be_lun->ctl_be_lun); + retval = ctl_invalidate_lun(&be_lun->cbe_lun); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sun Sep 6 11:23:05 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 019349C550C; Sun, 6 Sep 2015 11:23:05 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E4E532FB; Sun, 6 Sep 2015 11:23:04 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t86BN4Kc006520; Sun, 6 Sep 2015 11:23:04 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t86BN2lr006508; Sun, 6 Sep 2015 11:23:02 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201509061123.t86BN2lr006508@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 6 Sep 2015 11:23:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287500 - in head: sys/cam/ctl usr.sbin/ctladm usr.sbin/ctld X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Sep 2015 11:23:05 -0000 Author: mav Date: Sun Sep 6 11:23:01 2015 New Revision: 287500 URL: https://svnweb.freebsd.org/changeset/base/287500 Log: Allow LUN options modification via CTL_LUNREQ_MODIFY. Not all changes take effect, but that is a different question. Modified: head/sys/cam/ctl/ctl.h head/sys/cam/ctl/ctl_backend.c head/sys/cam/ctl/ctl_backend_block.c head/sys/cam/ctl/ctl_backend_ramdisk.c head/usr.sbin/ctladm/ctladm.8 head/usr.sbin/ctladm/ctladm.c head/usr.sbin/ctld/ctld.c head/usr.sbin/ctld/ctld.h head/usr.sbin/ctld/kernel.c Modified: head/sys/cam/ctl/ctl.h ============================================================================== --- head/sys/cam/ctl/ctl.h Sun Sep 6 09:54:56 2015 (r287499) +++ head/sys/cam/ctl/ctl.h Sun Sep 6 11:23:01 2015 (r287500) @@ -208,6 +208,8 @@ typedef STAILQ_HEAD(ctl_options, ctl_opt struct ctl_be_arg; void ctl_init_opts(ctl_options_t *opts, int num_args, struct ctl_be_arg *args); +void ctl_update_opts(ctl_options_t *opts, int num_args, + struct ctl_be_arg *args); void ctl_free_opts(ctl_options_t *opts); char * ctl_get_opt(ctl_options_t *opts, const char *name); int ctl_expand_number(const char *buf, uint64_t *num); Modified: head/sys/cam/ctl/ctl_backend.c ============================================================================== --- head/sys/cam/ctl/ctl_backend.c Sun Sep 6 09:54:56 2015 (r287499) +++ head/sys/cam/ctl/ctl_backend.c Sun Sep 6 11:23:01 2015 (r287500) @@ -185,15 +185,48 @@ ctl_init_opts(ctl_options_t *opts, int n if ((args[i].flags & CTL_BEARG_ASCII) == 0) continue; opt = malloc(sizeof(*opt), M_CTL, M_WAITOK); - opt->name = malloc(strlen(args[i].kname) + 1, M_CTL, M_WAITOK); - strcpy(opt->name, args[i].kname); - opt->value = malloc(strlen(args[i].kvalue) + 1, M_CTL, M_WAITOK); - strcpy(opt->value, args[i].kvalue); + opt->name = strdup(args[i].kname, M_CTL); + opt->value = strdup(args[i].kvalue, M_CTL); STAILQ_INSERT_TAIL(opts, opt, links); } } void +ctl_update_opts(ctl_options_t *opts, int num_args, struct ctl_be_arg *args) +{ + struct ctl_option *opt; + int i; + + for (i = 0; i < num_args; i++) { + if ((args[i].flags & CTL_BEARG_RD) == 0) + continue; + if ((args[i].flags & CTL_BEARG_ASCII) == 0) + continue; + STAILQ_FOREACH(opt, opts, links) { + if (strcmp(opt->name, args[i].kname) == 0) + break; + } + if (args[i].kvalue != NULL && + ((char *)args[i].kvalue)[0] != 0) { + if (opt) { + free(opt->value, M_CTL); + opt->value = strdup(args[i].kvalue, M_CTL); + } else { + opt = malloc(sizeof(*opt), M_CTL, M_WAITOK); + opt->name = strdup(args[i].kname, M_CTL); + opt->value = strdup(args[i].kvalue, M_CTL); + STAILQ_INSERT_TAIL(opts, opt, links); + } + } else if (opt) { + STAILQ_REMOVE(opts, opt, ctl_option, links); + free(opt->name, M_CTL); + free(opt->value, M_CTL); + free(opt, M_CTL); + } + } +} + +void ctl_free_opts(ctl_options_t *opts) { struct ctl_option *opt; Modified: head/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- head/sys/cam/ctl/ctl_backend_block.c Sun Sep 6 09:54:56 2015 (r287499) +++ head/sys/cam/ctl/ctl_backend_block.c Sun Sep 6 11:23:01 2015 (r287500) @@ -2423,9 +2423,6 @@ ctl_be_block_rm(struct ctl_be_block_soft params = &req->reqdata.rm; mtx_lock(&softc->lock); - - be_lun = NULL; - STAILQ_FOREACH(be_lun, &softc->lun_list, links) { if (be_lun->cbe_lun.lun_id == params->lun_id) break; @@ -2589,13 +2586,13 @@ ctl_be_block_modify(struct ctl_be_block_ { struct ctl_lun_modify_params *params; struct ctl_be_block_lun *be_lun; + struct ctl_be_lun *cbe_lun; uint64_t oldsize; int error; params = &req->reqdata.modify; mtx_lock(&softc->lock); - be_lun = NULL; STAILQ_FOREACH(be_lun, &softc->lun_list, links) { if (be_lun->cbe_lun.lun_id == params->lun_id) break; @@ -2608,8 +2605,11 @@ ctl_be_block_modify(struct ctl_be_block_ params->lun_id); goto bailout_error; } + cbe_lun = &be_lun->cbe_lun; - be_lun->params.lun_size_bytes = params->lun_size_bytes; + if (params->lun_size_bytes != 0) + be_lun->params.lun_size_bytes = params->lun_size_bytes; + ctl_update_opts(&cbe_lun->options, req->num_be_args, req->kern_be_args); oldsize = be_lun->size_blocks; if (be_lun->vn == NULL) @@ -2622,11 +2622,11 @@ ctl_be_block_modify(struct ctl_be_block_ error = EINVAL; if (be_lun->size_blocks != oldsize) - ctl_lun_capacity_changed(&be_lun->cbe_lun); - if ((be_lun->cbe_lun.flags & CTL_LUN_FLAG_OFFLINE) && + ctl_lun_capacity_changed(cbe_lun); + if ((cbe_lun->flags & CTL_LUN_FLAG_OFFLINE) && be_lun->vn != NULL) { - be_lun->cbe_lun.flags &= ~CTL_LUN_FLAG_OFFLINE; - ctl_lun_online(&be_lun->cbe_lun); + cbe_lun->flags &= ~CTL_LUN_FLAG_OFFLINE; + ctl_lun_online(cbe_lun); } /* Tell the user the exact size we ended up using */ Modified: head/sys/cam/ctl/ctl_backend_ramdisk.c ============================================================================== --- head/sys/cam/ctl/ctl_backend_ramdisk.c Sun Sep 6 09:54:56 2015 (r287499) +++ head/sys/cam/ctl/ctl_backend_ramdisk.c Sun Sep 6 11:23:01 2015 (r287500) @@ -73,6 +73,7 @@ typedef enum { } ctl_be_ramdisk_lun_flags; struct ctl_be_ramdisk_lun { + struct ctl_lun_create_params params; char lunname[32]; uint64_t size_bytes; uint64_t size_blocks; @@ -535,6 +536,7 @@ ctl_backend_ramdisk_create(struct ctl_be be_lun = malloc(sizeof(*be_lun), M_RAMDISK, M_ZERO | M_WAITOK); cbe_lun = &be_lun->cbe_lun; cbe_lun->be_lun = be_lun; + be_lun->params = req->reqdata.create; be_lun->softc = softc; sprintf(be_lun->lunname, "cram%d", softc->num_luns); ctl_init_opts(&cbe_lun->options, req->num_be_args, req->kern_be_args); @@ -713,13 +715,12 @@ ctl_backend_ramdisk_modify(struct ctl_be struct ctl_lun_req *req) { struct ctl_be_ramdisk_lun *be_lun; + struct ctl_be_lun *cbe_lun; struct ctl_lun_modify_params *params; uint32_t blocksize; params = &req->reqdata.modify; - be_lun = NULL; - mtx_lock(&softc->lock); STAILQ_FOREACH(be_lun, &softc->lun_list, links) { if (be_lun->cbe_lun.lun_id == params->lun_id) @@ -733,32 +734,22 @@ ctl_backend_ramdisk_modify(struct ctl_be __func__, params->lun_id); goto bailout_error; } + cbe_lun = &be_lun->cbe_lun; - if (params->lun_size_bytes == 0) { - snprintf(req->error_str, sizeof(req->error_str), - "%s: LUN size \"auto\" not supported " - "by the ramdisk backend", __func__); - goto bailout_error; - } - + if (params->lun_size_bytes != 0) + be_lun->params.lun_size_bytes = params->lun_size_bytes; + ctl_update_opts(&cbe_lun->options, req->num_be_args, req->kern_be_args); blocksize = be_lun->cbe_lun.blocksize; - if (params->lun_size_bytes < blocksize) { + if (be_lun->params.lun_size_bytes < blocksize) { snprintf(req->error_str, sizeof(req->error_str), "%s: LUN size %ju < blocksize %u", __func__, - params->lun_size_bytes, blocksize); + be_lun->params.lun_size_bytes, blocksize); goto bailout_error; } - be_lun->size_blocks = params->lun_size_bytes / blocksize; + be_lun->size_blocks = be_lun->params.lun_size_bytes / blocksize; be_lun->size_bytes = be_lun->size_blocks * blocksize; - - /* - * The maximum LBA is the size - 1. - * - * XXX: Note that this field is being updated without locking, - * which might cause problems on 32-bit architectures. - */ be_lun->cbe_lun.maxlba = be_lun->size_blocks - 1; ctl_lun_capacity_changed(&be_lun->cbe_lun); Modified: head/usr.sbin/ctladm/ctladm.8 ============================================================================== --- head/usr.sbin/ctladm/ctladm.8 Sun Sep 6 09:54:56 2015 (r287499) +++ head/usr.sbin/ctladm/ctladm.8 Sun Sep 6 11:23:01 2015 (r287500) @@ -34,7 +34,7 @@ .\" $Id: //depot/users/kenm/FreeBSD-test2/usr.sbin/ctladm/ctladm.8#3 $ .\" $FreeBSD$ .\" -.Dd June 3, 2015 +.Dd September 6, 2015 .Dt CTLADM 8 .Os .Sh NAME @@ -166,6 +166,7 @@ .Ic modify .Aq Fl b Ar backend .Aq Fl l Ar lun_id +.Op Fl o Ar name=value .Aq Fl s Ar size_bytes .Nm .Ic devlist @@ -859,6 +860,12 @@ and .Dq block . .It Fl l Ar lun_id Specify the LUN number to remove. +.It Fl o Ar name=value +Specify a backend-specific name/value pair. +Multiple +.Fl o +arguments may be specified. +Refer to the backend documentation for arguments that may be used. .It Fl s Ar size_bytes Specify the size of the LUN in bytes. For the Modified: head/usr.sbin/ctladm/ctladm.c ============================================================================== --- head/usr.sbin/ctladm/ctladm.c Sun Sep 6 09:54:56 2015 (r287499) +++ head/usr.sbin/ctladm/ctladm.c Sun Sep 6 11:23:01 2015 (r287500) @@ -183,7 +183,7 @@ static struct ctladm_opts option_table[] {"lunlist", CTLADM_CMD_LUNLIST, CTLADM_ARG_NONE, NULL}, {"lunmap", CTLADM_CMD_LUNMAP, CTLADM_ARG_NONE, "p:l:L:"}, {"modesense", CTLADM_CMD_MODESENSE, CTLADM_ARG_NEED_TL, "P:S:dlm:c:"}, - {"modify", CTLADM_CMD_MODIFY, CTLADM_ARG_NONE, "b:l:s:"}, + {"modify", CTLADM_CMD_MODIFY, CTLADM_ARG_NONE, "b:l:o:s:"}, {"port", CTLADM_CMD_PORT, CTLADM_ARG_NONE, "lo:p:qt:w:W:x"}, {"portlist", CTLADM_CMD_PORTLIST, CTLADM_ARG_NONE, "f:ilp:qvx"}, {"prin", CTLADM_CMD_PRES_IN, CTLADM_ARG_NEED_TL, "a:"}, @@ -3169,8 +3169,11 @@ cctl_modify_lun(int fd, int argc, char * uint32_t lun_id = 0; int lun_id_set = 0, lun_size_set = 0; char *backend_name = NULL; + STAILQ_HEAD(, cctl_req_option) option_list; + int num_options = 0; int retval = 0, c; + STAILQ_INIT(&option_list); while ((c = getopt(argc, argv, combinedopt)) != -1) { switch (c) { case 'b': @@ -3180,6 +3183,43 @@ cctl_modify_lun(int fd, int argc, char * lun_id = strtoul(optarg, NULL, 0); lun_id_set = 1; break; + case 'o': { + struct cctl_req_option *option; + char *tmpstr; + char *name, *value; + + tmpstr = strdup(optarg); + name = strsep(&tmpstr, "="); + if (name == NULL) { + warnx("%s: option -o takes \"name=value\"" + "argument", __func__); + retval = 1; + goto bailout; + } + value = strsep(&tmpstr, "="); + if (value == NULL) { + warnx("%s: option -o takes \"name=value\"" + "argument", __func__); + retval = 1; + goto bailout; + } + option = malloc(sizeof(*option)); + if (option == NULL) { + warn("%s: error allocating %zd bytes", + __func__, sizeof(*option)); + retval = 1; + goto bailout; + } + option->name = strdup(name); + option->namelen = strlen(name) + 1; + option->value = strdup(value); + option->vallen = strlen(value) + 1; + free(tmpstr); + + STAILQ_INSERT_TAIL(&option_list, option, links); + num_options++; + break; + } case 's': if (strcasecmp(optarg, "auto") != 0) { retval = expand_number(optarg, &lun_size); @@ -3203,8 +3243,9 @@ cctl_modify_lun(int fd, int argc, char * if (lun_id_set == 0) errx(1, "%s: LUN id (-l) must be specified", __func__); - if (lun_size_set == 0) - errx(1, "%s: size (-s) must be specified", __func__); + if (lun_size_set == 0 && num_options == 0) + errx(1, "%s: size (-s) or options (-o) must be specified", + __func__); bzero(&req, sizeof(req)); @@ -3214,6 +3255,42 @@ cctl_modify_lun(int fd, int argc, char * req.reqdata.modify.lun_id = lun_id; req.reqdata.modify.lun_size_bytes = lun_size; + req.num_be_args = num_options; + if (num_options > 0) { + struct cctl_req_option *option, *next_option; + int i; + + req.be_args = malloc(num_options * sizeof(*req.be_args)); + if (req.be_args == NULL) { + warn("%s: error allocating %zd bytes", __func__, + num_options * sizeof(*req.be_args)); + retval = 1; + goto bailout; + } + + for (i = 0, option = STAILQ_FIRST(&option_list); + i < num_options; i++, option = next_option) { + next_option = STAILQ_NEXT(option, links); + + req.be_args[i].namelen = option->namelen; + req.be_args[i].name = strdup(option->name); + req.be_args[i].vallen = option->vallen; + req.be_args[i].value = strdup(option->value); + /* + * XXX KDM do we want a way to specify a writeable + * flag of some sort? Do we want a way to specify + * binary data? + */ + req.be_args[i].flags = CTL_BEARG_ASCII | CTL_BEARG_RD; + + STAILQ_REMOVE(&option_list, option, cctl_req_option, + links); + free(option->name); + free(option->value); + free(option); + } + } + if (ioctl(fd, CTL_LUN_REQ, &req) == -1) { warn("%s: error issuing CTL_LUN_REQ ioctl", __func__); retval = 1; Modified: head/usr.sbin/ctld/ctld.c ============================================================================== --- head/usr.sbin/ctld/ctld.c Sun Sep 6 09:54:56 2015 (r287499) +++ head/usr.sbin/ctld/ctld.c Sun Sep 6 11:23:01 2015 (r287500) @@ -1961,18 +1961,14 @@ conf_apply(struct conf *oldconf, struct TAILQ_FOREACH_SAFE(newlun, &newconf->conf_luns, l_next, tmplun) { oldlun = lun_find(oldconf, newlun->l_name); if (oldlun != NULL) { - if (newlun->l_size != oldlun->l_size || - newlun->l_size == 0) { - log_debugx("resizing lun \"%s\", CTL lun %d", + log_debugx("modifying lun \"%s\", CTL lun %d", + newlun->l_name, newlun->l_ctl_lun); + error = kernel_lun_modify(newlun); + if (error != 0) { + log_warnx("failed to " + "modify lun \"%s\", CTL lun %d", newlun->l_name, newlun->l_ctl_lun); - error = kernel_lun_resize(newlun); - if (error != 0) { - log_warnx("failed to " - "resize lun \"%s\", CTL lun %d", - newlun->l_name, - newlun->l_ctl_lun); - cumulated_error++; - } + cumulated_error++; } continue; } Modified: head/usr.sbin/ctld/ctld.h ============================================================================== --- head/usr.sbin/ctld/ctld.h Sun Sep 6 09:54:56 2015 (r287499) +++ head/usr.sbin/ctld/ctld.h Sun Sep 6 11:23:01 2015 (r287500) @@ -391,7 +391,7 @@ void lun_option_set(struct lun_option void kernel_init(void); int kernel_lun_add(struct lun *lun); -int kernel_lun_resize(struct lun *lun); +int kernel_lun_modify(struct lun *lun); int kernel_lun_remove(struct lun *lun); void kernel_handoff(struct connection *conn); void kernel_limits(const char *offload, Modified: head/usr.sbin/ctld/kernel.c ============================================================================== --- head/usr.sbin/ctld/kernel.c Sun Sep 6 09:54:56 2015 (r287499) +++ head/usr.sbin/ctld/kernel.c Sun Sep 6 11:23:01 2015 (r287500) @@ -743,9 +743,11 @@ kernel_lun_add(struct lun *lun) } int -kernel_lun_resize(struct lun *lun) +kernel_lun_modify(struct lun *lun) { + struct lun_option *lo; struct ctl_lun_req req; + int error, i, num_options; bzero(&req, sizeof(req)); @@ -755,7 +757,30 @@ kernel_lun_resize(struct lun *lun) req.reqdata.modify.lun_id = lun->l_ctl_lun; req.reqdata.modify.lun_size_bytes = lun->l_size; - if (ioctl(ctl_fd, CTL_LUN_REQ, &req) == -1) { + num_options = 0; + TAILQ_FOREACH(lo, &lun->l_options, lo_next) + num_options++; + + req.num_be_args = num_options; + if (num_options > 0) { + req.be_args = malloc(num_options * sizeof(*req.be_args)); + if (req.be_args == NULL) { + log_warn("error allocating %zd bytes", + num_options * sizeof(*req.be_args)); + return (1); + } + + i = 0; + TAILQ_FOREACH(lo, &lun->l_options, lo_next) { + str_arg(&req.be_args[i], lo->lo_name, lo->lo_value); + i++; + } + assert(i == num_options); + } + + error = ioctl(ctl_fd, CTL_LUN_REQ, &req); + free(req.be_args); + if (error != 0) { log_warn("error issuing CTL_LUN_REQ ioctl"); return (1); } From owner-svn-src-all@freebsd.org Sun Sep 6 11:48:51 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1CE2A9CB151; Sun, 6 Sep 2015 11:48:51 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0D957EA4; Sun, 6 Sep 2015 11:48:51 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t86BmoLf015005; Sun, 6 Sep 2015 11:48:50 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t86BmoJg015004; Sun, 6 Sep 2015 11:48:50 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201509061148.t86BmoJg015004@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 6 Sep 2015 11:48:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287501 - head/contrib/llvm/tools/lldb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Sep 2015 11:48:51 -0000 Author: dim Date: Sun Sep 6 11:48:50 2015 New Revision: 287501 URL: https://svnweb.freebsd.org/changeset/base/287501 Log: Update lldb's FREEBSD-Xlist to match reality. Modified: head/contrib/llvm/tools/lldb/FREEBSD-Xlist Modified: head/contrib/llvm/tools/lldb/FREEBSD-Xlist ============================================================================== --- head/contrib/llvm/tools/lldb/FREEBSD-Xlist Sun Sep 6 11:23:01 2015 (r287500) +++ head/contrib/llvm/tools/lldb/FREEBSD-Xlist Sun Sep 6 11:48:50 2015 (r287501) @@ -3,6 +3,7 @@ .clang-format .gitignore CMakeLists.txt +CODE_OWNERS.txt INSTALL.txt Makefile cmake/ @@ -27,6 +28,7 @@ include/lldb/Host/msvc/ include/lldb/Host/windows/ include/lldb/Makefile lib/ +lit/ lldb.xcodeproj/ lldb.xcworkspace/ resources/ @@ -46,12 +48,15 @@ source/Expression/CMakeLists.txt source/Expression/Makefile source/Host/CMakeLists.txt source/Host/Makefile +source/Host/android/ source/Host/common/Makefile source/Host/freebsd/Makefile source/Host/linux/ source/Host/macosx/ source/Host/posix/Makefile source/Host/windows/ +source/Initialization/CMakeLists.txt +source/Initialization/Makefile source/Interpreter/CMakeLists.txt source/Interpreter/Makefile source/Makefile @@ -62,8 +67,18 @@ source/Plugins/ABI/MacOSX-arm64/CMakeLis source/Plugins/ABI/MacOSX-arm64/Makefile source/Plugins/ABI/MacOSX-i386/CMakeLists.txt source/Plugins/ABI/MacOSX-i386/Makefile +source/Plugins/ABI/SysV-arm/CMakeLists.txt +source/Plugins/ABI/SysV-arm/Makefile +source/Plugins/ABI/SysV-arm64/CMakeLists.txt +source/Plugins/ABI/SysV-arm64/Makefile source/Plugins/ABI/SysV-hexagon/CMakeLists.txt source/Plugins/ABI/SysV-hexagon/Makefile +source/Plugins/ABI/SysV-i386/CMakeLists.txt +source/Plugins/ABI/SysV-i386/Makefile +source/Plugins/ABI/SysV-mips/CMakeLists.txt +source/Plugins/ABI/SysV-mips/Makefile +source/Plugins/ABI/SysV-mips64/CMakeLists.txt +source/Plugins/ABI/SysV-mips64/Makefile source/Plugins/ABI/SysV-ppc/CMakeLists.txt source/Plugins/ABI/SysV-ppc/Makefile source/Plugins/ABI/SysV-ppc64/CMakeLists.txt @@ -88,6 +103,10 @@ source/Plugins/Instruction/ARM/Makefile source/Plugins/Instruction/ARM64/CMakeLists.txt source/Plugins/Instruction/ARM64/Makefile source/Plugins/Instruction/CMakeLists.txt +source/Plugins/Instruction/MIPS/CMakeLists.txt +source/Plugins/Instruction/MIPS/Makefile +source/Plugins/Instruction/MIPS64/CMakeLists.txt +source/Plugins/Instruction/MIPS64/Makefile source/Plugins/InstrumentationRuntime/AddressSanitizer/CMakeLists.txt source/Plugins/InstrumentationRuntime/AddressSanitizer/Makefile source/Plugins/InstrumentationRuntime/CMakeLists.txt @@ -99,6 +118,9 @@ source/Plugins/LanguageRuntime/CPlusPlus source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/CMakeLists.txt source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/Makefile source/Plugins/LanguageRuntime/ObjC/ +source/Plugins/LanguageRuntime/RenderScript/CMakeLists.txt +source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/CMakeLists.txt +source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/Makefile source/Plugins/Makefile source/Plugins/MemoryHistory/CMakeLists.txt source/Plugins/MemoryHistory/asan/CMakeLists.txt @@ -117,6 +139,7 @@ source/Plugins/ObjectFile/PECOFF/ source/Plugins/OperatingSystem/CMakeLists.txt source/Plugins/OperatingSystem/Python/CMakeLists.txt source/Plugins/OperatingSystem/Python/Makefile +source/Plugins/Platform/Android/ source/Plugins/Platform/CMakeLists.txt source/Plugins/Platform/FreeBSD/CMakeLists.txt source/Plugins/Platform/FreeBSD/Makefile @@ -168,6 +191,7 @@ source/Utility/Makefile test/ tools/CMakeLists.txt tools/Makefile +tools/argdumper/CMakeLists.txt tools/darwin-debug/ tools/darwin-threads/ tools/debugserver/ @@ -180,7 +204,9 @@ tools/lldb-mi/CMakeLists.txt tools/lldb-mi/Makefile tools/lldb-mi/lldb-Info.plist tools/lldb-perf/ -tools/lldb-platform/CMakeLists.txt -tools/lldb-platform/Makefile +tools/lldb-platform/ +tools/lldb-server/CMakeLists.txt +tools/lldb-server/Makefile +unittests/ utils/ www/ From owner-svn-src-all@freebsd.org Sun Sep 6 14:32:38 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A39949C5AC5; Sun, 6 Sep 2015 14:32:38 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 90CC91E85; Sun, 6 Sep 2015 14:32:38 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t86EWcNV084690; Sun, 6 Sep 2015 14:32:38 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t86EWVqM084660; Sun, 6 Sep 2015 14:32:31 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201509061432.t86EWVqM084660@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 6 Sep 2015 14:32:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r287503 - in vendor/lldb/dist: include/lldb include/lldb/API include/lldb/Core include/lldb/DataFormatters include/lldb/Expression include/lldb/Host include/lldb/Host/common include/lld... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Sep 2015 14:32:38 -0000 Author: dim Date: Sun Sep 6 14:32:30 2015 New Revision: 287503 URL: https://svnweb.freebsd.org/changeset/base/287503 Log: Vendor import of (stripped) lldb trunk r242221: https://llvm.org/svn/llvm-project/lldb/trunk@242221 Added: vendor/lldb/dist/include/lldb/Host/MainLoop.h (contents, props changed) vendor/lldb/dist/include/lldb/Host/MainLoopBase.h (contents, props changed) vendor/lldb/dist/include/lldb/Host/posix/MainLoopPosix.h (contents, props changed) vendor/lldb/dist/include/lldb/Target/ThreadPlanCallFunctionUsingABI.h (contents, props changed) vendor/lldb/dist/include/lldb/Utility/StringExtractor.h (contents, props changed) vendor/lldb/dist/source/Host/posix/MainLoopPosix.cpp (contents, props changed) vendor/lldb/dist/source/Plugins/DynamicLoader/Windows-DYLD/ vendor/lldb/dist/source/Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.cpp (contents, props changed) vendor/lldb/dist/source/Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.h (contents, props changed) vendor/lldb/dist/source/Plugins/Process/Utility/GDBRemoteSignals.cpp (contents, props changed) vendor/lldb/dist/source/Plugins/Process/Utility/GDBRemoteSignals.h (contents, props changed) vendor/lldb/dist/source/Target/ThreadPlanCallFunctionUsingABI.cpp (contents, props changed) Deleted: vendor/lldb/dist/source/Utility/StringExtractor.h vendor/lldb/dist/tools/lldb-platform/ Modified: vendor/lldb/dist/include/lldb/API/SBFrame.h vendor/lldb/dist/include/lldb/API/SBFunction.h vendor/lldb/dist/include/lldb/API/SBPlatform.h vendor/lldb/dist/include/lldb/API/SBSymbol.h vendor/lldb/dist/include/lldb/API/SBTarget.h vendor/lldb/dist/include/lldb/API/SBUnixSignals.h vendor/lldb/dist/include/lldb/Core/Connection.h vendor/lldb/dist/include/lldb/Core/Mangled.h vendor/lldb/dist/include/lldb/Core/StructuredData.h vendor/lldb/dist/include/lldb/DataFormatters/CXXFormatterFunctions.h vendor/lldb/dist/include/lldb/DataFormatters/VectorType.h vendor/lldb/dist/include/lldb/Expression/ClangUserExpression.h vendor/lldb/dist/include/lldb/Expression/IRInterpreter.h vendor/lldb/dist/include/lldb/Expression/IRMemoryMap.h vendor/lldb/dist/include/lldb/Host/Host.h vendor/lldb/dist/include/lldb/Host/StringConvert.h vendor/lldb/dist/include/lldb/Host/common/NativeProcessProtocol.h vendor/lldb/dist/include/lldb/Host/posix/ConnectionFileDescriptorPosix.h vendor/lldb/dist/include/lldb/Interpreter/CommandObject.h vendor/lldb/dist/include/lldb/Symbol/Function.h vendor/lldb/dist/include/lldb/Symbol/Symbol.h vendor/lldb/dist/include/lldb/Symbol/Variable.h vendor/lldb/dist/include/lldb/Target/ABI.h vendor/lldb/dist/include/lldb/Target/Platform.h vendor/lldb/dist/include/lldb/Target/Process.h vendor/lldb/dist/include/lldb/Target/ThreadPlanCallFunction.h vendor/lldb/dist/include/lldb/Target/UnixSignals.h vendor/lldb/dist/include/lldb/Utility/JSON.h vendor/lldb/dist/include/lldb/lldb-forward.h vendor/lldb/dist/include/lldb/lldb-private-forward.h vendor/lldb/dist/source/API/SBBlock.cpp vendor/lldb/dist/source/API/SBFrame.cpp vendor/lldb/dist/source/API/SBFunction.cpp vendor/lldb/dist/source/API/SBPlatform.cpp vendor/lldb/dist/source/API/SBProcess.cpp vendor/lldb/dist/source/API/SBSymbol.cpp vendor/lldb/dist/source/API/SBTarget.cpp vendor/lldb/dist/source/API/SBThread.cpp vendor/lldb/dist/source/API/SBUnixSignals.cpp vendor/lldb/dist/source/API/SystemInitializerFull.cpp vendor/lldb/dist/source/Breakpoint/BreakpointLocation.cpp vendor/lldb/dist/source/Commands/CommandObjectBreakpoint.cpp vendor/lldb/dist/source/Commands/CommandObjectBreakpointCommand.cpp vendor/lldb/dist/source/Commands/CommandObjectCommands.cpp vendor/lldb/dist/source/Commands/CommandObjectExpression.cpp vendor/lldb/dist/source/Commands/CommandObjectPlatform.cpp vendor/lldb/dist/source/Commands/CommandObjectProcess.cpp vendor/lldb/dist/source/Commands/CommandObjectSettings.cpp vendor/lldb/dist/source/Commands/CommandObjectType.cpp vendor/lldb/dist/source/Commands/CommandObjectWatchpoint.cpp vendor/lldb/dist/source/Commands/CommandObjectWatchpointCommand.cpp vendor/lldb/dist/source/Core/ArchSpec.cpp vendor/lldb/dist/source/Core/DataExtractor.cpp vendor/lldb/dist/source/Core/FormatEntity.cpp vendor/lldb/dist/source/Core/Mangled.cpp vendor/lldb/dist/source/Core/StructuredData.cpp vendor/lldb/dist/source/DataFormatters/FormatManager.cpp vendor/lldb/dist/source/DataFormatters/VectorType.cpp vendor/lldb/dist/source/Expression/ClangExpressionDeclMap.cpp vendor/lldb/dist/source/Expression/ClangExpressionParser.cpp vendor/lldb/dist/source/Expression/ClangModulesDeclVendor.cpp vendor/lldb/dist/source/Expression/ClangUserExpression.cpp vendor/lldb/dist/source/Expression/IRExecutionUnit.cpp vendor/lldb/dist/source/Expression/IRForTarget.cpp vendor/lldb/dist/source/Expression/IRInterpreter.cpp vendor/lldb/dist/source/Expression/IRMemoryMap.cpp vendor/lldb/dist/source/Host/common/Host.cpp vendor/lldb/dist/source/Host/common/NativeProcessProtocol.cpp vendor/lldb/dist/source/Host/common/StringConvert.cpp vendor/lldb/dist/source/Host/freebsd/Host.cpp vendor/lldb/dist/source/Initialization/SystemInitializerCommon.cpp vendor/lldb/dist/source/Interpreter/CommandObject.cpp vendor/lldb/dist/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.cpp vendor/lldb/dist/source/Plugins/ABI/SysV-hexagon/ABISysV_hexagon.cpp vendor/lldb/dist/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.cpp vendor/lldb/dist/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp vendor/lldb/dist/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp vendor/lldb/dist/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp vendor/lldb/dist/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp vendor/lldb/dist/source/Plugins/Platform/POSIX/PlatformPOSIX.h vendor/lldb/dist/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp vendor/lldb/dist/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h vendor/lldb/dist/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp vendor/lldb/dist/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp vendor/lldb/dist/source/Plugins/Process/FreeBSD/ProcessPOSIX.h vendor/lldb/dist/source/Plugins/Process/Utility/FreeBSDSignals.cpp vendor/lldb/dist/source/Plugins/Process/Utility/FreeBSDSignals.h vendor/lldb/dist/source/Plugins/Process/Utility/LinuxSignals.cpp vendor/lldb/dist/source/Plugins/Process/Utility/LinuxSignals.h vendor/lldb/dist/source/Plugins/Process/Utility/MipsLinuxSignals.cpp vendor/lldb/dist/source/Plugins/Process/Utility/MipsLinuxSignals.h vendor/lldb/dist/source/Plugins/Process/Utility/UnwindLLDB.cpp vendor/lldb/dist/source/Plugins/Process/Utility/UnwindLLDB.h vendor/lldb/dist/source/Plugins/Process/elf-core/ProcessElfCore.cpp vendor/lldb/dist/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp vendor/lldb/dist/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp vendor/lldb/dist/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h vendor/lldb/dist/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp vendor/lldb/dist/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.h vendor/lldb/dist/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp vendor/lldb/dist/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h vendor/lldb/dist/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp vendor/lldb/dist/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.h vendor/lldb/dist/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp vendor/lldb/dist/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h vendor/lldb/dist/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp vendor/lldb/dist/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp vendor/lldb/dist/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp vendor/lldb/dist/source/Symbol/ClangASTContext.cpp vendor/lldb/dist/source/Symbol/ClangASTImporter.cpp vendor/lldb/dist/source/Symbol/ClangASTType.cpp vendor/lldb/dist/source/Symbol/Function.cpp vendor/lldb/dist/source/Symbol/Symbol.cpp vendor/lldb/dist/source/Symbol/SymbolContext.cpp vendor/lldb/dist/source/Symbol/Symtab.cpp vendor/lldb/dist/source/Symbol/Variable.cpp vendor/lldb/dist/source/Target/Platform.cpp vendor/lldb/dist/source/Target/Process.cpp vendor/lldb/dist/source/Target/ProcessLaunchInfo.cpp vendor/lldb/dist/source/Target/StopInfo.cpp vendor/lldb/dist/source/Target/ThreadPlanCallFunction.cpp vendor/lldb/dist/source/Target/ThreadPlanStepOverRange.cpp vendor/lldb/dist/source/Target/UnixSignals.cpp vendor/lldb/dist/source/Utility/JSON.cpp vendor/lldb/dist/source/Utility/StringExtractor.cpp vendor/lldb/dist/source/Utility/StringExtractorGDBRemote.cpp vendor/lldb/dist/source/Utility/StringExtractorGDBRemote.h vendor/lldb/dist/tools/driver/Driver.cpp vendor/lldb/dist/tools/driver/Driver.h vendor/lldb/dist/tools/lldb-mi/MICmdArgSet.h vendor/lldb/dist/tools/lldb-mi/MICmdArgValBase.h vendor/lldb/dist/tools/lldb-mi/MICmdArgValConsume.h vendor/lldb/dist/tools/lldb-mi/MICmdArgValFile.h vendor/lldb/dist/tools/lldb-mi/MICmdArgValListBase.h vendor/lldb/dist/tools/lldb-mi/MICmdArgValListOfN.h vendor/lldb/dist/tools/lldb-mi/MICmdArgValNumber.h vendor/lldb/dist/tools/lldb-mi/MICmdArgValOptionLong.h vendor/lldb/dist/tools/lldb-mi/MICmdArgValOptionShort.cpp vendor/lldb/dist/tools/lldb-mi/MICmdArgValOptionShort.h vendor/lldb/dist/tools/lldb-mi/MICmdArgValPrintValues.h vendor/lldb/dist/tools/lldb-mi/MICmdArgValString.cpp vendor/lldb/dist/tools/lldb-mi/MICmdArgValString.h vendor/lldb/dist/tools/lldb-mi/MICmdArgValThreadGrp.h vendor/lldb/dist/tools/lldb-mi/MICmdBase.cpp vendor/lldb/dist/tools/lldb-mi/MICmdBase.h vendor/lldb/dist/tools/lldb-mi/MICmdCmd.h vendor/lldb/dist/tools/lldb-mi/MICmdCmdBreak.cpp vendor/lldb/dist/tools/lldb-mi/MICmdCmdBreak.h vendor/lldb/dist/tools/lldb-mi/MICmdCmdData.cpp vendor/lldb/dist/tools/lldb-mi/MICmdCmdData.h vendor/lldb/dist/tools/lldb-mi/MICmdCmdEnviro.h vendor/lldb/dist/tools/lldb-mi/MICmdCmdExec.h vendor/lldb/dist/tools/lldb-mi/MICmdCmdFile.h vendor/lldb/dist/tools/lldb-mi/MICmdCmdGdbInfo.h vendor/lldb/dist/tools/lldb-mi/MICmdCmdGdbSet.h vendor/lldb/dist/tools/lldb-mi/MICmdCmdGdbShow.h vendor/lldb/dist/tools/lldb-mi/MICmdCmdGdbThread.h vendor/lldb/dist/tools/lldb-mi/MICmdCmdMiscellanous.cpp vendor/lldb/dist/tools/lldb-mi/MICmdCmdMiscellanous.h vendor/lldb/dist/tools/lldb-mi/MICmdCmdStack.h vendor/lldb/dist/tools/lldb-mi/MICmdCmdSupportInfo.h vendor/lldb/dist/tools/lldb-mi/MICmdCmdSupportList.h vendor/lldb/dist/tools/lldb-mi/MICmdCmdSymbol.h vendor/lldb/dist/tools/lldb-mi/MICmdCmdTarget.h vendor/lldb/dist/tools/lldb-mi/MICmdCmdThread.h vendor/lldb/dist/tools/lldb-mi/MICmdCmdTrace.h vendor/lldb/dist/tools/lldb-mi/MICmdCmdVar.h vendor/lldb/dist/tools/lldb-mi/MICmdFactory.cpp vendor/lldb/dist/tools/lldb-mi/MICmdFactory.h vendor/lldb/dist/tools/lldb-mi/MICmdInterpreter.cpp vendor/lldb/dist/tools/lldb-mi/MICmdInterpreter.h vendor/lldb/dist/tools/lldb-mi/MICmdInvoker.cpp vendor/lldb/dist/tools/lldb-mi/MICmdInvoker.h vendor/lldb/dist/tools/lldb-mi/MICmdMgr.cpp vendor/lldb/dist/tools/lldb-mi/MICmdMgr.h vendor/lldb/dist/tools/lldb-mi/MICmdMgrSetCmdDeleteCallback.h vendor/lldb/dist/tools/lldb-mi/MICmnBase.cpp vendor/lldb/dist/tools/lldb-mi/MICmnLLDBBroadcaster.cpp vendor/lldb/dist/tools/lldb-mi/MICmnLLDBBroadcaster.h vendor/lldb/dist/tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp vendor/lldb/dist/tools/lldb-mi/MICmnLLDBDebugSessionInfo.h vendor/lldb/dist/tools/lldb-mi/MICmnLLDBDebugSessionInfoVarObj.cpp vendor/lldb/dist/tools/lldb-mi/MICmnLLDBDebugSessionInfoVarObj.h vendor/lldb/dist/tools/lldb-mi/MICmnLLDBDebugger.cpp vendor/lldb/dist/tools/lldb-mi/MICmnLLDBDebugger.h vendor/lldb/dist/tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.cpp vendor/lldb/dist/tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.h vendor/lldb/dist/tools/lldb-mi/MICmnLLDBProxySBValue.cpp vendor/lldb/dist/tools/lldb-mi/MICmnLLDBProxySBValue.h vendor/lldb/dist/tools/lldb-mi/MICmnLLDBUtilSBValue.cpp vendor/lldb/dist/tools/lldb-mi/MICmnLLDBUtilSBValue.h vendor/lldb/dist/tools/lldb-mi/MICmnLog.h vendor/lldb/dist/tools/lldb-mi/MICmnLogMediumFile.cpp vendor/lldb/dist/tools/lldb-mi/MICmnLogMediumFile.h vendor/lldb/dist/tools/lldb-mi/MICmnMIOutOfBandRecord.h vendor/lldb/dist/tools/lldb-mi/MICmnMIResultRecord.h vendor/lldb/dist/tools/lldb-mi/MICmnMIValue.h vendor/lldb/dist/tools/lldb-mi/MICmnMIValueConst.h vendor/lldb/dist/tools/lldb-mi/MICmnMIValueList.cpp vendor/lldb/dist/tools/lldb-mi/MICmnMIValueList.h vendor/lldb/dist/tools/lldb-mi/MICmnMIValueResult.h vendor/lldb/dist/tools/lldb-mi/MICmnMIValueTuple.h vendor/lldb/dist/tools/lldb-mi/MICmnResources.cpp vendor/lldb/dist/tools/lldb-mi/MICmnResources.h vendor/lldb/dist/tools/lldb-mi/MICmnStreamStderr.cpp vendor/lldb/dist/tools/lldb-mi/MICmnStreamStderr.h vendor/lldb/dist/tools/lldb-mi/MICmnStreamStdin.h vendor/lldb/dist/tools/lldb-mi/MICmnStreamStdout.cpp vendor/lldb/dist/tools/lldb-mi/MICmnStreamStdout.h vendor/lldb/dist/tools/lldb-mi/MICmnThreadMgrStd.h vendor/lldb/dist/tools/lldb-mi/MIDataTypes.h vendor/lldb/dist/tools/lldb-mi/MIDriver.cpp vendor/lldb/dist/tools/lldb-mi/MIDriver.h vendor/lldb/dist/tools/lldb-mi/MIDriverBase.cpp vendor/lldb/dist/tools/lldb-mi/MIDriverMain.cpp vendor/lldb/dist/tools/lldb-mi/MIDriverMgr.h vendor/lldb/dist/tools/lldb-mi/MIUtilFileStd.h vendor/lldb/dist/tools/lldb-mi/MIUtilMapIdToVariant.h vendor/lldb/dist/tools/lldb-mi/MIUtilSingletonBase.h vendor/lldb/dist/tools/lldb-mi/MIUtilSingletonHelper.h vendor/lldb/dist/tools/lldb-mi/MIUtilString.h vendor/lldb/dist/tools/lldb-mi/MIUtilSystemLinux.cpp vendor/lldb/dist/tools/lldb-mi/MIUtilSystemOsx.cpp vendor/lldb/dist/tools/lldb-mi/MIUtilSystemWindows.cpp vendor/lldb/dist/tools/lldb-mi/MIUtilThreadBaseStd.cpp vendor/lldb/dist/tools/lldb-mi/MIUtilVariant.h vendor/lldb/dist/tools/lldb-server/lldb-gdbserver.cpp vendor/lldb/dist/tools/lldb-server/lldb-platform.cpp Modified: vendor/lldb/dist/include/lldb/API/SBFrame.h ============================================================================== --- vendor/lldb/dist/include/lldb/API/SBFrame.h Sun Sep 6 12:02:28 2015 (r287502) +++ vendor/lldb/dist/include/lldb/API/SBFrame.h Sun Sep 6 14:32:30 2015 (r287503) @@ -90,6 +90,10 @@ public: /// See also IsInlined(). const char * GetFunctionName(); + + // Get an appropriate function name for this frame that is suitable for display to a user + const char * + GetDisplayFunctionName (); const char * GetFunctionName() const; Modified: vendor/lldb/dist/include/lldb/API/SBFunction.h ============================================================================== --- vendor/lldb/dist/include/lldb/API/SBFunction.h Sun Sep 6 12:02:28 2015 (r287502) +++ vendor/lldb/dist/include/lldb/API/SBFunction.h Sun Sep 6 14:32:30 2015 (r287503) @@ -36,6 +36,9 @@ public: GetName() const; const char * + GetDisplayName() const; + + const char * GetMangledName () const; lldb::SBInstructionList Modified: vendor/lldb/dist/include/lldb/API/SBPlatform.h ============================================================================== --- vendor/lldb/dist/include/lldb/API/SBPlatform.h Sun Sep 6 12:02:28 2015 (r287502) +++ vendor/lldb/dist/include/lldb/API/SBPlatform.h Sun Sep 6 14:32:30 2015 (r287503) @@ -189,6 +189,9 @@ namespace lldb { SBError SetFilePermissions (const char *path, uint32_t file_permissions); + SBUnixSignals + GetUnixSignals() const; + protected: friend class SBDebugger; Modified: vendor/lldb/dist/include/lldb/API/SBSymbol.h ============================================================================== --- vendor/lldb/dist/include/lldb/API/SBSymbol.h Sun Sep 6 12:02:28 2015 (r287502) +++ vendor/lldb/dist/include/lldb/API/SBSymbol.h Sun Sep 6 14:32:30 2015 (r287503) @@ -38,6 +38,9 @@ public: GetName() const; const char * + GetDisplayName() const; + + const char * GetMangledName () const; lldb::SBInstructionList Modified: vendor/lldb/dist/include/lldb/API/SBTarget.h ============================================================================== --- vendor/lldb/dist/include/lldb/API/SBTarget.h Sun Sep 6 12:02:28 2015 (r287502) +++ vendor/lldb/dist/include/lldb/API/SBTarget.h Sun Sep 6 14:32:30 2015 (r287503) @@ -769,6 +769,9 @@ public: GetDescription (lldb::SBStream &description, lldb::DescriptionLevel description_level); lldb::SBValue + EvaluateExpression (const char *expr); + + lldb::SBValue EvaluateExpression (const char *expr, const SBExpressionOptions &options); lldb::addr_t Modified: vendor/lldb/dist/include/lldb/API/SBUnixSignals.h ============================================================================== --- vendor/lldb/dist/include/lldb/API/SBUnixSignals.h Sun Sep 6 12:02:28 2015 (r287502) +++ vendor/lldb/dist/include/lldb/API/SBUnixSignals.h Sun Sep 6 14:32:30 2015 (r287503) @@ -65,17 +65,20 @@ public: protected: friend class SBProcess; + friend class SBPlatform; - SBUnixSignals (lldb::ProcessSP &process_sp); + SBUnixSignals(lldb::ProcessSP &process_sp); - lldb::ProcessSP + SBUnixSignals(lldb::PlatformSP &platform_sp); + + lldb::UnixSignalsSP GetSP() const; void - SetSP (const lldb::ProcessSP &process_sp); + SetSP(const lldb::UnixSignalsSP &signals_sp); private: - lldb::ProcessWP m_opaque_wp; + lldb::UnixSignalsWP m_opaque_wp; }; Modified: vendor/lldb/dist/include/lldb/Core/Connection.h ============================================================================== --- vendor/lldb/dist/include/lldb/Core/Connection.h Sun Sep 6 12:02:28 2015 (r287502) +++ vendor/lldb/dist/include/lldb/Core/Connection.h Sun Sep 6 14:32:30 2015 (r287503) @@ -187,6 +187,20 @@ public: virtual bool InterruptRead() = 0; + //------------------------------------------------------------------ + /// Returns the underlying IOObject used by the Connection. + /// + /// The IOObject can be used to wait for data to become available + /// on the connection. If the Connection does not use IOObjects (and + /// hence does not support waiting) this function should return a + /// null pointer. + /// + /// @return + /// The underlying IOObject used for reading. + //------------------------------------------------------------------ + virtual lldb::IOObjectSP + GetReadObject() { return lldb::IOObjectSP(); } + private: //------------------------------------------------------------------ // For Connection only Modified: vendor/lldb/dist/include/lldb/Core/Mangled.h ============================================================================== --- vendor/lldb/dist/include/lldb/Core/Mangled.h Sun Sep 6 12:02:28 2015 (r287502) +++ vendor/lldb/dist/include/lldb/Core/Mangled.h Sun Sep 6 14:32:30 2015 (r287503) @@ -182,8 +182,17 @@ public: /// A const reference to the demangled name string object. //---------------------------------------------------------------------- const ConstString& - GetDemangledName () const; + GetDemangledName (lldb::LanguageType language) const; + //---------------------------------------------------------------------- + /// Display demangled name get accessor. + /// + /// @return + /// A const reference to the display demangled name string object. + //---------------------------------------------------------------------- + ConstString + GetDisplayDemangledName (lldb::LanguageType language) const; + void SetDemangledName (const ConstString &name) { @@ -231,8 +240,8 @@ public: /// object has a valid name of that kind, else a const reference to the /// other name is returned. //---------------------------------------------------------------------- - const ConstString& - GetName (NamePreference preference = ePreferDemangled) const; + ConstString + GetName (lldb::LanguageType language, NamePreference preference = ePreferDemangled) const; //---------------------------------------------------------------------- /// Check if "name" matches either the mangled or demangled name. @@ -244,15 +253,15 @@ public: /// \b True if \a name matches either name, \b false otherwise. //---------------------------------------------------------------------- bool - NameMatches (const ConstString &name) const + NameMatches (const ConstString &name, lldb::LanguageType language) const { if (m_mangled == name) return true; - return GetDemangledName () == name; + return GetDemangledName (language) == name; } bool - NameMatches (const RegularExpression& regex) const; + NameMatches (const RegularExpression& regex, lldb::LanguageType language) const; //---------------------------------------------------------------------- /// Get the memory cost of this object. Modified: vendor/lldb/dist/include/lldb/Core/StructuredData.h ============================================================================== --- vendor/lldb/dist/include/lldb/Core/StructuredData.h Sun Sep 6 12:02:28 2015 (r287502) +++ vendor/lldb/dist/include/lldb/Core/StructuredData.h Sun Sep 6 14:32:30 2015 (r287503) @@ -238,14 +238,15 @@ public: { } - void + bool ForEach (std::function const &foreach_callback) const { for (const auto &object_sp : m_items) { if (foreach_callback(object_sp.get()) == false) - break; + return false; } + return true; } Modified: vendor/lldb/dist/include/lldb/DataFormatters/CXXFormatterFunctions.h ============================================================================== --- vendor/lldb/dist/include/lldb/DataFormatters/CXXFormatterFunctions.h Sun Sep 6 12:02:28 2015 (r287502) +++ vendor/lldb/dist/include/lldb/DataFormatters/CXXFormatterFunctions.h Sun Sep 6 14:32:30 2015 (r287503) @@ -18,6 +18,7 @@ #include "lldb/Core/ConstString.h" #include "lldb/DataFormatters/FormatClasses.h" #include "lldb/DataFormatters/TypeSynthetic.h" +#include "lldb/DataFormatters/VectorType.h" #include "lldb/Target/ExecutionContext.h" #include "lldb/Target/ObjCLanguageRuntime.h" #include "lldb/Target/Target.h" Modified: vendor/lldb/dist/include/lldb/DataFormatters/VectorType.h ============================================================================== --- vendor/lldb/dist/include/lldb/DataFormatters/VectorType.h Sun Sep 6 12:02:28 2015 (r287502) +++ vendor/lldb/dist/include/lldb/DataFormatters/VectorType.h Sun Sep 6 14:32:30 2015 (r287503) @@ -0,0 +1,28 @@ +//===-- VectorType.h ------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef liblldb_VectorType_h_ +#define liblldb_VectorType_h_ + +#include "lldb/lldb-forward.h" + +namespace lldb_private { + namespace formatters + { + bool + VectorTypeSummaryProvider (ValueObject&, + Stream&, + const TypeSummaryOptions&); + + SyntheticChildrenFrontEnd* + VectorTypeSyntheticFrontEndCreator (CXXSyntheticChildren*, lldb::ValueObjectSP); + } // namespace formatters +} // namespace lldb_private + +#endif // liblldb_VectorType_h_ Modified: vendor/lldb/dist/include/lldb/Expression/ClangUserExpression.h ============================================================================== --- vendor/lldb/dist/include/lldb/Expression/ClangUserExpression.h Sun Sep 6 12:02:28 2015 (r287502) +++ vendor/lldb/dist/include/lldb/Expression/ClangUserExpression.h Sun Sep 6 14:32:30 2015 (r287503) @@ -30,7 +30,7 @@ #include "lldb/Symbol/TaggedASTType.h" #include "lldb/Target/ExecutionContext.h" -namespace lldb_private +namespace lldb_private { //---------------------------------------------------------------------- @@ -45,7 +45,7 @@ namespace lldb_private class ClangUserExpression : public ClangExpression { public: - + enum { kDefaultTimeout = 500000u }; //------------------------------------------------------------------ /// Constructor @@ -59,7 +59,7 @@ public: /// /// @param[in] language /// If not eLanguageTypeUnknown, a language to use when parsing - /// the expression. Currently restricted to those languages + /// the expression. Currently restricted to those languages /// supported by Clang. /// /// @param[in] desired_type @@ -70,13 +70,13 @@ public: const char *expr_prefix, lldb::LanguageType language, ResultType desired_type); - + //------------------------------------------------------------------ /// Destructor //------------------------------------------------------------------ - virtual + virtual ~ClangUserExpression (); - + //------------------------------------------------------------------ /// Parse the expression /// @@ -92,28 +92,28 @@ public: /// Determines whether interpretation is possible or mandatory. /// /// @param[in] keep_result_in_memory - /// True if the resulting persistent variable should reside in + /// True if the resulting persistent variable should reside in /// target memory, if applicable. /// /// @return /// True on success (no errors); false otherwise. //------------------------------------------------------------------ bool - Parse (Stream &error_stream, + Parse (Stream &error_stream, ExecutionContext &exe_ctx, lldb_private::ExecutionPolicy execution_policy, bool keep_result_in_memory, bool generate_debug_info); - + bool CanInterpret () { return m_can_interpret; } - + bool MatchesContext (ExecutionContext &exe_ctx); - + //------------------------------------------------------------------ /// Execute the parsed expression /// @@ -131,9 +131,9 @@ public: /// This is a shared pointer to this ClangUserExpression. This is /// needed because Execute can push a thread plan that will hold onto /// the ClangUserExpression for an unbounded period of time. So you - /// need to give the thread plan a reference to this object that can + /// need to give the thread plan a reference to this object that can /// keep it alive. - /// + /// /// @param[in] result /// A pointer to direct at the persistent variable in which the /// expression's result is stored. @@ -147,7 +147,7 @@ public: const EvaluateExpressionOptions& options, lldb::ClangUserExpressionSP &shared_ptr_to_me, lldb::ClangExpressionVariableSP &result); - + //------------------------------------------------------------------ /// Apply the side effects of the function to program state. /// @@ -157,7 +157,7 @@ public: /// @param[in] exe_ctx /// The execution context to use when looking up entities that /// are needed for parsing (locations of variables, etc.) - /// + /// /// @param[in] result /// A pointer to direct at the persistent variable in which the /// expression's result is stored. @@ -177,7 +177,7 @@ public: lldb::ClangExpressionVariableSP &result, lldb::addr_t function_stack_bottom = LLDB_INVALID_ADDRESS, lldb::addr_t function_stack_top = LLDB_INVALID_ADDRESS); - + //------------------------------------------------------------------ /// Return the string that the parser should parse. Must be a full /// translation unit. @@ -187,7 +187,7 @@ public: { return m_transformed_text.c_str(); } - + //------------------------------------------------------------------ /// Return the string that the user typed. //------------------------------------------------------------------ @@ -196,7 +196,7 @@ public: { return m_expr_text.c_str(); } - + //------------------------------------------------------------------ /// Return the function name that should be used for executing the /// expression. Text() should contain the definition of this @@ -207,7 +207,7 @@ public: { return "$__lldb_expr"; } - + //------------------------------------------------------------------ /// Return the language that should be used when parsing. To use /// the default, return eLanguageTypeUnknown. @@ -217,7 +217,7 @@ public: { return m_language; } - + //------------------------------------------------------------------ /// Return the object that the parser should use when resolving external /// values. May be NULL if everything should be self-contained. @@ -227,7 +227,7 @@ public: { return m_expr_decl_map.get(); } - + //------------------------------------------------------------------ /// Return the object that the parser should allow to access ASTs. /// May be NULL if the ASTs do not need to be transformed. @@ -238,9 +238,9 @@ public: //------------------------------------------------------------------ clang::ASTConsumer * ASTTransformer (clang::ASTConsumer *passthrough); - + //------------------------------------------------------------------ - /// Return the desired result type of the function, or + /// Return the desired result type of the function, or /// eResultTypeAny if indifferent. //------------------------------------------------------------------ virtual ResultType @@ -248,7 +248,7 @@ public: { return m_desired_type; } - + //------------------------------------------------------------------ /// Return true if validation code should be inserted into the /// expression. @@ -258,7 +258,7 @@ public: { return true; } - + //------------------------------------------------------------------ /// Return true if external variables in the expression should be /// resolved. @@ -302,15 +302,15 @@ public: const char *expr_prefix, lldb::ValueObjectSP &result_valobj_sp, Error &error); - + static const Error::ValueType kNoResult = 0x1001; ///< ValueObject::GetError() returns this if there is no result from the expression. private: //------------------------------------------------------------------ /// Populate m_in_cplusplus_method and m_in_objectivec_method based on the environment. //------------------------------------------------------------------ - + void - ScanContext (ExecutionContext &exe_ctx, + ScanContext (ExecutionContext &exe_ctx, lldb_private::Error &err); bool @@ -319,21 +319,21 @@ private: lldb::addr_t &struct_address, lldb::addr_t &object_ptr, lldb::addr_t &cmd_ptr); - + void InstallContext (ExecutionContext &exe_ctx); - + bool LockAndCheckContext (ExecutionContext &exe_ctx, lldb::TargetSP &target_sp, lldb::ProcessSP &process_sp, lldb::StackFrameSP &frame_sp); - + lldb::ProcessWP m_process_wp; ///< The process used as the context for the expression. Address m_address; ///< The address the process is stopped in. lldb::addr_t m_stack_frame_bottom; ///< The bottom of the allocated stack frame. lldb::addr_t m_stack_frame_top; ///< The top of the allocated stack frame. - + std::string m_expr_text; ///< The text of the expression, as typed by the user std::string m_expr_prefix; ///< The text of the translation-level definitions, as provided by the user lldb::LanguageType m_language; ///< The language to use when parsing (eLanguageTypeUnknown means use defaults) @@ -341,7 +341,7 @@ private: bool m_allow_objc; ///< True if the language allows Objective-C. std::string m_transformed_text; ///< The text of the expression, as send to the parser ResultType m_desired_type; ///< The type to coerce the expression's result to. If eResultTypeAny, inferred from the expression. - + std::unique_ptr m_expr_decl_map; ///< The map to use when parsing the expression. std::shared_ptr m_execution_unit_sp; ///< The execution unit the expression is stored in. std::unique_ptr m_materializer_ap; ///< The materializer to use when running the expression. @@ -354,12 +354,12 @@ private: bool m_needs_object_ptr; ///< True if "this" or "self" must be looked up and passed in. False if the expression doesn't really use them and they can be NULL. bool m_const_object; ///< True if "this" is const. Target *m_target; ///< The target for storing persistent data like types and variables. - + bool m_can_interpret; ///< True if the expression could be evaluated statically; false otherwise. lldb::addr_t m_materialized_address; ///< The address at which the arguments to the expression have been materialized. Materializer::DematerializerSP m_dematerializer_sp; ///< The dematerializer. }; - + } // namespace lldb_private #endif // liblldb_ClangUserExpression_h_ Modified: vendor/lldb/dist/include/lldb/Expression/IRInterpreter.h ============================================================================== --- vendor/lldb/dist/include/lldb/Expression/IRInterpreter.h Sun Sep 6 12:02:28 2015 (r287502) +++ vendor/lldb/dist/include/lldb/Expression/IRInterpreter.h Sun Sep 6 14:32:30 2015 (r287503) @@ -44,7 +44,8 @@ public: static bool CanInterpret (llvm::Module &module, llvm::Function &function, - lldb_private::Error &error); + lldb_private::Error &error, + const bool support_function_calls); static bool Interpret (llvm::Module &module, @@ -53,7 +54,8 @@ public: lldb_private::IRMemoryMap &memory_map, lldb_private::Error &error, lldb::addr_t stack_frame_bottom, - lldb::addr_t stack_frame_top); + lldb::addr_t stack_frame_top, + lldb_private::ExecutionContext &exe_ctx); private: static bool Modified: vendor/lldb/dist/include/lldb/Expression/IRMemoryMap.h ============================================================================== --- vendor/lldb/dist/include/lldb/Expression/IRMemoryMap.h Sun Sep 6 12:02:28 2015 (r287502) +++ vendor/lldb/dist/include/lldb/Expression/IRMemoryMap.h Sun Sep 6 14:32:30 2015 (r287503) @@ -60,7 +60,7 @@ public: void ReadMemory (uint8_t *bytes, lldb::addr_t process_address, size_t size, Error &error); void ReadScalarFromMemory (Scalar &scalar, lldb::addr_t process_address, size_t size, Error &error); void ReadPointerFromMemory (lldb::addr_t *address, lldb::addr_t process_address, Error &error); - + bool GetAllocSize(lldb::addr_t address, size_t &size); void GetMemoryData (DataExtractor &extractor, lldb::addr_t process_address, size_t size, Error &error); lldb::ByteOrder GetByteOrder(); Modified: vendor/lldb/dist/include/lldb/Host/Host.h ============================================================================== --- vendor/lldb/dist/include/lldb/Host/Host.h Sun Sep 6 12:02:28 2015 (r287502) +++ vendor/lldb/dist/include/lldb/Host/Host.h Sun Sep 6 14:32:30 2015 (r287503) @@ -244,8 +244,8 @@ public: #endif // !defined(__ANDROID__) && !defined(__ANDROID_NDK__) #endif // defined (__APPLE__) || defined (__linux__) || defined (__FreeBSD__) || defined (__GLIBC__) || defined(__NetBSD__) - static const lldb_private::UnixSignalsSP& - GetUnixSignals (); + static const lldb::UnixSignalsSP & + GetUnixSignals(); static Error LaunchProcess (ProcessLaunchInfo &launch_info); Added: vendor/lldb/dist/include/lldb/Host/MainLoop.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lldb/dist/include/lldb/Host/MainLoop.h Sun Sep 6 14:32:30 2015 (r287503) @@ -0,0 +1,27 @@ +//===-- MainLoop.h ----------------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef lldb_Host_MainLoop_h_ +#define lldb_Host_MainLoop_h_ + +#ifdef _WIN32 +#include "lldb/Host/MainLoopBase.h" +namespace lldb_private +{ +typedef MainLoopBase MainLoop; +} +#else +#include "lldb/Host/posix/MainLoopPosix.h" +namespace lldb_private +{ +typedef MainLoopPosix MainLoop; +} +#endif + +#endif // lldb_Host_MainLoop_h_ Added: vendor/lldb/dist/include/lldb/Host/MainLoopBase.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lldb/dist/include/lldb/Host/MainLoopBase.h Sun Sep 6 14:32:30 2015 (r287503) @@ -0,0 +1,94 @@ +//===-- MainLoopBase.h ------------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef lldb_Host_posix_MainLoopBase_h_ +#define lldb_Host_posix_MainLoopBase_h_ + +#include + +#include "llvm/Support/ErrorHandling.h" + +#include "lldb/Core/Error.h" +#include "lldb/Host/IOObject.h" + +namespace lldb_private { + +// The purpose of this class is to enable multiplexed processing of data from different sources +// without resorting to multi-threading. Clients can register IOObjects, which will be monitored +// for readability, and when they become ready, the specified callback will be invoked. +// Monitoring for writability is not supported, but can be easily added if needed. +// +// The RegisterReadObject function return a handle, which controls the duration of the monitoring. When +// this handle is destroyed, the callback is deregistered. +// +// This class simply defines the interface common for all platforms, actual implementations are +// platform-specific. +class MainLoopBase +{ +private: + class ReadHandle; + +public: + MainLoopBase() { } + virtual ~MainLoopBase() { } + + typedef std::unique_ptr ReadHandleUP; + + typedef std::function Callback; + + virtual ReadHandleUP + RegisterReadObject(const lldb::IOObjectSP &object_sp, const Callback &callback, Error &error) + { llvm_unreachable("Not implemented"); } + + // Waits for registered events and invoke the proper callbacks. Returns when all callbacks + // deregister themselves or when someone requests termination. + virtual Error + Run() + { llvm_unreachable("Not implemented"); } + + // Requests the exit of the Run() function. + virtual void + RequestTermination() + { llvm_unreachable("Not implemented"); } + +protected: + ReadHandleUP + CreateReadHandle(const lldb::IOObjectSP &object_sp) + { return ReadHandleUP(new ReadHandle(*this, object_sp)); } + + virtual void + UnregisterReadObject(const lldb::IOObjectSP &object_sp) + { llvm_unreachable("Not implemented"); } + +private: + class ReadHandle + { + public: + ~ReadHandle() { m_mainloop.UnregisterReadObject(m_object_sp); } + + private: + ReadHandle(MainLoopBase &mainloop, const lldb::IOObjectSP &object_sp) + : m_mainloop(mainloop), m_object_sp(object_sp) + { } + + MainLoopBase &m_mainloop; + lldb::IOObjectSP m_object_sp; + + friend class MainLoopBase; + DISALLOW_COPY_AND_ASSIGN(ReadHandle); + }; + +private: + DISALLOW_COPY_AND_ASSIGN(MainLoopBase); +}; + +} // namespace lldb_private + + +#endif // lldb_Host_posix_MainLoopBase_h_ Modified: vendor/lldb/dist/include/lldb/Host/StringConvert.h ============================================================================== --- vendor/lldb/dist/include/lldb/Host/StringConvert.h Sun Sep 6 12:02:28 2015 (r287502) +++ vendor/lldb/dist/include/lldb/Host/StringConvert.h Sun Sep 6 14:32:30 2015 (r287503) @@ -39,6 +39,8 @@ ToSInt64 (const char *s, int64_t fail_va uint64_t ToUInt64 (const char *s, uint64_t fail_value = 0, int base = 0, bool *success_ptr = nullptr); +double +ToDouble (const char *s, double fail_value = 0.0, bool *success_ptr = nullptr); } // namespace StringConvert } // namespace lldb_private Modified: vendor/lldb/dist/include/lldb/Host/common/NativeProcessProtocol.h ============================================================================== --- vendor/lldb/dist/include/lldb/Host/common/NativeProcessProtocol.h Sun Sep 6 12:02:28 2015 (r287502) +++ vendor/lldb/dist/include/lldb/Host/common/NativeProcessProtocol.h Sun Sep 6 14:32:30 2015 (r287503) @@ -35,8 +35,6 @@ namespace lldb_private friend class SoftwareBreakpoint; public: - static NativeProcessProtocol * - CreateInstance (lldb::pid_t pid); // lldb_private::Host calls should be used to launch a process for debugging, and // then the process should be attached to. When attaching to a process @@ -44,7 +42,6 @@ namespace lldb_private // and then this function should be called. NativeProcessProtocol (lldb::pid_t pid); - public: virtual ~NativeProcessProtocol () { } @@ -297,6 +294,62 @@ namespace lldb_private virtual Error GetFileLoadAddress(const llvm::StringRef& file_name, lldb::addr_t& load_addr) = 0; + //------------------------------------------------------------------ + /// Launch a process for debugging. This method will create an concrete + /// instance of NativeProcessProtocol, based on the host platform. + /// (e.g. NativeProcessLinux on linux, etc.) + /// + /// @param[in] launch_info + /// Information required to launch the process. + /// + /// @param[in] native_delegate + /// The delegate that will receive messages regarding the + /// inferior. Must outlive the NativeProcessProtocol + /// instance. + /// + /// @param[out] process_sp + /// On successful return from the method, this parameter + /// contains the shared pointer to the + /// NativeProcessProtocol that can be used to manipulate + /// the native process. + /// + /// @return + /// An error object indicating if the operation succeeded, + /// and if not, what error occurred. + //------------------------------------------------------------------ + static Error + Launch (ProcessLaunchInfo &launch_info, + NativeDelegate &native_delegate, + NativeProcessProtocolSP &process_sp); + + //------------------------------------------------------------------ + /// Attach to an existing process. This method will create an concrete + /// instance of NativeProcessProtocol, based on the host platform. + /// (e.g. NativeProcessLinux on linux, etc.) + /// + /// @param[in] pid + /// pid of the process locatable + /// + /// @param[in] native_delegate + /// The delegate that will receive messages regarding the + /// inferior. Must outlive the NativeProcessProtocol + /// instance. + /// + /// @param[out] process_sp + /// On successful return from the method, this parameter + /// contains the shared pointer to the + /// NativeProcessProtocol that can be used to manipulate + /// the native process. + /// + /// @return + /// An error object indicating if the operation succeeded, + /// and if not, what error occurred. + //------------------------------------------------------------------ + static Error + Attach (lldb::pid_t pid, + NativeDelegate &native_delegate, + NativeProcessProtocolSP &process_sp); + protected: lldb::pid_t m_pid; Modified: vendor/lldb/dist/include/lldb/Host/posix/ConnectionFileDescriptorPosix.h ============================================================================== --- vendor/lldb/dist/include/lldb/Host/posix/ConnectionFileDescriptorPosix.h Sun Sep 6 12:02:28 2015 (r287502) +++ vendor/lldb/dist/include/lldb/Host/posix/ConnectionFileDescriptorPosix.h Sun Sep 6 14:32:30 2015 (r287503) @@ -59,12 +59,7 @@ class ConnectionFileDescriptor : public bool InterruptRead() override; lldb::IOObjectSP - GetReadObject() - { - return m_read_sp; - } - const lldb::IOObjectSP - GetReadObject() const + GetReadObject() override { return m_read_sp; } Added: vendor/lldb/dist/include/lldb/Host/posix/MainLoopPosix.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lldb/dist/include/lldb/Host/posix/MainLoopPosix.h Sun Sep 6 14:32:30 2015 (r287503) @@ -0,0 +1,100 @@ +//===-- MainLoopPosix.h -----------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef lldb_Host_posix_MainLoopPosix_h_ +#define lldb_Host_posix_MainLoopPosix_h_ + +#include "lldb/Host/MainLoopBase.h" + +#include "llvm/ADT/DenseMap.h" + +namespace lldb_private { + +// Posix implementation of the MainLoopBase class. It can monitor file descriptors for +// readability using pselect. In addition to the common base, this class provides the ability to +// invoke a given handler when a signal is received. +// +// Since this class is primarily intended to be used for single-threaded processing, it does not +// attempt to perform any internal synchronisation and any concurrent accesses must be protected +// externally. However, it is perfectly legitimate to have more than one instance of this class +// running on separate threads, or even a single thread (with some limitations on signal +// monitoring). +// TODO: Add locking if this class is to be used in a multi-threaded context. +class MainLoopPosix: public MainLoopBase +{ +private: + class SignalHandle; + +public: + typedef std::unique_ptr SignalHandleUP; + + ~MainLoopPosix() override; + + ReadHandleUP + RegisterReadObject(const lldb::IOObjectSP &object_sp, const Callback &callback, Error &error) override; + + // Listening for signals from multiple MainLoopPosix instances is perfectly safe as long as they + // don't try to listen for the same signal. The callback function is invoked when the control + // returns to the Run() function, not when the hander is executed. This means that you can + // treat the callback as a normal function and perform things which would not be safe in a + // signal handler. However, since the callback is not invoked synchronously, you cannot use + // this mechanism to handle SIGSEGV and the like. + SignalHandleUP + RegisterSignal(int signo, const Callback &callback, Error &error); + + Error + Run() override; + + // This should only be performed from a callback. Do not attempt to terminate the processing + // from another thread. + // TODO: Add synchronization if we want to be terminated from another thread. + void + RequestTermination() override + { m_terminate_request = true; } + +protected: + void + UnregisterReadObject(const lldb::IOObjectSP &object_sp) override; + + void + UnregisterSignal(int signo); + +private: + class SignalHandle + { + public: + ~SignalHandle() { m_mainloop.UnregisterSignal(m_signo); } + + private: + SignalHandle(MainLoopPosix &mainloop, int signo) : m_mainloop(mainloop), m_signo(signo) { } + + MainLoopPosix &m_mainloop; + int m_signo; + + friend class MainLoopPosix; + DISALLOW_COPY_AND_ASSIGN(SignalHandle); + }; + + struct SignalInfo + { + Callback callback; + struct sigaction old_action; + bool was_blocked : 1; + }; + + llvm::DenseMap m_read_fds; + llvm::DenseMap m_signals; + bool m_terminate_request : 1; +}; + +} // namespace lldb_private + + +#endif // lldb_Host_posix_MainLoopPosix_h_ + Modified: vendor/lldb/dist/include/lldb/Interpreter/CommandObject.h ============================================================================== --- vendor/lldb/dist/include/lldb/Interpreter/CommandObject.h Sun Sep 6 12:02:28 2015 (r287502) +++ vendor/lldb/dist/include/lldb/Interpreter/CommandObject.h Sun Sep 6 14:32:30 2015 (r287503) @@ -161,6 +161,9 @@ public: } void + FormatLongHelpText (Stream &output_strm, const char *long_help); + + void GenerateHelpText (CommandReturnObject &result); virtual void Modified: vendor/lldb/dist/include/lldb/Symbol/Function.h ============================================================================== --- vendor/lldb/dist/include/lldb/Symbol/Function.h Sun Sep 6 12:02:28 2015 (r287502) +++ vendor/lldb/dist/include/lldb/Symbol/Function.h Sun Sep 6 14:32:30 2015 (r287503) @@ -123,7 +123,7 @@ public: /// @return /// A const reference to the method name object. //------------------------------------------------------------------ - const ConstString& + ConstString GetName () const; //------------------------------------------------------------------ @@ -240,11 +240,14 @@ public: Dump(Stream *s, bool show_fullpaths) const; void - DumpStopContext (Stream *s) const; + DumpStopContext (Stream *s, lldb::LanguageType language) const; - const ConstString & - GetName () const; + ConstString + GetName (lldb::LanguageType language) const; + ConstString + GetDisplayName (lldb::LanguageType language) const; + //------------------------------------------------------------------ /// Get accessor for the call site declaration information. /// @@ -437,6 +440,8 @@ public: return m_range; } + lldb::LanguageType + GetLanguage() const; //------------------------------------------------------------------ /// Find the file and line number of the source location of the start /// of the function. This will use the declaration if present and fall @@ -524,11 +529,14 @@ public: return m_frame_base; } - const ConstString & - GetName() const - { - return m_mangled.GetName(); - } + ConstString + GetName() const; + + ConstString + GetNameNoArguments () const; + + ConstString + GetDisplayName () const; const Mangled & GetMangled() const Modified: vendor/lldb/dist/include/lldb/Symbol/Symbol.h ============================================================================== --- vendor/lldb/dist/include/lldb/Symbol/Symbol.h Sun Sep 6 12:02:28 2015 (r287502) +++ vendor/lldb/dist/include/lldb/Symbol/Symbol.h Sun Sep 6 14:32:30 2015 (r287503) @@ -152,18 +152,28 @@ public: lldb::addr_t ResolveCallableAddress(Target &target) const; - const ConstString & - GetName () const - { - return m_mangled.GetName(); - } + ConstString + GetName () const; + + ConstString + GetNameNoArguments () const; + ConstString + GetDisplayName () const; + uint32_t GetID() const { return m_uid; } + lldb::LanguageType + GetLanguage() const + { + // TODO: See if there is a way to determine the language for a symbol somehow, for now just return our best guess + return m_mangled.GuessLanguage(); + } + void SetID(uint32_t uid) { Modified: vendor/lldb/dist/include/lldb/Symbol/Variable.h ============================================================================== --- vendor/lldb/dist/include/lldb/Symbol/Variable.h Sun Sep 6 12:02:28 2015 (r287502) +++ vendor/lldb/dist/include/lldb/Symbol/Variable.h Sun Sep 6 14:32:30 2015 (r287503) @@ -55,7 +55,7 @@ public: return m_declaration; } - const ConstString& + ConstString GetName() const; SymbolContextScope * @@ -70,12 +70,7 @@ public: // function that can be called by commands and expression parsers to make // sure we match anything we come across. bool - NameMatches (const ConstString &name) const - { - if (m_name == name) - return true; - return m_mangled.NameMatches (name); - } + NameMatches (const ConstString &name) const; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sun Sep 6 14:33:58 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 48B649C5B79; Sun, 6 Sep 2015 14:33:58 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 20BFD1FC0; Sun, 6 Sep 2015 14:33:58 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t86EXvjd084868; Sun, 6 Sep 2015 14:33:57 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t86EXvUu084867; Sun, 6 Sep 2015 14:33:57 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201509061433.t86EXvUu084867@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 6 Sep 2015 14:33:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r287504 - vendor/lldb/lldb-trunk-r242221 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Sep 2015 14:33:58 -0000 Author: dim Date: Sun Sep 6 14:33:57 2015 New Revision: 287504 URL: https://svnweb.freebsd.org/changeset/base/287504 Log: Tag (stripped) lldb trunk r242221. Added: - copied from r287503, vendor/lldb/dist/ Directory Properties: vendor/lldb/lldb-trunk-r242221/ (props changed) From owner-svn-src-all@freebsd.org Sun Sep 6 17:32:35 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2D71B9CB27D; Sun, 6 Sep 2015 17:32:35 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 19FA0145D; Sun, 6 Sep 2015 17:32:35 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t86HWYha058474; Sun, 6 Sep 2015 17:32:34 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t86HWYP6058471; Sun, 6 Sep 2015 17:32:34 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201509061732.t86HWYP6058471@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 6 Sep 2015 17:32:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r287507 - in stable/10/sys: kern sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Sep 2015 17:32:35 -0000 Author: kib Date: Sun Sep 6 17:32:33 2015 New Revision: 287507 URL: https://svnweb.freebsd.org/changeset/base/287507 Log: MFC r287309: Remove single-use macros obfuscating malloc(9) and free(9) calls. Style. Modified: stable/10/sys/kern/ksched.c stable/10/sys/sys/posix4.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/ksched.c ============================================================================== --- stable/10/sys/kern/ksched.c Sun Sep 6 16:17:14 2015 (r287506) +++ stable/10/sys/kern/ksched.c Sun Sep 6 17:32:33 2015 (r287507) @@ -30,8 +30,7 @@ * SUCH DAMAGE. */ -/* ksched: Soft real time scheduling based on "rtprio". - */ +/* ksched: Soft real time scheduling based on "rtprio". */ #include __FBSDID("$FreeBSD$"); @@ -51,8 +50,7 @@ __FBSDID("$FreeBSD$"); FEATURE(kposix_priority_scheduling, "POSIX P1003.1B realtime extensions"); -/* ksched: Real-time extension to support POSIX priority scheduling. - */ +/* ksched: Real-time extension to support POSIX priority scheduling. */ struct ksched { struct timespec rr_interval; @@ -61,21 +59,21 @@ struct ksched { int ksched_attach(struct ksched **p) { - struct ksched *ksched= p31b_malloc(sizeof(*ksched)); + struct ksched *ksched; + ksched = malloc(sizeof(*ksched), M_P31B, M_WAITOK); ksched->rr_interval.tv_sec = 0; ksched->rr_interval.tv_nsec = 1000000000L / hz * sched_rr_interval(); - *p = ksched; - return 0; + return (0); } int ksched_detach(struct ksched *ks) { - p31b_free(ks); - return 0; + free(ks, M_P31B); + return (0); } /* @@ -108,47 +106,39 @@ static __inline int getscheduler(struct ksched *ksched, struct thread *td, int *policy) { struct rtprio rtp; - int e = 0; + int e; + e = 0; pri_to_rtp(td, &rtp); - switch (rtp.type) - { - case RTP_PRIO_FIFO: + switch (rtp.type) { + case RTP_PRIO_FIFO: *policy = SCHED_FIFO; break; - - case RTP_PRIO_REALTIME: + case RTP_PRIO_REALTIME: *policy = SCHED_RR; break; - - default: + default: *policy = SCHED_OTHER; break; } - - return e; + return (e); } int ksched_setparam(struct ksched *ksched, struct thread *td, const struct sched_param *param) { - int policy; - int e; + int e, policy; e = getscheduler(ksched, td, &policy); - if (e == 0) - { - e = ksched_setscheduler(ksched, td, policy, param); - } - - return e; + e = ksched_setscheduler(ksched, td, policy, param); + return (e); } int -ksched_getparam(struct ksched *ksched, - struct thread *td, struct sched_param *param) +ksched_getparam(struct ksched *ksched, struct thread *td, + struct sched_param *param) { struct rtprio rtp; @@ -159,13 +149,14 @@ ksched_getparam(struct ksched *ksched, if (PRI_MIN_TIMESHARE < rtp.prio) /* * The interactive score has it to min realtime - * so we must show max (64 most likely + * so we must show max (64 most likely). */ - param->sched_priority = (PRI_MAX_TIMESHARE - PRI_MIN_TIMESHARE); + param->sched_priority = PRI_MAX_TIMESHARE - + PRI_MIN_TIMESHARE; else param->sched_priority = tsprio_to_p4prio(rtp.prio); } - return 0; + return (0); } /* @@ -176,117 +167,106 @@ ksched_getparam(struct ksched *ksched, * */ int -ksched_setscheduler(struct ksched *ksched, - struct thread *td, int policy, const struct sched_param *param) +ksched_setscheduler(struct ksched *ksched, struct thread *td, int policy, + const struct sched_param *param) { - int e = 0; struct rtprio rtp; + int e; - switch(policy) - { - case SCHED_RR: - case SCHED_FIFO: - + e = 0; + switch(policy) { + case SCHED_RR: + case SCHED_FIFO: if (param->sched_priority >= P1B_PRIO_MIN && - param->sched_priority <= P1B_PRIO_MAX) - { + param->sched_priority <= P1B_PRIO_MAX) { rtp.prio = p4prio_to_rtpprio(param->sched_priority); - rtp.type = (policy == SCHED_FIFO) - ? RTP_PRIO_FIFO : RTP_PRIO_REALTIME; - + rtp.type = (policy == SCHED_FIFO) ? RTP_PRIO_FIFO : + RTP_PRIO_REALTIME; rtp_to_pri(&rtp, td); - } - else + } else { e = EPERM; - - + } break; - - case SCHED_OTHER: - if (param->sched_priority >= 0 && - param->sched_priority <= (PRI_MAX_TIMESHARE - PRI_MIN_TIMESHARE)) { + case SCHED_OTHER: + if (param->sched_priority >= 0 && param->sched_priority <= + (PRI_MAX_TIMESHARE - PRI_MIN_TIMESHARE)) { rtp.type = RTP_PRIO_NORMAL; rtp.prio = p4prio_to_tsprio(param->sched_priority); rtp_to_pri(&rtp, td); - } else + } else { e = EINVAL; - + } + break; + default: + e = EINVAL; break; - - default: - e = EINVAL; - break; } - - return e; + return (e); } int ksched_getscheduler(struct ksched *ksched, struct thread *td, int *policy) { - return getscheduler(ksched, td, policy); + + return (getscheduler(ksched, td, policy)); } -/* ksched_yield: Yield the CPU. - */ +/* ksched_yield: Yield the CPU. */ int ksched_yield(struct ksched *ksched) { + sched_relinquish(curthread); - return 0; + return (0); } int ksched_get_priority_max(struct ksched *ksched, int policy, int *prio) { - int e = 0; + int e; - switch (policy) - { - case SCHED_FIFO: - case SCHED_RR: + e = 0; + switch (policy) { + case SCHED_FIFO: + case SCHED_RR: *prio = RTP_PRIO_MAX; break; - - case SCHED_OTHER: + case SCHED_OTHER: *prio = PRI_MAX_TIMESHARE - PRI_MIN_TIMESHARE; break; - - default: + default: e = EINVAL; + break; } - - return e; + return (e); } int ksched_get_priority_min(struct ksched *ksched, int policy, int *prio) { - int e = 0; + int e; - switch (policy) - { - case SCHED_FIFO: - case SCHED_RR: + e = 0; + switch (policy) { + case SCHED_FIFO: + case SCHED_RR: *prio = P1B_PRIO_MIN; break; - - case SCHED_OTHER: + case SCHED_OTHER: *prio = 0; break; - - default: + default: e = EINVAL; + break; } - - return e; + return (e); } int -ksched_rr_get_interval(struct ksched *ksched, - struct thread *td, struct timespec *timespec) +ksched_rr_get_interval(struct ksched *ksched, struct thread *td, + struct timespec *timespec) { - *timespec = ksched->rr_interval; - return 0; + *timespec = ksched->rr_interval; + return (0); } Modified: stable/10/sys/sys/posix4.h ============================================================================== --- stable/10/sys/sys/posix4.h Sun Sep 6 16:17:14 2015 (r287506) +++ stable/10/sys/sys/posix4.h Sun Sep 6 17:32:33 2015 (r287507) @@ -56,9 +56,6 @@ int sys_ ## SC (struct thread *td, struc MALLOC_DECLARE(M_P31B); -#define p31b_malloc(SIZE) malloc((SIZE), M_P31B, M_WAITOK) -#define p31b_free(P) free((P), M_P31B) - int p31b_proc(struct proc *, pid_t, struct proc **); void p31b_setcfg(int, int); From owner-svn-src-all@freebsd.org Sun Sep 6 17:36:10 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 403BE9CB455; Sun, 6 Sep 2015 17:36:10 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3056017A6; Sun, 6 Sep 2015 17:36:10 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t86HaApX058708; Sun, 6 Sep 2015 17:36:10 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t86HaAtA058707; Sun, 6 Sep 2015 17:36:10 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201509061736.t86HaAtA058707@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 6 Sep 2015 17:36:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r287508 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Sep 2015 17:36:10 -0000 Author: kib Date: Sun Sep 6 17:36:09 2015 New Revision: 287508 URL: https://svnweb.freebsd.org/changeset/base/287508 Log: MFC r287310: Use P1B_PRIO_MAX to designate max posix priority for the RR/FIFO scheduler types. Modified: stable/10/sys/kern/ksched.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/ksched.c ============================================================================== --- stable/10/sys/kern/ksched.c Sun Sep 6 17:32:33 2015 (r287507) +++ stable/10/sys/kern/ksched.c Sun Sep 6 17:36:09 2015 (r287508) @@ -229,7 +229,7 @@ ksched_get_priority_max(struct ksched *k switch (policy) { case SCHED_FIFO: case SCHED_RR: - *prio = RTP_PRIO_MAX; + *prio = P1B_PRIO_MAX; break; case SCHED_OTHER: *prio = PRI_MAX_TIMESHARE - PRI_MIN_TIMESHARE; From owner-svn-src-all@freebsd.org Sun Sep 6 17:47:04 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A3E569CB992; Sun, 6 Sep 2015 17:47:04 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 934331C99; Sun, 6 Sep 2015 17:47:04 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t86Hl41v062798; Sun, 6 Sep 2015 17:47:04 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t86Hl4k1062797; Sun, 6 Sep 2015 17:47:04 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201509061747.t86Hl4k1062797@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Sun, 6 Sep 2015 17:47:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287509 - head/usr.bin/procstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Sep 2015 17:47:04 -0000 Author: allanjude Date: Sun Sep 6 17:47:03 2015 New Revision: 287509 URL: https://svnweb.freebsd.org/changeset/base/287509 Log: Fix inverted output re: stack protection no-execute flag in procstat(1) PR: 196110 Submitted by: Joerg Pernfuss Approved by: bapt (mentor) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D3576 Modified: head/usr.bin/procstat/procstat_auxv.c Modified: head/usr.bin/procstat/procstat_auxv.c ============================================================================== --- head/usr.bin/procstat/procstat_auxv.c Sun Sep 6 17:36:09 2015 (r287508) +++ head/usr.bin/procstat/procstat_auxv.c Sun Sep 6 17:47:03 2015 (r287509) @@ -165,11 +165,11 @@ procstat_auxv(struct procstat *procstat, if ((auxv[i].a_un.a_val & VM_PROT_EXECUTE) != 0) xo_emit("{dw:/%s}{Lw:/%-16s/%s}" "{:AT_STACKPROT/%s}\n", prefix, - "AT_STACKPROT", "NONEXECUTABLE"); + "AT_STACKPROT", "EXECUTABLE"); else xo_emit("{dw:/%s}{Lw:/%-16s/%s}" "{:AT_STACKPROT/%s}\n", prefix, - "AT_STACKPROT", "EXECUTABLE"); + "AT_STACKPROT", "NONEXECUTABLE"); break; #ifdef AT_TIMEKEEP case AT_TIMEKEEP: From owner-svn-src-all@freebsd.org Sun Sep 6 18:34:45 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CE99E9CCF2A; Sun, 6 Sep 2015 18:34:45 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BAAC311A8; Sun, 6 Sep 2015 18:34:45 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t86IYjKT083079; Sun, 6 Sep 2015 18:34:45 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t86IYdva083056; Sun, 6 Sep 2015 18:34:39 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201509061834.t86IYdva083056@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 6 Sep 2015 18:34:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r287510 - in vendor/llvm/dist: . autoconf cmake/modules docs docs/Frontend docs/TableGen docs/tutorial include/llvm-c include/llvm/ADT include/llvm/CodeGen include/llvm/Target lib/Analy... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Sep 2015 18:34:46 -0000 Author: dim Date: Sun Sep 6 18:34:38 2015 New Revision: 287510 URL: https://svnweb.freebsd.org/changeset/base/287510 Log: Import llvm 3.7.0 release (r246257). Added: vendor/llvm/dist/test/CodeGen/Mips/Fast-ISel/fastcc-miss.ll vendor/llvm/dist/test/CodeGen/PowerPC/fp2int2fp-ppcfp128.ll vendor/llvm/dist/test/CodeGen/PowerPC/pr24216.ll vendor/llvm/dist/test/CodeGen/PowerPC/xvcmpeqdp-v2f64.ll vendor/llvm/dist/test/CodeGen/SystemZ/args-07.ll vendor/llvm/dist/test/CodeGen/SystemZ/args-08.ll vendor/llvm/dist/test/CodeGen/SystemZ/vec-args-06.ll vendor/llvm/dist/test/CodeGen/SystemZ/vec-args-07.ll vendor/llvm/dist/test/CodeGen/X86/machine-trace-metrics-crash.ll vendor/llvm/dist/test/MC/Disassembler/PowerPC/ppc64le-encoding.txt (contents, props changed) vendor/llvm/dist/test/Transforms/GVN/pr24397.ll vendor/llvm/dist/test/Transforms/InstCombine/pr24354.ll vendor/llvm/dist/test/Transforms/Scalarizer/cache-bug.ll Deleted: vendor/llvm/dist/test/Analysis/BasicAA/zext.ll Modified: vendor/llvm/dist/CMakeLists.txt vendor/llvm/dist/CREDITS.TXT vendor/llvm/dist/Makefile.config.in vendor/llvm/dist/autoconf/configure.ac vendor/llvm/dist/cmake/modules/HandleLLVMOptions.cmake vendor/llvm/dist/configure vendor/llvm/dist/docs/Atomics.rst vendor/llvm/dist/docs/CMake.rst vendor/llvm/dist/docs/CMakeLists.txt vendor/llvm/dist/docs/CodeGenerator.rst vendor/llvm/dist/docs/CodingStandards.rst vendor/llvm/dist/docs/DeveloperPolicy.rst vendor/llvm/dist/docs/ExtendingLLVM.rst vendor/llvm/dist/docs/Frontend/PerformanceTips.rst vendor/llvm/dist/docs/GettingStarted.rst vendor/llvm/dist/docs/LangRef.rst vendor/llvm/dist/docs/Makefile vendor/llvm/dist/docs/Phabricator.rst vendor/llvm/dist/docs/Projects.rst vendor/llvm/dist/docs/ReleaseNotes.rst vendor/llvm/dist/docs/Statepoints.rst vendor/llvm/dist/docs/TableGen/LangIntro.rst vendor/llvm/dist/docs/TableGen/LangRef.rst vendor/llvm/dist/docs/conf.py vendor/llvm/dist/docs/doxygen.cfg.in vendor/llvm/dist/docs/index.rst vendor/llvm/dist/docs/tutorial/LangImpl9.rst vendor/llvm/dist/docs/tutorial/OCamlLangImpl8.rst vendor/llvm/dist/include/llvm-c/TargetMachine.h vendor/llvm/dist/include/llvm/ADT/SmallVector.h vendor/llvm/dist/include/llvm/ADT/StringMap.h vendor/llvm/dist/include/llvm/CodeGen/LiveRegMatrix.h vendor/llvm/dist/include/llvm/CodeGen/MachineRegisterInfo.h vendor/llvm/dist/include/llvm/Target/TargetMachine.h vendor/llvm/dist/lib/Analysis/BasicAliasAnalysis.cpp vendor/llvm/dist/lib/Analysis/IPA/GlobalsModRef.cpp vendor/llvm/dist/lib/Analysis/InstructionSimplify.cpp vendor/llvm/dist/lib/Analysis/PHITransAddr.cpp vendor/llvm/dist/lib/Analysis/VectorUtils.cpp vendor/llvm/dist/lib/CodeGen/ExecutionDepsFix.cpp vendor/llvm/dist/lib/CodeGen/LiveRegMatrix.cpp vendor/llvm/dist/lib/CodeGen/MachineRegisterInfo.cpp vendor/llvm/dist/lib/CodeGen/MachineTraceMetrics.cpp vendor/llvm/dist/lib/CodeGen/PrologEpilogInserter.cpp vendor/llvm/dist/lib/CodeGen/RegAllocFast.cpp vendor/llvm/dist/lib/CodeGen/RegisterCoalescer.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/DAGCombiner.cpp vendor/llvm/dist/lib/CodeGen/VirtRegMap.cpp vendor/llvm/dist/lib/ExecutionEngine/ExecutionEngine.cpp vendor/llvm/dist/lib/ExecutionEngine/MCJIT/MCJIT.cpp vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/RTDyldMemoryManager.cpp vendor/llvm/dist/lib/IR/Type.cpp vendor/llvm/dist/lib/Support/MemoryBuffer.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64A57FPLoadBalancing.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64FrameLowering.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPU.td vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUSubtarget.cpp vendor/llvm/dist/lib/Target/AMDGPU/AMDGPUSubtarget.h vendor/llvm/dist/lib/Target/AMDGPU/AMDILCFGStructurizer.cpp vendor/llvm/dist/lib/Target/AMDGPU/Processors.td vendor/llvm/dist/lib/Target/AMDGPU/SIISelLowering.cpp vendor/llvm/dist/lib/Target/AMDGPU/SIISelLowering.h vendor/llvm/dist/lib/Target/AMDGPU/SIInstrInfo.td vendor/llvm/dist/lib/Target/AMDGPU/SIInstructions.td vendor/llvm/dist/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp vendor/llvm/dist/lib/Target/AMDGPU/SIPrepareScratchRegs.cpp vendor/llvm/dist/lib/Target/AMDGPU/SIRegisterInfo.cpp vendor/llvm/dist/lib/Target/AMDGPU/VIInstructions.td vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.cpp vendor/llvm/dist/lib/Target/ARM/ARMLoadStoreOptimizer.cpp vendor/llvm/dist/lib/Target/ARM/README.txt vendor/llvm/dist/lib/Target/ARM/Thumb1InstrInfo.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonFrameLowering.cpp vendor/llvm/dist/lib/Target/Mips/Mips64InstrInfo.td vendor/llvm/dist/lib/Target/Mips/MipsFastISel.cpp vendor/llvm/dist/lib/Target/Mips/MipsISelLowering.cpp vendor/llvm/dist/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCAsmPrinter.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCFrameLowering.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCISelLowering.cpp vendor/llvm/dist/lib/Target/README.txt vendor/llvm/dist/lib/Target/Sparc/SparcFrameLowering.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZCallingConv.td vendor/llvm/dist/lib/Target/SystemZ/SystemZISelLowering.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZISelLowering.h vendor/llvm/dist/lib/Target/X86/AsmParser/X86AsmParser.cpp vendor/llvm/dist/lib/Target/X86/X86FloatingPoint.cpp vendor/llvm/dist/lib/Target/X86/X86FrameLowering.cpp vendor/llvm/dist/lib/Target/X86/X86ISelLowering.cpp vendor/llvm/dist/lib/Target/X86/X86InstrInfo.cpp vendor/llvm/dist/lib/Target/X86/X86InstrSSE.td vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCompares.cpp vendor/llvm/dist/lib/Transforms/Scalar/EarlyCSE.cpp vendor/llvm/dist/lib/Transforms/Scalar/SROA.cpp vendor/llvm/dist/lib/Transforms/Scalar/Scalarizer.cpp vendor/llvm/dist/test/Analysis/BasicAA/gep-alias.ll vendor/llvm/dist/test/Analysis/BasicAA/phi-aa.ll vendor/llvm/dist/test/CodeGen/AMDGPU/cgp-addressing-modes.ll vendor/llvm/dist/test/CodeGen/AMDGPU/global_atomics.ll vendor/llvm/dist/test/CodeGen/AMDGPU/gv-const-addrspace.ll vendor/llvm/dist/test/CodeGen/AMDGPU/llvm.AMDGPU.fract.f64.ll vendor/llvm/dist/test/CodeGen/AMDGPU/private-memory.ll vendor/llvm/dist/test/CodeGen/AMDGPU/scratch-buffer.ll vendor/llvm/dist/test/CodeGen/AMDGPU/smrd.ll vendor/llvm/dist/test/CodeGen/ARM/ldrd.ll vendor/llvm/dist/test/CodeGen/Mips/Fast-ISel/br1.ll vendor/llvm/dist/test/CodeGen/Mips/Fast-ISel/bswap1.ll vendor/llvm/dist/test/CodeGen/Mips/Fast-ISel/callabi.ll vendor/llvm/dist/test/CodeGen/Mips/Fast-ISel/constexpr-address.ll vendor/llvm/dist/test/CodeGen/Mips/Fast-ISel/div1.ll vendor/llvm/dist/test/CodeGen/Mips/Fast-ISel/fastalloca.ll vendor/llvm/dist/test/CodeGen/Mips/Fast-ISel/fpcmpa.ll vendor/llvm/dist/test/CodeGen/Mips/Fast-ISel/fpext.ll vendor/llvm/dist/test/CodeGen/Mips/Fast-ISel/fpintconv.ll vendor/llvm/dist/test/CodeGen/Mips/Fast-ISel/fptrunc.ll vendor/llvm/dist/test/CodeGen/Mips/Fast-ISel/icmpa.ll vendor/llvm/dist/test/CodeGen/Mips/Fast-ISel/loadstore2.ll vendor/llvm/dist/test/CodeGen/Mips/Fast-ISel/loadstoreconv.ll vendor/llvm/dist/test/CodeGen/Mips/Fast-ISel/loadstrconst.ll vendor/llvm/dist/test/CodeGen/Mips/Fast-ISel/logopm.ll vendor/llvm/dist/test/CodeGen/Mips/Fast-ISel/memtest1.ll vendor/llvm/dist/test/CodeGen/Mips/Fast-ISel/mul1.ll vendor/llvm/dist/test/CodeGen/Mips/Fast-ISel/nullvoid.ll vendor/llvm/dist/test/CodeGen/Mips/Fast-ISel/overflt.ll vendor/llvm/dist/test/CodeGen/Mips/Fast-ISel/rem1.ll vendor/llvm/dist/test/CodeGen/Mips/Fast-ISel/retabi.ll vendor/llvm/dist/test/CodeGen/Mips/Fast-ISel/sel1.ll vendor/llvm/dist/test/CodeGen/Mips/Fast-ISel/shftopm.ll vendor/llvm/dist/test/CodeGen/Mips/Fast-ISel/shift.ll vendor/llvm/dist/test/CodeGen/Mips/Fast-ISel/simplestore.ll vendor/llvm/dist/test/CodeGen/Mips/Fast-ISel/simplestorefp1.ll vendor/llvm/dist/test/CodeGen/Mips/Fast-ISel/simplestorei.ll vendor/llvm/dist/test/CodeGen/Mips/delay-slot-kill.ll vendor/llvm/dist/test/CodeGen/Mips/emergency-spill-slot-near-fp.ll vendor/llvm/dist/test/CodeGen/Mips/llvm-ir/and.ll vendor/llvm/dist/test/CodeGen/Mips/llvm-ir/or.ll vendor/llvm/dist/test/CodeGen/Mips/llvm-ir/xor.ll vendor/llvm/dist/test/CodeGen/PowerPC/ppc64-patchpoint.ll vendor/llvm/dist/test/CodeGen/PowerPC/vec_shuffle_le.ll vendor/llvm/dist/test/CodeGen/PowerPC/vsx.ll vendor/llvm/dist/test/CodeGen/PowerPC/vsx_insert_extract_le.ll vendor/llvm/dist/test/CodeGen/SystemZ/args-04.ll vendor/llvm/dist/test/CodeGen/X86/fdiv-combine.ll vendor/llvm/dist/test/CodeGen/X86/pr2656.ll vendor/llvm/dist/test/CodeGen/X86/sse-fcopysign.ll vendor/llvm/dist/test/CodeGen/X86/vec_fabs.ll vendor/llvm/dist/test/DebugInfo/Mips/delay-slot.ll vendor/llvm/dist/test/MC/AMDGPU/vopc.s vendor/llvm/dist/test/MC/X86/intel-syntax.s vendor/llvm/dist/test/Object/archive-extract.test vendor/llvm/dist/test/Transforms/InstCombine/vector-casts.ll vendor/llvm/dist/test/Transforms/InstSimplify/2011-09-05-InsertExtractValue.ll vendor/llvm/dist/test/Transforms/SROA/basictest.ll vendor/llvm/dist/test/Transforms/SROA/big-endian.ll vendor/llvm/dist/test/Transforms/SROA/phi-and-select.ll vendor/llvm/dist/tools/llvm-config/CMakeLists.txt vendor/llvm/dist/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp vendor/llvm/dist/utils/emacs/README vendor/llvm/dist/utils/jedit/README vendor/llvm/dist/utils/kate/README vendor/llvm/dist/utils/release/export.sh vendor/llvm/dist/utils/release/tag.sh vendor/llvm/dist/utils/release/test-release.sh vendor/llvm/dist/utils/unittest/googletest/README.LLVM vendor/llvm/dist/utils/vim/README Modified: vendor/llvm/dist/CMakeLists.txt ============================================================================== --- vendor/llvm/dist/CMakeLists.txt Sun Sep 6 17:47:03 2015 (r287509) +++ vendor/llvm/dist/CMakeLists.txt Sun Sep 6 18:34:38 2015 (r287510) @@ -61,7 +61,7 @@ set(CMAKE_MODULE_PATH set(LLVM_VERSION_MAJOR 3) set(LLVM_VERSION_MINOR 7) set(LLVM_VERSION_PATCH 0) -set(LLVM_VERSION_SUFFIX svn) +set(LLVM_VERSION_SUFFIX "") if (NOT PACKAGE_VERSION) set(PACKAGE_VERSION @@ -518,7 +518,7 @@ if (APPLE) else(UNIX) if(NOT DEFINED CMAKE_INSTALL_RPATH) set(CMAKE_INSTALL_RPATH "\$ORIGIN/../lib${LLVM_LIBDIR_SUFFIX}") - if (${CMAKE_SYSTEM_NAME} MATCHES FreeBSD) + if(${CMAKE_SYSTEM_NAME} MATCHES "(FreeBSD|DragonFly)") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-z,origin") set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,origin") endif() @@ -544,12 +544,12 @@ if(LLVM_USE_HOST_TOOLS) include(CrossCompile) endif(LLVM_USE_HOST_TOOLS) -if( ${CMAKE_SYSTEM_NAME} MATCHES FreeBSD ) +if(${CMAKE_SYSTEM_NAME} MATCHES "(FreeBSD|DragonFly)") # On FreeBSD, /usr/local/* is not used by default. In order to build LLVM # with libxml2, iconv.h, etc., we must add /usr/local paths. include_directories("/usr/local/include") link_directories("/usr/local/lib") -endif( ${CMAKE_SYSTEM_NAME} MATCHES FreeBSD ) +endif(${CMAKE_SYSTEM_NAME} MATCHES "(FreeBSD|DragonFly)") if( ${CMAKE_SYSTEM_NAME} MATCHES SunOS ) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -include llvm/Support/Solaris.h") Modified: vendor/llvm/dist/CREDITS.TXT ============================================================================== --- vendor/llvm/dist/CREDITS.TXT Sun Sep 6 17:47:03 2015 (r287509) +++ vendor/llvm/dist/CREDITS.TXT Sun Sep 6 18:34:38 2015 (r287510) @@ -465,3 +465,47 @@ N: Bob Wilson E: bob.wilson@acm.org D: Advanced SIMD (NEON) support in the ARM backend. +N: Alexey Bataev +E: a.bataev@hotmail.com +D: Clang OpenMP implementation + +N: Andrey Bokhanko +E: andreybokhanko@gmail.com +D: Clang OpenMP implementation + +N: Carlo Bertolli +E: cbertol@us.ibm.com +D: Clang OpenMP implementation + +N: Eric Stotzer +E: estotzer@ti.com +D: Clang OpenMP implementation + +N: Kelvin Li +E: kkwli0@gmail.com +D: Clang OpenMP implementation + +N: Samuel Antao +E: sfantao@us.ibm.com +D: Clang OpenMP implementation + +N: Sergey Ostanevich +E: sergos.gnu@gmail.com +D: Clang OpenMP implementation + +N: Alexandre Eichenberger +E: alexe@us.ibm.com +D: Clang OpenMP implementation + +N: Guansong Zhang +E: guansong.zhang@amd.com +D: Clang OpenMP implementation + +N: Sunita Chandrasekaran +E: sunisg123@gmail.com +D: Clang OpenMP implementation + +N: Michael Wong +E: fraggamuffin@gmail.com +D: Clang OpenMP implementation + Modified: vendor/llvm/dist/Makefile.config.in ============================================================================== --- vendor/llvm/dist/Makefile.config.in Sun Sep 6 17:47:03 2015 (r287509) +++ vendor/llvm/dist/Makefile.config.in Sun Sep 6 18:34:38 2015 (r287510) @@ -58,7 +58,7 @@ LLVM_OBJ_ROOT := $(call realpath, @abs PROJ_SRC_ROOT := $(LLVM_SRC_ROOT) PROJ_SRC_DIR := $(LLVM_SRC_ROOT)$(patsubst $(PROJ_OBJ_ROOT)%,%,$(PROJ_OBJ_DIR)) -# See: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20150323/268067.html +# See: http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20150323/268067.html ifeq ($(LLVM_SRC_ROOT), $(LLVM_OBJ_ROOT)) $(error In-source builds are not allowed. Please configure from a separate build directory!) endif Modified: vendor/llvm/dist/autoconf/configure.ac ============================================================================== --- vendor/llvm/dist/autoconf/configure.ac Sun Sep 6 17:47:03 2015 (r287509) +++ vendor/llvm/dist/autoconf/configure.ac Sun Sep 6 18:34:38 2015 (r287510) @@ -32,12 +32,12 @@ dnl===---------------------------------- dnl Initialize autoconf and define the package name, version number and dnl address for reporting bugs. -AC_INIT([LLVM],[3.7.0svn],[http://llvm.org/bugs/]) +AC_INIT([LLVM],[3.7.0],[http://llvm.org/bugs/]) LLVM_VERSION_MAJOR=3 LLVM_VERSION_MINOR=7 LLVM_VERSION_PATCH=0 -LLVM_VERSION_SUFFIX=svn +LLVM_VERSION_SUFFIX= AC_DEFINE_UNQUOTED([LLVM_VERSION_MAJOR], $LLVM_VERSION_MAJOR, [Major version of the LLVM API]) AC_DEFINE_UNQUOTED([LLVM_VERSION_MINOR], $LLVM_VERSION_MINOR, [Minor version of the LLVM API]) Modified: vendor/llvm/dist/cmake/modules/HandleLLVMOptions.cmake ============================================================================== --- vendor/llvm/dist/cmake/modules/HandleLLVMOptions.cmake Sun Sep 6 17:47:03 2015 (r287509) +++ vendor/llvm/dist/cmake/modules/HandleLLVMOptions.cmake Sun Sep 6 18:34:38 2015 (r287510) @@ -131,7 +131,7 @@ endif() # Pass -Wl,-z,defs. This makes sure all symbols are defined. Otherwise a DSO # build might work on ELF but fail on MachO/COFF. -if(NOT (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" OR WIN32 OR +if(NOT (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" OR WIN32 OR CYGWIN OR ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") AND NOT LLVM_USE_SANITIZER) set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,defs") Modified: vendor/llvm/dist/configure ============================================================================== --- vendor/llvm/dist/configure Sun Sep 6 17:47:03 2015 (r287509) +++ vendor/llvm/dist/configure Sun Sep 6 18:34:38 2015 (r287510) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.60 for LLVM 3.7.0svn. +# Generated by GNU Autoconf 2.60 for LLVM 3.7.0. # # Report bugs to . # @@ -561,8 +561,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='LLVM' PACKAGE_TARNAME='llvm' -PACKAGE_VERSION='3.7.0svn' -PACKAGE_STRING='LLVM 3.7.0svn' +PACKAGE_VERSION='3.7.0' +PACKAGE_STRING='LLVM 3.7.0' PACKAGE_BUGREPORT='http://llvm.org/bugs/' ac_unique_file="lib/IR/Module.cpp" @@ -1333,7 +1333,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures LLVM 3.7.0svn to adapt to many kinds of systems. +\`configure' configures LLVM 3.7.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1399,7 +1399,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of LLVM 3.7.0svn:";; + short | recursive ) echo "Configuration of LLVM 3.7.0:";; esac cat <<\_ACEOF @@ -1583,7 +1583,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -LLVM configure 3.7.0svn +LLVM configure 3.7.0 generated by GNU Autoconf 2.60 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1599,7 +1599,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by LLVM $as_me 3.7.0svn, which was +It was created by LLVM $as_me 3.7.0, which was generated by GNU Autoconf 2.60. Invocation command line was $ $0 $@ @@ -1956,7 +1956,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu LLVM_VERSION_MAJOR=3 LLVM_VERSION_MINOR=7 LLVM_VERSION_PATCH=0 -LLVM_VERSION_SUFFIX=svn +LLVM_VERSION_SUFFIX= cat >>confdefs.h <<_ACEOF @@ -18610,7 +18610,7 @@ exec 6>&1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by LLVM $as_me 3.7.0svn, which was +This file was extended by LLVM $as_me 3.7.0, which was generated by GNU Autoconf 2.60. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18663,7 +18663,7 @@ Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -LLVM config.status 3.7.0svn +LLVM config.status 3.7.0 configured by $0, generated by GNU Autoconf 2.60, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Modified: vendor/llvm/dist/docs/Atomics.rst ============================================================================== --- vendor/llvm/dist/docs/Atomics.rst Sun Sep 6 17:47:03 2015 (r287509) +++ vendor/llvm/dist/docs/Atomics.rst Sun Sep 6 18:34:38 2015 (r287510) @@ -173,7 +173,7 @@ Notes for code generation also expected to generate an i8 store as an i8 store, and not an instruction which writes to surrounding bytes. (If you are writing a backend for an architecture which cannot satisfy these restrictions and cares about - concurrency, please send an email to llvmdev.) + concurrency, please send an email to llvm-dev.) Unordered --------- Modified: vendor/llvm/dist/docs/CMake.rst ============================================================================== --- vendor/llvm/dist/docs/CMake.rst Sun Sep 6 17:47:03 2015 (r287509) +++ vendor/llvm/dist/docs/CMake.rst Sun Sep 6 18:34:38 2015 (r287510) @@ -387,6 +387,10 @@ LLVM-specific variables ``-DLLVM_ENABLE_DOXYGEN_QT_HELP=ON``; otherwise this has no effect. +**LLVM_DOXYGEN_SVG**:BOOL + Uses .svg files instead of .png files for graphs in the Doxygen output. + Defaults to OFF. + **LLVM_ENABLE_SPHINX**:BOOL If enabled CMake will search for the ``sphinx-build`` executable and will make the ``SPHINX_OUTPUT_HTML`` and ``SPHINX_OUTPUT_MAN`` CMake options available. Modified: vendor/llvm/dist/docs/CMakeLists.txt ============================================================================== --- vendor/llvm/dist/docs/CMakeLists.txt Sun Sep 6 17:47:03 2015 (r287509) +++ vendor/llvm/dist/docs/CMakeLists.txt Sun Sep 6 18:34:38 2015 (r287510) @@ -56,6 +56,14 @@ if (LLVM_ENABLE_DOXYGEN) set(llvm_doxygen_qhp_cust_filter_attrs "") endif() + option(LLVM_DOXYGEN_SVG + "Use svg instead of png files for doxygen graphs." OFF) + if (LLVM_DOXYGEN_SVG) + set(DOT_IMAGE_FORMAT "svg") + else() + set(DOT_IMAGE_FORMAT "png") + endif() + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxygen.cfg.in ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg @ONLY) @@ -73,6 +81,7 @@ if (LLVM_ENABLE_DOXYGEN) set(llvm_doxygen_qhelpgenerator_path) set(llvm_doxygen_qhp_cust_filter_name) set(llvm_doxygen_qhp_cust_filter_attrs) + set(DOT_IMAGE_FORMAT) add_custom_target(doxygen-llvm COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg Modified: vendor/llvm/dist/docs/CodeGenerator.rst ============================================================================== --- vendor/llvm/dist/docs/CodeGenerator.rst Sun Sep 6 17:47:03 2015 (r287509) +++ vendor/llvm/dist/docs/CodeGenerator.rst Sun Sep 6 18:34:38 2015 (r287510) @@ -1814,6 +1814,7 @@ Here is the table: :raw-html:`SystemZ` :raw-html:`X86` :raw-html:`XCore` +:raw-html:`eBPF` :raw-html:`` :raw-html:`` @@ -1828,6 +1829,7 @@ Here is the table: :raw-html:` ` :raw-html:` ` :raw-html:` ` +:raw-html:` ` :raw-html:`` :raw-html:`` @@ -1842,6 +1844,7 @@ Here is the table: :raw-html:` ` :raw-html:` ` :raw-html:` ` +:raw-html:` ` :raw-html:`` :raw-html:`` @@ -1856,6 +1859,7 @@ Here is the table: :raw-html:` ` :raw-html:` ` :raw-html:` ` +:raw-html:` ` :raw-html:`` :raw-html:`` @@ -1870,6 +1874,7 @@ Here is the table: :raw-html:` ` :raw-html:` ` :raw-html:` ` +:raw-html:` ` :raw-html:`` :raw-html:`` @@ -1884,6 +1889,7 @@ Here is the table: :raw-html:` ` :raw-html:` ` :raw-html:` ` +:raw-html:` ` :raw-html:`` :raw-html:`` @@ -1898,6 +1904,7 @@ Here is the table: :raw-html:` ` :raw-html:` ` :raw-html:` ` +:raw-html:` ` :raw-html:`` :raw-html:`` @@ -1912,6 +1919,7 @@ Here is the table: :raw-html:` ` :raw-html:` ` :raw-html:` ` +:raw-html:` ` :raw-html:`` :raw-html:`` @@ -1926,6 +1934,7 @@ Here is the table: :raw-html:` ` :raw-html:`* ` :raw-html:` ` +:raw-html:` ` :raw-html:`` :raw-html:`` @@ -2448,3 +2457,191 @@ Code Generator Options: :raw-html:`` :raw-html:`` +The extended Berkeley Packet Filter (eBPF) backend +-------------------------------------------------- + +Extended BPF (or eBPF) is similar to the original ("classic") BPF (cBPF) used +to filter network packets. The +`bpf() system call `_ +performs a range of operations related to eBPF. For both cBPF and eBPF +programs, the Linux kernel statically analyzes the programs before loading +them, in order to ensure that they cannot harm the running system. eBPF is +a 64-bit RISC instruction set designed for one to one mapping to 64-bit CPUs. +Opcodes are 8-bit encoded, and 87 instructions are defined. There are 10 +registers, grouped by function as outlined below. + +:: + + R0 return value from in-kernel functions; exit value for eBPF program + R1 - R5 function call arguments to in-kernel functions + R6 - R9 callee-saved registers preserved by in-kernel functions + R10 stack frame pointer (read only) + +Instruction encoding (arithmetic and jump) +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +eBPF is reusing most of the opcode encoding from classic to simplify conversion +of classic BPF to eBPF. For arithmetic and jump instructions the 8-bit 'code' +field is divided into three parts: + +:: + + +----------------+--------+--------------------+ + | 4 bits | 1 bit | 3 bits | + | operation code | source | instruction class | + +----------------+--------+--------------------+ + (MSB) (LSB) + +Three LSB bits store instruction class which is one of: + +:: + + BPF_LD 0x0 + BPF_LDX 0x1 + BPF_ST 0x2 + BPF_STX 0x3 + BPF_ALU 0x4 + BPF_JMP 0x5 + (unused) 0x6 + BPF_ALU64 0x7 + +When BPF_CLASS(code) == BPF_ALU or BPF_ALU64 or BPF_JMP, +4th bit encodes source operand + +:: + + BPF_X 0x0 use src_reg register as source operand + BPF_K 0x1 use 32 bit immediate as source operand + +and four MSB bits store operation code + +:: + + BPF_ADD 0x0 add + BPF_SUB 0x1 subtract + BPF_MUL 0x2 multiply + BPF_DIV 0x3 divide + BPF_OR 0x4 bitwise logical OR + BPF_AND 0x5 bitwise logical AND + BPF_LSH 0x6 left shift + BPF_RSH 0x7 right shift (zero extended) + BPF_NEG 0x8 arithmetic negation + BPF_MOD 0x9 modulo + BPF_XOR 0xa bitwise logical XOR + BPF_MOV 0xb move register to register + BPF_ARSH 0xc right shift (sign extended) + BPF_END 0xd endianness conversion + +If BPF_CLASS(code) == BPF_JMP, BPF_OP(code) is one of + +:: + + BPF_JA 0x0 unconditional jump + BPF_JEQ 0x1 jump == + BPF_JGT 0x2 jump > + BPF_JGE 0x3 jump >= + BPF_JSET 0x4 jump if (DST & SRC) + BPF_JNE 0x5 jump != + BPF_JSGT 0x6 jump signed > + BPF_JSGE 0x7 jump signed >= + BPF_CALL 0x8 function call + BPF_EXIT 0x9 function return + +Instruction encoding (load, store) +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +For load and store instructions the 8-bit 'code' field is divided as: + +:: + + +--------+--------+-------------------+ + | 3 bits | 2 bits | 3 bits | + | mode | size | instruction class | + +--------+--------+-------------------+ + (MSB) (LSB) + +Size modifier is one of + +:: + + BPF_W 0x0 word + BPF_H 0x1 half word + BPF_B 0x2 byte + BPF_DW 0x3 double word + +Mode modifier is one of + +:: + + BPF_IMM 0x0 immediate + BPF_ABS 0x1 used to access packet data + BPF_IND 0x2 used to access packet data + BPF_MEM 0x3 memory + (reserved) 0x4 + (reserved) 0x5 + BPF_XADD 0x6 exclusive add + + +Packet data access (BPF_ABS, BPF_IND) +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Two non-generic instructions: (BPF_ABS | | BPF_LD) and +(BPF_IND | | BPF_LD) which are used to access packet data. +Register R6 is an implicit input that must contain pointer to sk_buff. +Register R0 is an implicit output which contains the data fetched +from the packet. Registers R1-R5 are scratch registers and must not +be used to store the data across BPF_ABS | BPF_LD or BPF_IND | BPF_LD +instructions. These instructions have implicit program exit condition +as well. When eBPF program is trying to access the data beyond +the packet boundary, the interpreter will abort the execution of the program. + +BPF_IND | BPF_W | BPF_LD is equivalent to: + R0 = ntohl(\*(u32 \*) (((struct sk_buff \*) R6)->data + src_reg + imm32)) + +eBPF maps +^^^^^^^^^ + +eBPF maps are provided for sharing data between kernel and user-space. +Currently implemented types are hash and array, with potential extension to +support bloom filters, radix trees, etc. A map is defined by its type, +maximum number of elements, key size and value size in bytes. eBPF syscall +supports create, update, find and delete functions on maps. + +Function calls +^^^^^^^^^^^^^^ + +Function call arguments are passed using up to five registers (R1 - R5). +The return value is passed in a dedicated register (R0). Four additional +registers (R6 - R9) are callee-saved, and the values in these registers +are preserved within kernel functions. R0 - R5 are scratch registers within +kernel functions, and eBPF programs must therefor store/restore values in +these registers if needed across function calls. The stack can be accessed +using the read-only frame pointer R10. eBPF registers map 1:1 to hardware +registers on x86_64 and other 64-bit architectures. For example, x86_64 +in-kernel JIT maps them as + +:: + + R0 - rax + R1 - rdi + R2 - rsi + R3 - rdx + R4 - rcx + R5 - r8 + R6 - rbx + R7 - r13 + R8 - r14 + R9 - r15 + R10 - rbp + +since x86_64 ABI mandates rdi, rsi, rdx, rcx, r8, r9 for argument passing +and rbx, r12 - r15 are callee saved. + +Program start +^^^^^^^^^^^^^ + +An eBPF program receives a single argument and contains +a single eBPF main routine; the program does not contain eBPF functions. +Function calls are limited to a predefined set of kernel functions. The size +of a program is limited to 4K instructions: this ensures fast termination and +a limited number of kernel function calls. Prior to running an eBPF program, +a verifier performs static analysis to prevent loops in the code and +to ensure valid register usage and operand types. Modified: vendor/llvm/dist/docs/CodingStandards.rst ============================================================================== --- vendor/llvm/dist/docs/CodingStandards.rst Sun Sep 6 17:47:03 2015 (r287509) +++ vendor/llvm/dist/docs/CodingStandards.rst Sun Sep 6 18:34:38 2015 (r287510) @@ -28,7 +28,7 @@ Note that some code bases (e.g. ``libc++ from the coding standards. In the case of ``libc++``, this is because the naming and other conventions are dictated by the C++ standard. If you think there is a specific good reason to deviate from the standards here, please bring -it up on the LLVMdev mailing list. +it up on the LLVM-dev mailing list. There are some conventions that are not uniformly followed in the code base (e.g. the naming convention). This is because they are relatively new, and a Modified: vendor/llvm/dist/docs/DeveloperPolicy.rst ============================================================================== --- vendor/llvm/dist/docs/DeveloperPolicy.rst Sun Sep 6 17:47:03 2015 (r287509) +++ vendor/llvm/dist/docs/DeveloperPolicy.rst Sun Sep 6 18:34:38 2015 (r287510) @@ -30,7 +30,7 @@ This policy is also designed to accompli This policy is aimed at frequent contributors to LLVM. People interested in contributing one-off patches can do so in an informal way by sending them to the `llvm-commits mailing list -`_ and engaging another +`_ and engaging another developer to see it through the process. Developer Policies @@ -47,23 +47,23 @@ Stay Informed ------------- Developers should stay informed by reading at least the "dev" mailing list for -the projects you are interested in, such as `llvmdev -`_ for LLVM, `cfe-dev -`_ for Clang, or `lldb-dev -`_ for LLDB. If you are +the projects you are interested in, such as `llvm-dev +`_ for LLVM, `cfe-dev +`_ for Clang, or `lldb-dev +`_ for LLDB. If you are doing anything more than just casual work on LLVM, it is suggested that you also subscribe to the "commits" mailing list for the subproject you're interested in, such as `llvm-commits -`_, `cfe-commits -`_, or `lldb-commits -`_. Reading the +`_, `cfe-commits +`_, or `lldb-commits +`_. Reading the "commits" list and paying attention to changes being made by others is a good way to see what other people are interested in and watching the flow of the project as a whole. We recommend that active developers register an email account with `LLVM Bugzilla `_ and preferably subscribe to the `llvm-bugs -`_ email list to keep track +`_ email list to keep track of bugs and enhancements occurring in LLVM. We really appreciate people who are proactive at catching incoming bugs in their components and dealing with them promptly. @@ -365,7 +365,7 @@ If you have recently been granted commit #. You are granted *commit-after-approval* to all parts of LLVM. To get approval, submit a `patch`_ to `llvm-commits - `_. When approved, + `_. When approved, you may commit it yourself. #. You are allowed to commit patches without approval which you think are @@ -394,8 +394,8 @@ Making a Major Change --------------------- When a developer begins a major new project with the aim of contributing it back -to LLVM, they should inform the community with an email to the `llvmdev -`_ email list, to the extent +to LLVM, they should inform the community with an email to the `llvm-dev +`_ email list, to the extent possible. The reason for this is to: #. keep the community informed about future changes to LLVM, @@ -608,7 +608,7 @@ LICENSE.txt files specifically indicate We have no plans to change the license of LLVM. If you have questions or comments about the license, please contact the `LLVM Developer's Mailing -List `_. +List `_. Patents ------- Modified: vendor/llvm/dist/docs/ExtendingLLVM.rst ============================================================================== --- vendor/llvm/dist/docs/ExtendingLLVM.rst Sun Sep 6 17:47:03 2015 (r287509) +++ vendor/llvm/dist/docs/ExtendingLLVM.rst Sun Sep 6 18:34:38 2015 (r287510) @@ -15,7 +15,7 @@ When you come to this realization, stop LLVM? Is it a new fundamental capability that LLVM does not support at its current incarnation or can it be synthesized from already pre-existing LLVM elements? If you are not sure, ask on the `LLVM-dev -`_ list. The reason is that +`_ list. The reason is that extending LLVM will get involved as you need to update all the different passes that you intend to use with your extension, and there are ``many`` LLVM analyses and transformations, so it may be quite a bit of work. Modified: vendor/llvm/dist/docs/Frontend/PerformanceTips.rst ============================================================================== --- vendor/llvm/dist/docs/Frontend/PerformanceTips.rst Sun Sep 6 17:47:03 2015 (r287509) +++ vendor/llvm/dist/docs/Frontend/PerformanceTips.rst Sun Sep 6 18:34:38 2015 (r287510) @@ -174,10 +174,10 @@ Adding to this document If you run across a case that you feel deserves to be covered here, please send a patch to `llvm-commits -`_ for review. +`_ for review. -If you have questions on these items, please direct them to `llvmdev -`_. The more relevant +If you have questions on these items, please direct them to `llvm-dev +`_. The more relevant context you are able to give to your question, the more likely it is to be answered. Modified: vendor/llvm/dist/docs/GettingStarted.rst ============================================================================== --- vendor/llvm/dist/docs/GettingStarted.rst Sun Sep 6 17:47:03 2015 (r287509) +++ vendor/llvm/dist/docs/GettingStarted.rst Sun Sep 6 18:34:38 2015 (r287510) @@ -714,9 +714,9 @@ used by people developing LLVM. | | the configure script. The default list is defined | | | as ``LLVM_ALL_TARGETS``, and can be set to include | | | out-of-tree targets. The default value includes: | -| | ``AArch64, ARM, CppBackend, Hexagon, | -| | Mips, MSP430, NVPTX, PowerPC, AMDGPU, Sparc, | -| | SystemZ, X86, XCore``. | +| | ``AArch64, AMDGPU, ARM, BPF, CppBackend, Hexagon, | +| | Mips, MSP430, NVPTX, PowerPC, Sparc, SystemZ | +| | X86, XCore``. | +-------------------------+----------------------------------------------------+ | LLVM_ENABLE_DOXYGEN | Build doxygen-based documentation from the source | | | code This is disabled by default because it is | Modified: vendor/llvm/dist/docs/LangRef.rst ============================================================================== --- vendor/llvm/dist/docs/LangRef.rst Sun Sep 6 17:47:03 2015 (r287509) +++ vendor/llvm/dist/docs/LangRef.rst Sun Sep 6 18:34:38 2015 (r287510) @@ -6493,7 +6493,7 @@ Example: %ptr = alloca i32 ; yields i32*:ptr store i32 3, i32* %ptr ; yields void - %val = load i32* %ptr ; yields i32:val = i32 3 + %val = load i32, i32* %ptr ; yields i32:val = i32 3 .. _i_fence: Modified: vendor/llvm/dist/docs/Makefile ============================================================================== --- vendor/llvm/dist/docs/Makefile Sun Sep 6 17:47:03 2015 (r287509) +++ vendor/llvm/dist/docs/Makefile Sun Sep 6 18:34:38 2015 (r287510) @@ -31,6 +31,7 @@ $(PROJ_OBJ_DIR)/doxygen.cfg: doxygen.cfg -e 's/@llvm_doxygen_qhp_cust_filter_name@//g' \ -e 's/@llvm_doxygen_qhp_namespace@//g' \ -e 's/@searchengine_url@//g' \ + -e 's/@DOT_IMAGE_FORMAT@/png/g' \ > $@ endif Modified: vendor/llvm/dist/docs/Phabricator.rst ============================================================================== --- vendor/llvm/dist/docs/Phabricator.rst Sun Sep 6 17:47:03 2015 (r287509) +++ vendor/llvm/dist/docs/Phabricator.rst Sun Sep 6 18:34:38 2015 (r287510) @@ -150,7 +150,7 @@ Status Please let us know whether you like it and what could be improved! We're still working on setting up a bug tracker, but you can email klimek-at-google-dot-com -and chandlerc-at-gmail-dot-com and CC the llvmdev mailing list with questions +and chandlerc-at-gmail-dot-com and CC the llvm-dev mailing list with questions until then. We also could use help implementing improvements. This sadly is really painful and hard because the Phabricator codebase is in PHP and not as testable as you might like. However, we've put exactly what we're deploying up Modified: vendor/llvm/dist/docs/Projects.rst ============================================================================== --- vendor/llvm/dist/docs/Projects.rst Sun Sep 6 17:47:03 2015 (r287509) +++ vendor/llvm/dist/docs/Projects.rst Sun Sep 6 18:34:38 2015 (r287510) @@ -254,4 +254,4 @@ Further Help If you have any questions or need any help creating an LLVM project, the LLVM team would be more than happy to help. You can always post your questions to the `LLVM Developers Mailing List -`_. +`_. Modified: vendor/llvm/dist/docs/ReleaseNotes.rst ============================================================================== --- vendor/llvm/dist/docs/ReleaseNotes.rst Sun Sep 6 17:47:03 2015 (r287509) +++ vendor/llvm/dist/docs/ReleaseNotes.rst Sun Sep 6 18:34:38 2015 (r287510) @@ -5,12 +5,6 @@ LLVM 3.7 Release Notes .. contents:: :local: -.. warning:: - These are in-progress notes for the upcoming LLVM 3.7 release. You may - prefer the `LLVM 3.6 Release Notes `_. - - Introduction ============ @@ -23,7 +17,7 @@ from the `LLVM releases web site `_. If you have questions or comments, the `LLVM Developer's Mailing List -`_ is a good place to send +`_ is a good place to send them. Note that if you are reading this file from a Subversion checkout or the main @@ -48,46 +42,346 @@ Non-comprehensive list of changes in thi collection of tips for frontend authors on how to generate IR which LLVM is able to effectively optimize. -* The DataLayout is no longer optional. All the IR level optimizations expects +* The ``DataLayout`` is no longer optional. All the IR level optimizations expects it to be present and the API has been changed to use a reference instead of a pointer to make it explicit. The Module owns the datalayout and it has to match the one attached to the TargetMachine for generating code. -* ... next change ... + In 3.6, a pass was inserted in the pipeline to make the ``DataLayout`` accessible: + ``MyPassManager->add(new DataLayoutPass(MyTargetMachine->getDataLayout()));`` + In 3.7, you don't need a pass, you set the ``DataLayout`` on the ``Module``: + ``MyModule->setDataLayout(MyTargetMachine->createDataLayout());`` + + The LLVM C API ``LLVMGetTargetMachineData`` is deprecated to reflect the fact + that it won't be available anymore from ``TargetMachine`` in 3.8. + +* Comdats are now orthogonal to the linkage. LLVM will not create + comdats for weak linkage globals and the frontends are responsible + for explicitly adding them. + +* On ELF we now support multiple sections with the same name and + comdat. This allows for smaller object files since multiple + sections can have a simple name (`.text`, `.rodata`, etc). + +* LLVM now lazily loads metadata in some cases. Creating archives + with IR files with debug info is now 25X faster. + +* llvm-ar can create archives in the BSD format used by OS X. + +* LLVM received a backend for the extended Berkely Packet Filter + instruction set that can be dynamically loaded into the Linux kernel via the + `bpf(2) `_ syscall. + + Support for BPF has been present in the kernel for some time, but starting + from 3.18 has been extended with such features as: 64-bit registers, 8 + additional registers registers, conditional backwards jumps, call + instruction, shift instructions, map (hash table, array, etc.), 1-8 byte + load/store from stack, and more. + + Up until now, users of BPF had to write bytecode by hand, or use + custom generators. This release adds a proper LLVM backend target for the BPF + bytecode architecture. + + The BPF target is now available by default, and options exist in both Clang + (-target bpf) or llc (-march=bpf) to pick eBPF as a backend. + +* Switch-case lowering was rewritten to avoid generating unbalanced search trees + (`PR22262 `_) and to exploit profile information + when available. Some lowering strategies are now disabled when optimizations + are turned off, to save compile time. + +* The debug info IR class hierarchy now inherits from ``Metadata`` and has its + own bitcode records and assembly syntax + (`documented in LangRef `_). The debug + info verifier has been merged with the main verifier. + +* LLVM IR and APIs are in a period of transition to aid in the removal of + pointer types (the end goal being that pointers are typeless/opaque - void*, + if you will). Some APIs and IR constructs have been modified to take + explicit types that are currently checked to match the target type of their + pre-existing pointer type operands. Further changes are still needed, but the + more you can avoid using ``PointerType::getPointeeType``, the easier the + migration will be. + +* Argument-less ``TargetMachine::getSubtarget`` and + ``TargetMachine::getSubtargetImpl`` have been removed from the tree. Updating + out of tree ports is as simple as implementing a non-virtual version in the + target, but implementing full ``Function`` based ``TargetSubtargetInfo`` + support is recommended. + +* This is expected to be the last major release of LLVM that supports being + run on Windows XP and Windows Vista. For the next major release the minimum + Windows version requirement will be Windows 7. -.. NOTE - If you would like to document a larger change, then you can add a - subsection about it right here. You can copy the following boilerplate - and un-indent it (the indentation causes it to be inside this comment). +Changes to the MIPS Target +-------------------------- - Special New Feature - ------------------- +During this release the MIPS target has: - Makes programs 10x faster by doing Special New Thing. +* Added support for MIPS32R3, MIPS32R5, MIPS32R3, MIPS32R5, and microMIPS32. -Changes to the ARM Backend --------------------------- +* Added support for dynamic stack realignment. This is of particular importance + to MSA on 32-bit subtargets since vectors always exceed the stack alignment on + the O32 ABI. - During this release ... +* Added support for compiler-rt including: + * Support for the Address, and Undefined Behaviour Sanitizers for all MIPS + subtargets. -Changes to the MIPS Target --------------------------- + * Support for the Data Flow, and Memory Sanitizer for 64-bit subtargets. + + * Support for the Profiler for all MIPS subtargets. + +* Added support for libcxx, and libcxxabi. + +* Improved inline assembly support such that memory constraints may now make use + of the appropriate address offsets available to the instructions. Also, added + support for the ``ZC`` constraint. + +* Added support for 128-bit integers on 64-bit subtargets and 16-bit floating + point conversions on all subtargets. + +* Added support for read-only ``.eh_frame`` sections by storing type information + indirectly. + +* Added support for MCJIT on all 64-bit subtargets as well as MIPS32R6. + +* Added support for fast instruction selection on MIPS32 and MIPS32R2 with PIC. + +* Various bug fixes. Including the following notable fixes: + + * Fixed 'jumpy' debug line info around calls where calculation of the address + of the function would inappropriately change the line number. + + * Fixed missing ``__mips_isa_rev`` macro on the MIPS32R6 and MIPS32R6 + subtargets. + + * Fixed representation of NaN when targeting systems using traditional + encodings. Traditionally, MIPS has used NaN encodings that were compatible + with IEEE754-1985 but would later be found incompatible with IEEE754-2008. + + * Fixed multiple segfaults and assertions in the disassembler when + disassembling instructions that have memory operands. + + * Fixed multiple cases of suboptimal code generation involving $zero. - During this release ... + * Fixed code generation of 128-bit shifts on 64-bit subtargets. + * Prevented the delay slot filler from filling call delay slots with + instructions that modify or use $ra. + + * Fixed some remaining N32/N64 calling convention bugs when using small + structures on big-endian subtargets. + + * Fixed missing sign-extensions that are required by the N32/N64 calling + convention when generating calls to library functions with 32-bit + parameters. + + * Corrected the ``int64_t`` typedef to be ``long`` for N64. + + * ``-mno-odd-spreg`` is now honoured for vector insertion/extraction + operations when using -mmsa. + + * Fixed vector insertion and extraction for MSA on 64-bit subtargets. + + * Corrected the representation of member function pointers. This makes them + usable on microMIPS subtargets. Changes to the PowerPC Target ----------------------------- - During this release ... +There are numerous improvements to the PowerPC target in this release: + +* LLVM now supports the ISA 2.07B (POWER8) instruction set, including + direct moves between general registers and vector registers, and + built-in support for hardware transactional memory (HTM). Some missing + instructions from ISA 2.06 (POWER7) were also added. + +* Code generation for the local-dynamic and global-dynamic thread-local + storage models has been improved. + +* Loops may be restructured to leverage pre-increment loads and stores. + +* QPX - The vector instruction set used by the IBM Blue Gene/Q supercomputers + is now supported. +* Loads from the TOC area are now correctly treated as invariant. -Changes to the OCaml bindings +* PowerPC now has support for i128 and v1i128 types. The types differ + in how they are passed in registers for the ELFv2 ABI. + +* Disassembly will now print shorter mnemonic aliases when available. + +* Optional register name prefixes for VSX and QPX registers are now + supported in the assembly parser. + +* The back end now contains a pass to remove unnecessary vector swaps + from POWER8 little-endian code generation. Additional improvements + are planned for release 3.8. + +* The undefined-behavior sanitizer (UBSan) is now supported for PowerPC. + +* Many new vector programming APIs have been added to altivec.h. + Additional ones are planned for release 3.8. + +* PowerPC now supports __builtin_call_with_static_chain. + +* PowerPC now supports the revised -mrecip option that permits finer + control over reciprocal estimates. + +* Many bugs have been identified and fixed. + +Changes to the SystemZ Target ----------------------------- - During this release ... +* LLVM no longer attempts to automatically detect the current host CPU when + invoked natively. + +* Support for all thread-local storage models. (Previous releases would support + only the local-exec TLS model.) +* The POPCNT instruction is now used on z196 and above. + +* The RISBGN instruction is now used on zEC12 and above. + +* Support for the transactional-execution facility on zEC12 and above. + +* Support for the z13 processor and its vector facility. + + +Changes to the JIT APIs +----------------------- + +* Added a new C++ JIT API called On Request Compilation, or ORC. + + ORC is a new JIT API inspired by MCJIT but designed to be more testable, and + easier to extend with new features. A key new feature already in tree is lazy, + function-at-a-time compilation for X86. Also included is a reimplementation of + MCJIT's API and behavior (OrcMCJITReplacement). MCJIT itself remains in tree, + and continues to be the default JIT ExecutionEngine, though new users are + encouraged to try ORC out for their projects. (A good place to start is the + new ORC tutorials under llvm/examples/kaleidoscope/orc). + +Sub-project Status Update +========================= + +In addition to the core LLVM 3.7 distribution of production-quality compiler +infrastructure, the LLVM project includes sub-projects that use the LLVM core +and share the same distribution license. This section provides updates on these +sub-projects. + +Polly - The Polyhedral Loop Optimizer in LLVM +--------------------------------------------- + +`Polly `_ is a polyhedral loop optimization +infrastructure that provides data-locality optimizations to LLVM-based +compilers. When compiled as part of clang or loaded as a module into clang, +it can perform loop optimizations such as tiling, loop fusion or outer-loop +vectorization. As a generic loop optimization infrastructure it allows +developers to get a per-loop-iteration model of a loop nest on which detailed +analysis and transformations can be performed. + +Changes since the last release: + +* isl imported into Polly distribution + + `isl `_, the math library Polly uses, has been + imported into the source code repository of Polly and is now distributed as part + of Polly. As this was the last external library dependency of Polly, Polly can + now be compiled right after checking out the Polly source code without the need + for any additional libraries to be pre-installed. + +* Small integer optimization of isl + + The MIT licensed imath backend using in `isl `_ for + arbitrary width integer computations has been optimized to use native integer + operations for the common case where the operands of a computation fit into 32 + bit and to only fall back to large arbitrary precision integers for the + remaining cases. This optimization has greatly improved the compile-time + performance of Polly, both due to faster native operations also due to a + reduction in malloc traffic and pointer indirections. As a result, computations + that use arbitrary precision integers heavily have been speed up by almost 6x. + As a result, the compile-time of Polly on the Polybench test kernels in the LNT + suite has been reduced by 20% on average with compile time reductions between + 9-43%. + +* Schedule Trees + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sun Sep 6 18:35:39 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 448099CCF90; Sun, 6 Sep 2015 18:35:39 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1B32C12DC; Sun, 6 Sep 2015 18:35:39 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t86IZcX8083229; Sun, 6 Sep 2015 18:35:38 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t86IZcm8083228; Sun, 6 Sep 2015 18:35:38 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201509061835.t86IZcm8083228@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 6 Sep 2015 18:35:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r287511 - vendor/llvm/llvm-release_370-r246257 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Sep 2015 18:35:39 -0000 Author: dim Date: Sun Sep 6 18:35:38 2015 New Revision: 287511 URL: https://svnweb.freebsd.org/changeset/base/287511 Log: Tag llvm 3.7.0 release (r246257). Added: - copied from r287510, vendor/llvm/dist/ Directory Properties: vendor/llvm/llvm-release_370-r246257/ (props changed) From owner-svn-src-all@freebsd.org Sun Sep 6 18:36:25 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE3EB9CCFD0; Sun, 6 Sep 2015 18:36:25 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AABF01448; Sun, 6 Sep 2015 18:36:25 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t86IaPJ1083316; Sun, 6 Sep 2015 18:36:25 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t86IaP5A083313; Sun, 6 Sep 2015 18:36:25 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201509061836.t86IaP5A083313@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 6 Sep 2015 18:36:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r287512 - in vendor/clang/dist: . docs include/clang/AST include/clang/Analysis/Support include/clang/Basic include/clang/CodeGen include/clang/Driver include/clang/Frontend include/cla... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Sep 2015 18:36:25 -0000 Author: dim Date: Sun Sep 6 18:36:24 2015 New Revision: 287512 URL: https://svnweb.freebsd.org/changeset/base/287512 Log: Import clang 3.7.0 release (r246257). Added: vendor/clang/dist/lib/Headers/vecintrin.h (contents, props changed) vendor/clang/dist/test/CodeGen/builtins-systemz-zvector-error.c (contents, props changed) vendor/clang/dist/test/CodeGen/builtins-systemz-zvector.c (contents, props changed) vendor/clang/dist/test/CodeGen/long_double_fp128.cpp (contents, props changed) vendor/clang/dist/test/CodeGen/x86_64-fp128.c (contents, props changed) vendor/clang/dist/test/CodeGen/zvector.c (contents, props changed) vendor/clang/dist/test/CodeGenObjC/Inputs/nsvalue-boxed-expressions-support.h (contents, props changed) vendor/clang/dist/test/CodeGenObjC/nsvalue-objc-boxable-ios-arc.m vendor/clang/dist/test/CodeGenObjC/nsvalue-objc-boxable-ios.m vendor/clang/dist/test/CodeGenObjC/nsvalue-objc-boxable-mac-arc.m vendor/clang/dist/test/CodeGenObjC/nsvalue-objc-boxable-mac.m vendor/clang/dist/test/CodeGenObjCXX/designated-initializers.mm vendor/clang/dist/test/CodeGenOpenCL/vector_shufflevector_valid.cl vendor/clang/dist/test/Driver/Inputs/mingw_arch_tree/ vendor/clang/dist/test/Driver/Inputs/mingw_arch_tree/usr/ vendor/clang/dist/test/Driver/Inputs/mingw_arch_tree/usr/i686-w64-mingw32/ vendor/clang/dist/test/Driver/Inputs/mingw_arch_tree/usr/i686-w64-mingw32/include/ vendor/clang/dist/test/Driver/Inputs/mingw_arch_tree/usr/i686-w64-mingw32/include/c++/ vendor/clang/dist/test/Driver/Inputs/mingw_arch_tree/usr/i686-w64-mingw32/include/c++/5.1.0/ vendor/clang/dist/test/Driver/Inputs/mingw_arch_tree/usr/i686-w64-mingw32/include/c++/5.1.0/backward/ vendor/clang/dist/test/Driver/Inputs/mingw_arch_tree/usr/i686-w64-mingw32/include/c++/5.1.0/backward/.keep vendor/clang/dist/test/Driver/Inputs/mingw_arch_tree/usr/i686-w64-mingw32/include/c++/5.1.0/i686-w64-mingw32/ vendor/clang/dist/test/Driver/Inputs/mingw_arch_tree/usr/i686-w64-mingw32/include/c++/5.1.0/i686-w64-mingw32/.keep vendor/clang/dist/test/Driver/Inputs/mingw_arch_tree/usr/lib/ vendor/clang/dist/test/Driver/Inputs/mingw_arch_tree/usr/lib/gcc/ vendor/clang/dist/test/Driver/Inputs/mingw_arch_tree/usr/lib/gcc/i686-w64-mingw32/ vendor/clang/dist/test/Driver/Inputs/mingw_arch_tree/usr/lib/gcc/i686-w64-mingw32/5.1.0/ vendor/clang/dist/test/Driver/Inputs/mingw_arch_tree/usr/lib/gcc/i686-w64-mingw32/5.1.0/include/ vendor/clang/dist/test/Driver/Inputs/mingw_arch_tree/usr/lib/gcc/i686-w64-mingw32/5.1.0/include-fixed/ vendor/clang/dist/test/Driver/Inputs/mingw_arch_tree/usr/lib/gcc/i686-w64-mingw32/5.1.0/include-fixed/.keep vendor/clang/dist/test/Driver/Inputs/mingw_arch_tree/usr/lib/gcc/i686-w64-mingw32/5.1.0/include/.keep vendor/clang/dist/test/Driver/Inputs/mingw_clang_tree/ vendor/clang/dist/test/Driver/Inputs/mingw_clang_tree/mingw32/ vendor/clang/dist/test/Driver/Inputs/mingw_clang_tree/mingw32/i686-w64-mingw32/ vendor/clang/dist/test/Driver/Inputs/mingw_clang_tree/mingw32/i686-w64-mingw32/include/ vendor/clang/dist/test/Driver/Inputs/mingw_clang_tree/mingw32/i686-w64-mingw32/include/.keep vendor/clang/dist/test/Driver/Inputs/mingw_clang_tree/mingw32/include/ vendor/clang/dist/test/Driver/Inputs/mingw_clang_tree/mingw32/include/.keep vendor/clang/dist/test/Driver/Inputs/mingw_mingw_builds_tree/ vendor/clang/dist/test/Driver/Inputs/mingw_mingw_builds_tree/mingw32/ vendor/clang/dist/test/Driver/Inputs/mingw_mingw_builds_tree/mingw32/i686-w64-mingw32/ vendor/clang/dist/test/Driver/Inputs/mingw_mingw_builds_tree/mingw32/i686-w64-mingw32/include/ vendor/clang/dist/test/Driver/Inputs/mingw_mingw_builds_tree/mingw32/i686-w64-mingw32/include/c++/ vendor/clang/dist/test/Driver/Inputs/mingw_mingw_builds_tree/mingw32/i686-w64-mingw32/include/c++/backward/ vendor/clang/dist/test/Driver/Inputs/mingw_mingw_builds_tree/mingw32/i686-w64-mingw32/include/c++/backward/.keep vendor/clang/dist/test/Driver/Inputs/mingw_mingw_builds_tree/mingw32/i686-w64-mingw32/include/c++/i686-w64-mingw32/ vendor/clang/dist/test/Driver/Inputs/mingw_mingw_builds_tree/mingw32/i686-w64-mingw32/include/c++/i686-w64-mingw32/.keep vendor/clang/dist/test/Driver/Inputs/mingw_mingw_builds_tree/mingw32/lib/ vendor/clang/dist/test/Driver/Inputs/mingw_mingw_builds_tree/mingw32/lib/gcc/ vendor/clang/dist/test/Driver/Inputs/mingw_mingw_builds_tree/mingw32/lib/gcc/i686-w64-mingw32/ vendor/clang/dist/test/Driver/Inputs/mingw_mingw_builds_tree/mingw32/lib/gcc/i686-w64-mingw32/4.9.1/ vendor/clang/dist/test/Driver/Inputs/mingw_mingw_builds_tree/mingw32/lib/gcc/i686-w64-mingw32/4.9.1/include/ vendor/clang/dist/test/Driver/Inputs/mingw_mingw_builds_tree/mingw32/lib/gcc/i686-w64-mingw32/4.9.1/include-fixed/ vendor/clang/dist/test/Driver/Inputs/mingw_mingw_builds_tree/mingw32/lib/gcc/i686-w64-mingw32/4.9.1/include-fixed/.keep vendor/clang/dist/test/Driver/Inputs/mingw_mingw_builds_tree/mingw32/lib/gcc/i686-w64-mingw32/4.9.1/include/.keep vendor/clang/dist/test/Driver/Inputs/mingw_mingw_org_tree/ vendor/clang/dist/test/Driver/Inputs/mingw_mingw_org_tree/mingw/ vendor/clang/dist/test/Driver/Inputs/mingw_mingw_org_tree/mingw/include/ vendor/clang/dist/test/Driver/Inputs/mingw_mingw_org_tree/mingw/include/.keep vendor/clang/dist/test/Driver/Inputs/mingw_mingw_org_tree/mingw/lib/ vendor/clang/dist/test/Driver/Inputs/mingw_mingw_org_tree/mingw/lib/gcc/ vendor/clang/dist/test/Driver/Inputs/mingw_mingw_org_tree/mingw/lib/gcc/mingw32/ vendor/clang/dist/test/Driver/Inputs/mingw_mingw_org_tree/mingw/lib/gcc/mingw32/4.8.1/ vendor/clang/dist/test/Driver/Inputs/mingw_mingw_org_tree/mingw/lib/gcc/mingw32/4.8.1/include/ vendor/clang/dist/test/Driver/Inputs/mingw_mingw_org_tree/mingw/lib/gcc/mingw32/4.8.1/include-fixed/ vendor/clang/dist/test/Driver/Inputs/mingw_mingw_org_tree/mingw/lib/gcc/mingw32/4.8.1/include-fixed/.keep vendor/clang/dist/test/Driver/Inputs/mingw_mingw_org_tree/mingw/lib/gcc/mingw32/4.8.1/include/c++/ vendor/clang/dist/test/Driver/Inputs/mingw_mingw_org_tree/mingw/lib/gcc/mingw32/4.8.1/include/c++/backward/ vendor/clang/dist/test/Driver/Inputs/mingw_mingw_org_tree/mingw/lib/gcc/mingw32/4.8.1/include/c++/backward/.keep vendor/clang/dist/test/Driver/Inputs/mingw_mingw_org_tree/mingw/lib/gcc/mingw32/4.8.1/include/c++/mingw32/ vendor/clang/dist/test/Driver/Inputs/mingw_mingw_org_tree/mingw/lib/gcc/mingw32/4.8.1/include/c++/mingw32/.keep vendor/clang/dist/test/Driver/Inputs/mingw_mingw_org_tree/mingw/minw32/ vendor/clang/dist/test/Driver/Inputs/mingw_mingw_org_tree/mingw/minw32/include/ vendor/clang/dist/test/Driver/Inputs/mingw_mingw_org_tree/mingw/minw32/include/.keep vendor/clang/dist/test/Driver/Inputs/mingw_msys2_tree/ vendor/clang/dist/test/Driver/Inputs/mingw_msys2_tree/msys64/ vendor/clang/dist/test/Driver/Inputs/mingw_msys2_tree/msys64/mingw32/ vendor/clang/dist/test/Driver/Inputs/mingw_msys2_tree/msys64/mingw32/i686-w64-mingw32/ vendor/clang/dist/test/Driver/Inputs/mingw_msys2_tree/msys64/mingw32/i686-w64-mingw32/include/ vendor/clang/dist/test/Driver/Inputs/mingw_msys2_tree/msys64/mingw32/i686-w64-mingw32/include/.keep vendor/clang/dist/test/Driver/Inputs/mingw_msys2_tree/msys64/mingw32/include/ vendor/clang/dist/test/Driver/Inputs/mingw_msys2_tree/msys64/mingw32/include/c++/ vendor/clang/dist/test/Driver/Inputs/mingw_msys2_tree/msys64/mingw32/include/c++/4.9.2/ vendor/clang/dist/test/Driver/Inputs/mingw_msys2_tree/msys64/mingw32/include/c++/4.9.2/backward/ vendor/clang/dist/test/Driver/Inputs/mingw_msys2_tree/msys64/mingw32/include/c++/4.9.2/backward/.keep vendor/clang/dist/test/Driver/Inputs/mingw_msys2_tree/msys64/mingw32/include/c++/4.9.2/i686-w64-mingw32/ vendor/clang/dist/test/Driver/Inputs/mingw_msys2_tree/msys64/mingw32/include/c++/4.9.2/i686-w64-mingw32/.keep vendor/clang/dist/test/Driver/Inputs/mingw_msys2_tree/msys64/mingw32/lib/ vendor/clang/dist/test/Driver/Inputs/mingw_msys2_tree/msys64/mingw32/lib/gcc/ vendor/clang/dist/test/Driver/Inputs/mingw_msys2_tree/msys64/mingw32/lib/gcc/i686-w64-mingw32/ vendor/clang/dist/test/Driver/Inputs/mingw_msys2_tree/msys64/mingw32/lib/gcc/i686-w64-mingw32/4.9.2/ vendor/clang/dist/test/Driver/Inputs/mingw_msys2_tree/msys64/mingw32/lib/gcc/i686-w64-mingw32/4.9.2/include/ vendor/clang/dist/test/Driver/Inputs/mingw_msys2_tree/msys64/mingw32/lib/gcc/i686-w64-mingw32/4.9.2/include-fixed/ vendor/clang/dist/test/Driver/Inputs/mingw_msys2_tree/msys64/mingw32/lib/gcc/i686-w64-mingw32/4.9.2/include-fixed/.keep vendor/clang/dist/test/Driver/Inputs/mingw_msys2_tree/msys64/mingw32/lib/gcc/i686-w64-mingw32/4.9.2/include/.keep vendor/clang/dist/test/Driver/Inputs/mingw_opensuse_tree/ vendor/clang/dist/test/Driver/Inputs/mingw_opensuse_tree/usr/ vendor/clang/dist/test/Driver/Inputs/mingw_opensuse_tree/usr/lib64/ vendor/clang/dist/test/Driver/Inputs/mingw_opensuse_tree/usr/lib64/gcc/ vendor/clang/dist/test/Driver/Inputs/mingw_opensuse_tree/usr/lib64/gcc/x86_64-w64-mingw32/ vendor/clang/dist/test/Driver/Inputs/mingw_opensuse_tree/usr/lib64/gcc/x86_64-w64-mingw32/5.1.0/ vendor/clang/dist/test/Driver/Inputs/mingw_opensuse_tree/usr/lib64/gcc/x86_64-w64-mingw32/5.1.0/include/ vendor/clang/dist/test/Driver/Inputs/mingw_opensuse_tree/usr/lib64/gcc/x86_64-w64-mingw32/5.1.0/include-fixed/ vendor/clang/dist/test/Driver/Inputs/mingw_opensuse_tree/usr/lib64/gcc/x86_64-w64-mingw32/5.1.0/include-fixed/.keep vendor/clang/dist/test/Driver/Inputs/mingw_opensuse_tree/usr/lib64/gcc/x86_64-w64-mingw32/5.1.0/include/c++/ vendor/clang/dist/test/Driver/Inputs/mingw_opensuse_tree/usr/lib64/gcc/x86_64-w64-mingw32/5.1.0/include/c++/backward/ vendor/clang/dist/test/Driver/Inputs/mingw_opensuse_tree/usr/lib64/gcc/x86_64-w64-mingw32/5.1.0/include/c++/backward/.keep vendor/clang/dist/test/Driver/Inputs/mingw_opensuse_tree/usr/lib64/gcc/x86_64-w64-mingw32/5.1.0/include/c++/x86_64-w64-mingw32/ vendor/clang/dist/test/Driver/Inputs/mingw_opensuse_tree/usr/lib64/gcc/x86_64-w64-mingw32/5.1.0/include/c++/x86_64-w64-mingw32/.keep vendor/clang/dist/test/Driver/Inputs/mingw_opensuse_tree/usr/x86_64-w64-mingw32/ vendor/clang/dist/test/Driver/Inputs/mingw_opensuse_tree/usr/x86_64-w64-mingw32/sys-root/ vendor/clang/dist/test/Driver/Inputs/mingw_opensuse_tree/usr/x86_64-w64-mingw32/sys-root/mingw/ vendor/clang/dist/test/Driver/Inputs/mingw_opensuse_tree/usr/x86_64-w64-mingw32/sys-root/mingw/include/ vendor/clang/dist/test/Driver/Inputs/mingw_opensuse_tree/usr/x86_64-w64-mingw32/sys-root/mingw/include/.keep vendor/clang/dist/test/Driver/Inputs/mingw_ubuntu_tree/ vendor/clang/dist/test/Driver/Inputs/mingw_ubuntu_tree/usr/ vendor/clang/dist/test/Driver/Inputs/mingw_ubuntu_tree/usr/include/ vendor/clang/dist/test/Driver/Inputs/mingw_ubuntu_tree/usr/include/c++/ vendor/clang/dist/test/Driver/Inputs/mingw_ubuntu_tree/usr/include/c++/4.8/ vendor/clang/dist/test/Driver/Inputs/mingw_ubuntu_tree/usr/include/c++/4.8/86_64-w64-mingw32/ vendor/clang/dist/test/Driver/Inputs/mingw_ubuntu_tree/usr/include/c++/4.8/86_64-w64-mingw32/.keep vendor/clang/dist/test/Driver/Inputs/mingw_ubuntu_tree/usr/include/c++/4.8/backward/ vendor/clang/dist/test/Driver/Inputs/mingw_ubuntu_tree/usr/include/c++/4.8/backward/.keep vendor/clang/dist/test/Driver/Inputs/mingw_ubuntu_tree/usr/lib/ vendor/clang/dist/test/Driver/Inputs/mingw_ubuntu_tree/usr/lib/gcc/ vendor/clang/dist/test/Driver/Inputs/mingw_ubuntu_tree/usr/lib/gcc/x86_64-w64-mingw32/ vendor/clang/dist/test/Driver/Inputs/mingw_ubuntu_tree/usr/lib/gcc/x86_64-w64-mingw32/4.8/ vendor/clang/dist/test/Driver/Inputs/mingw_ubuntu_tree/usr/lib/gcc/x86_64-w64-mingw32/4.8/include/ vendor/clang/dist/test/Driver/Inputs/mingw_ubuntu_tree/usr/lib/gcc/x86_64-w64-mingw32/4.8/include-fixed/ vendor/clang/dist/test/Driver/Inputs/mingw_ubuntu_tree/usr/lib/gcc/x86_64-w64-mingw32/4.8/include-fixed/.keep vendor/clang/dist/test/Driver/Inputs/mingw_ubuntu_tree/usr/lib/gcc/x86_64-w64-mingw32/4.8/include/.keep vendor/clang/dist/test/Driver/Inputs/mingw_ubuntu_tree/usr/x86_64-w64-mingw32/ vendor/clang/dist/test/Driver/Inputs/mingw_ubuntu_tree/usr/x86_64-w64-mingw32/include/ vendor/clang/dist/test/Driver/Inputs/mingw_ubuntu_tree/usr/x86_64-w64-mingw32/include/.keep vendor/clang/dist/test/Driver/arm-ias-Wa.s (contents, props changed) vendor/clang/dist/test/Driver/mingw.cpp (contents, props changed) vendor/clang/dist/test/Lexer/has_attribute_objc_boxable.m vendor/clang/dist/test/Lexer/has_feature_boxed_nsvalue_expressions.m vendor/clang/dist/test/Misc/cc1as-asm.s (contents, props changed) vendor/clang/dist/test/PCH/objc_boxable.m vendor/clang/dist/test/PCH/objc_boxable_record.h (contents, props changed) vendor/clang/dist/test/PCH/objc_boxable_record_attr.h (contents, props changed) vendor/clang/dist/test/Sema/zvector.c (contents, props changed) vendor/clang/dist/test/SemaObjC/objc-boxed-expressions-nsvalue.m vendor/clang/dist/test/SemaObjCXX/objc-boxed-expressions-nsvalue.mm vendor/clang/dist/test/SemaTemplate/crash-unparsed-exception.cpp (contents, props changed) Deleted: vendor/clang/dist/test/Headers/pmmintrin.c vendor/clang/dist/test/Headers/x86intrin-2.c Modified: vendor/clang/dist/README.txt vendor/clang/dist/docs/AttributeReference.rst vendor/clang/dist/docs/CMakeLists.txt vendor/clang/dist/docs/ExternalClangExamples.rst vendor/clang/dist/docs/InternalsManual.rst vendor/clang/dist/docs/Makefile vendor/clang/dist/docs/ReleaseNotes.rst vendor/clang/dist/docs/UsersManual.rst vendor/clang/dist/docs/doxygen.cfg.in vendor/clang/dist/include/clang/AST/ASTVector.h vendor/clang/dist/include/clang/AST/NSAPI.h vendor/clang/dist/include/clang/AST/StmtOpenMP.h vendor/clang/dist/include/clang/Analysis/Support/BumpVector.h vendor/clang/dist/include/clang/Basic/Attr.td vendor/clang/dist/include/clang/Basic/AttrDocs.td vendor/clang/dist/include/clang/Basic/DiagnosticCommonKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticParseKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td vendor/clang/dist/include/clang/Basic/LangOptions.def vendor/clang/dist/include/clang/Basic/TokenKinds.def vendor/clang/dist/include/clang/CodeGen/ObjectFilePCHContainerOperations.h vendor/clang/dist/include/clang/Driver/CC1Options.td vendor/clang/dist/include/clang/Driver/Options.td vendor/clang/dist/include/clang/Frontend/ASTUnit.h vendor/clang/dist/include/clang/Frontend/CompilerInstance.h vendor/clang/dist/include/clang/Frontend/PCHContainerOperations.h vendor/clang/dist/include/clang/Frontend/Utils.h vendor/clang/dist/include/clang/Lex/HeaderSearchOptions.h vendor/clang/dist/include/clang/Parse/Parser.h vendor/clang/dist/include/clang/Sema/Sema.h vendor/clang/dist/include/clang/Serialization/ASTReader.h vendor/clang/dist/include/clang/Serialization/GlobalModuleIndex.h vendor/clang/dist/include/clang/Serialization/ModuleManager.h vendor/clang/dist/include/clang/Tooling/Refactoring.h vendor/clang/dist/include/clang/Tooling/Tooling.h vendor/clang/dist/lib/ARCMigrate/ARCMT.cpp vendor/clang/dist/lib/AST/NSAPI.cpp vendor/clang/dist/lib/AST/NestedNameSpecifier.cpp vendor/clang/dist/lib/AST/RecordLayoutBuilder.cpp vendor/clang/dist/lib/AST/Stmt.cpp vendor/clang/dist/lib/Basic/FileManager.cpp vendor/clang/dist/lib/Basic/IdentifierTable.cpp vendor/clang/dist/lib/Basic/Module.cpp vendor/clang/dist/lib/Basic/Targets.cpp vendor/clang/dist/lib/Basic/Version.cpp vendor/clang/dist/lib/CodeGen/CGBuiltin.cpp vendor/clang/dist/lib/CodeGen/CGDebugInfo.h vendor/clang/dist/lib/CodeGen/CGExprScalar.cpp vendor/clang/dist/lib/CodeGen/CGStmtOpenMP.cpp vendor/clang/dist/lib/CodeGen/CGVTables.cpp vendor/clang/dist/lib/CodeGen/ItaniumCXXABI.cpp vendor/clang/dist/lib/CodeGen/ObjectFilePCHContainerOperations.cpp vendor/clang/dist/lib/CodeGen/TargetInfo.cpp vendor/clang/dist/lib/Driver/MinGWToolChain.cpp vendor/clang/dist/lib/Driver/ToolChain.cpp vendor/clang/dist/lib/Driver/ToolChains.h vendor/clang/dist/lib/Driver/Tools.cpp vendor/clang/dist/lib/Driver/Tools.h vendor/clang/dist/lib/Frontend/ASTMerge.cpp vendor/clang/dist/lib/Frontend/ASTUnit.cpp vendor/clang/dist/lib/Frontend/ChainedIncludesSource.cpp vendor/clang/dist/lib/Frontend/CompilerInstance.cpp vendor/clang/dist/lib/Frontend/CompilerInvocation.cpp vendor/clang/dist/lib/Frontend/FrontendAction.cpp vendor/clang/dist/lib/Frontend/FrontendActions.cpp vendor/clang/dist/lib/Frontend/InitPreprocessor.cpp vendor/clang/dist/lib/Frontend/PCHContainerOperations.cpp vendor/clang/dist/lib/Headers/CMakeLists.txt vendor/clang/dist/lib/Headers/__wmmintrin_aes.h vendor/clang/dist/lib/Headers/__wmmintrin_pclmul.h vendor/clang/dist/lib/Headers/adxintrin.h vendor/clang/dist/lib/Headers/altivec.h vendor/clang/dist/lib/Headers/ammintrin.h vendor/clang/dist/lib/Headers/avx2intrin.h vendor/clang/dist/lib/Headers/avx512bwintrin.h vendor/clang/dist/lib/Headers/avx512dqintrin.h vendor/clang/dist/lib/Headers/avx512fintrin.h vendor/clang/dist/lib/Headers/avx512vlbwintrin.h vendor/clang/dist/lib/Headers/avx512vldqintrin.h vendor/clang/dist/lib/Headers/avx512vlintrin.h vendor/clang/dist/lib/Headers/avxintrin.h vendor/clang/dist/lib/Headers/bmi2intrin.h vendor/clang/dist/lib/Headers/bmiintrin.h vendor/clang/dist/lib/Headers/emmintrin.h vendor/clang/dist/lib/Headers/f16cintrin.h vendor/clang/dist/lib/Headers/fma4intrin.h vendor/clang/dist/lib/Headers/fmaintrin.h vendor/clang/dist/lib/Headers/immintrin.h vendor/clang/dist/lib/Headers/lzcntintrin.h vendor/clang/dist/lib/Headers/mm3dnow.h vendor/clang/dist/lib/Headers/mmintrin.h vendor/clang/dist/lib/Headers/module.modulemap vendor/clang/dist/lib/Headers/nmmintrin.h vendor/clang/dist/lib/Headers/pmmintrin.h vendor/clang/dist/lib/Headers/popcntintrin.h vendor/clang/dist/lib/Headers/rdseedintrin.h vendor/clang/dist/lib/Headers/rtmintrin.h vendor/clang/dist/lib/Headers/s390intrin.h vendor/clang/dist/lib/Headers/shaintrin.h vendor/clang/dist/lib/Headers/smmintrin.h vendor/clang/dist/lib/Headers/tbmintrin.h vendor/clang/dist/lib/Headers/tmmintrin.h vendor/clang/dist/lib/Headers/wmmintrin.h vendor/clang/dist/lib/Headers/x86intrin.h vendor/clang/dist/lib/Headers/xmmintrin.h vendor/clang/dist/lib/Headers/xopintrin.h vendor/clang/dist/lib/Lex/HeaderSearch.cpp vendor/clang/dist/lib/Parse/ParseDecl.cpp vendor/clang/dist/lib/Parse/Parser.cpp vendor/clang/dist/lib/Sema/DeclSpec.cpp vendor/clang/dist/lib/Sema/SemaChecking.cpp vendor/clang/dist/lib/Sema/SemaDecl.cpp vendor/clang/dist/lib/Sema/SemaExceptionSpec.cpp vendor/clang/dist/lib/Sema/SemaExpr.cpp vendor/clang/dist/lib/Sema/SemaExprCXX.cpp vendor/clang/dist/lib/Sema/SemaInit.cpp vendor/clang/dist/lib/Sema/SemaLookup.cpp vendor/clang/dist/lib/Sema/SemaOpenMP.cpp vendor/clang/dist/lib/Serialization/ASTReader.cpp vendor/clang/dist/lib/Serialization/ASTReaderStmt.cpp vendor/clang/dist/lib/Serialization/ASTWriterStmt.cpp vendor/clang/dist/lib/Serialization/GlobalModuleIndex.cpp vendor/clang/dist/lib/Serialization/ModuleManager.cpp vendor/clang/dist/test/Analysis/dead-stores.m vendor/clang/dist/test/CodeGen/builtins-ppc-altivec.c vendor/clang/dist/test/CodeGen/integer-overflow.c vendor/clang/dist/test/CodeGen/le32-regparm.c vendor/clang/dist/test/CodeGen/palignr.c vendor/clang/dist/test/CodeGenCXX/dllimport-rtti.cpp vendor/clang/dist/test/CodeGenCXX/thunks.cpp vendor/clang/dist/test/Driver/cuda-options.cu vendor/clang/dist/test/Driver/linux-ld.c vendor/clang/dist/test/Headers/x86intrin.c vendor/clang/dist/test/Modules/pch_container.m vendor/clang/dist/test/OpenMP/for_codegen.cpp vendor/clang/dist/test/OpenMP/for_loop_messages.cpp vendor/clang/dist/test/OpenMP/for_simd_loop_messages.cpp vendor/clang/dist/test/OpenMP/openmp_common.c vendor/clang/dist/test/OpenMP/parallel_copyin_codegen.cpp vendor/clang/dist/test/OpenMP/parallel_for_loop_messages.cpp vendor/clang/dist/test/OpenMP/parallel_for_simd_loop_messages.cpp vendor/clang/dist/test/OpenMP/simd_linear_messages.cpp vendor/clang/dist/test/OpenMP/simd_loop_messages.cpp vendor/clang/dist/test/Preprocessor/predefined-arch-macros.c vendor/clang/dist/test/Sema/dllimport.c vendor/clang/dist/test/Sema/typo-correction.c vendor/clang/dist/test/SemaCXX/warn-pessmizing-move.cpp vendor/clang/dist/test/SemaCXX/warn-redundant-move.cpp vendor/clang/dist/test/SemaObjC/circular-container.m vendor/clang/dist/test/SemaObjC/comptypes-9.m vendor/clang/dist/tools/arcmt-test/arcmt-test.cpp vendor/clang/dist/tools/c-index-test/c-index-test.c vendor/clang/dist/tools/clang-check/CMakeLists.txt vendor/clang/dist/tools/clang-check/ClangCheck.cpp vendor/clang/dist/tools/driver/cc1_main.cpp vendor/clang/dist/tools/driver/cc1as_main.cpp vendor/clang/dist/tools/libclang/CIndex.cpp vendor/clang/dist/tools/libclang/CIndexer.h vendor/clang/dist/tools/libclang/CMakeLists.txt vendor/clang/dist/unittests/ASTMatchers/ASTMatchersTest.h vendor/clang/dist/utils/TableGen/ClangAttrEmitter.cpp vendor/clang/dist/www/analyzer/checker_dev_manual.html vendor/clang/dist/www/analyzer/installation.html vendor/clang/dist/www/analyzer/menu.html.incl vendor/clang/dist/www/analyzer/open_projects.html vendor/clang/dist/www/cxx_dr_status.html vendor/clang/dist/www/demo/index.cgi vendor/clang/dist/www/get_involved.html vendor/clang/dist/www/make_cxx_dr_status vendor/clang/dist/www/menu.html.incl Modified: vendor/clang/dist/README.txt ============================================================================== --- vendor/clang/dist/README.txt Sun Sep 6 18:35:38 2015 (r287511) +++ vendor/clang/dist/README.txt Sun Sep 6 18:36:24 2015 (r287512) @@ -20,7 +20,7 @@ Information on the LLVM project: http: If you have questions or comments about Clang, a great place to discuss them is on the Clang development mailing list: - http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev + http://lists.llvm.org/mailman/listinfo/cfe-dev If you find a bug in Clang, please file it in the LLVM bug tracker: http://llvm.org/bugs/ Modified: vendor/clang/dist/docs/AttributeReference.rst ============================================================================== --- vendor/clang/dist/docs/AttributeReference.rst Sun Sep 6 18:35:38 2015 (r287511) +++ vendor/clang/dist/docs/AttributeReference.rst Sun Sep 6 18:36:24 2015 (r287512) @@ -1,13 +1,1760 @@ .. ------------------------------------------------------------------- NOTE: This file is automatically generated by running clang-tblgen - -gen-attr-docs. Do not edit this file by hand!! The contents for - this file are automatically generated by a server-side process. - - Please do not commit this file. The file exists for local testing - purposes only. + -gen-attr-docs. Do not edit this file by hand!! ------------------------------------------------------------------- =================== Attributes in Clang -=================== \ No newline at end of file +=================== +.. contents:: + :local: + +Introduction +============ + +This page lists the attributes currently supported by Clang. + +AMD GPU Register Attributes +=========================== +Clang supports attributes for controlling register usage on AMD GPU +targets. These attributes may be attached to a kernel function +definition and is an optimization hint to the backend for the maximum +number of registers to use. This is useful in cases where register +limited occupancy is known to be an important factor for the +performance for the kernel. + +The semantics are as follows: + +- The backend will attempt to limit the number of used registers to + the specified value, but the exact number used is not + guaranteed. The number used may be rounded up to satisfy the + allocation requirements or ABI constraints of the subtarget. For + example, on Southern Islands VGPRs may only be allocated in + increments of 4, so requesting a limit of 39 VGPRs will really + attempt to use up to 40. Requesting more registers than the + subtarget supports will truncate to the maximum allowed. The backend + may also use fewer registers than requested whenever possible. + +- 0 implies the default no limit on register usage. + +- Ignored on older VLIW subtargets which did not have separate scalar + and vector registers, R600 through Northern Islands. + +amdgpu_num_sgpr +--------------- +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma" + + "X","","","", "" + +Clang supports the +``__attribute__((amdgpu_num_sgpr()))`` attribute on AMD +Southern Islands GPUs and later for controlling the number of scalar +registers. A typical value would be between 8 and 104 in increments of +8. + +Due to common instruction constraints, an additional 2-4 SGPRs are +typically required for internal use depending on features used. This +value is a hint for the total number of SGPRs to use, and not the +number of user SGPRs, so no special consideration needs to be given +for these. + + +amdgpu_num_vgpr +--------------- +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma" + + "X","","","", "" + +Clang supports the +``__attribute__((amdgpu_num_vgpr()))`` attribute on AMD +Southern Islands GPUs and later for controlling the number of vector +registers. A typical value would be between 4 and 256 in increments +of 4. + + +Function Attributes +=================== + + +interrupt +--------- +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma" + + "X","","","", "" + +Clang supports the GNU style ``__attribute__((interrupt("TYPE")))`` attribute on +ARM targets. This attribute may be attached to a function definition and +instructs the backend to generate appropriate function entry/exit code so that +it can be used directly as an interrupt service routine. + +The parameter passed to the interrupt attribute is optional, but if +provided it must be a string literal with one of the following values: "IRQ", +"FIQ", "SWI", "ABORT", "UNDEF". + +The semantics are as follows: + +- If the function is AAPCS, Clang instructs the backend to realign the stack to + 8 bytes on entry. This is a general requirement of the AAPCS at public + interfaces, but may not hold when an exception is taken. Doing this allows + other AAPCS functions to be called. +- If the CPU is M-class this is all that needs to be done since the architecture + itself is designed in such a way that functions obeying the normal AAPCS ABI + constraints are valid exception handlers. +- If the CPU is not M-class, the prologue and epilogue are modified to save all + non-banked registers that are used, so that upon return the user-mode state + will not be corrupted. Note that to avoid unnecessary overhead, only + general-purpose (integer) registers are saved in this way. If VFP operations + are needed, that state must be saved manually. + + Specifically, interrupt kinds other than "FIQ" will save all core registers + except "lr" and "sp". "FIQ" interrupts will save r0-r7. +- If the CPU is not M-class, the return instruction is changed to one of the + canonical sequences permitted by the architecture for exception return. Where + possible the function itself will make the necessary "lr" adjustments so that + the "preferred return address" is selected. + + Unfortunately the compiler is unable to make this guarantee for an "UNDEF" + handler, where the offset from "lr" to the preferred return address depends on + the execution state of the code which generated the exception. In this case + a sequence equivalent to "movs pc, lr" will be used. + + +acquire_capability (acquire_shared_capability, clang::acquire_capability, clang::acquire_shared_capability) +----------------------------------------------------------------------------------------------------------- +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma" + + "X","X","","", "" + +Marks a function as acquiring a capability. + + +assert_capability (assert_shared_capability, clang::assert_capability, clang::assert_shared_capability) +------------------------------------------------------------------------------------------------------- +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma" + + "X","X","","", "" + +Marks a function that dynamically tests whether a capability is held, and halts +the program if it is not held. + + +assume_aligned (gnu::assume_aligned) +------------------------------------ +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma" + + "X","X","","", "" + +Use ``__attribute__((assume_aligned([,]))`` on a function +declaration to specify that the return value of the function (which must be a +pointer type) has the specified offset, in bytes, from an address with the +specified alignment. The offset is taken to be zero if omitted. + +.. code-block:: c++ + + // The returned pointer value has 32-byte alignment. + void *a() __attribute__((assume_aligned (32))); + + // The returned pointer value is 4 bytes greater than an address having + // 32-byte alignment. + void *b() __attribute__((assume_aligned (32, 4))); + +Note that this attribute provides information to the compiler regarding a +condition that the code already ensures is true. It does not cause the compiler +to enforce the provided alignment assumption. + + +availability +------------ +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma" + + "X","","","", "" + +The ``availability`` attribute can be placed on declarations to describe the +lifecycle of that declaration relative to operating system versions. Consider +the function declaration for a hypothetical function ``f``: + +.. code-block:: c++ + + void f(void) __attribute__((availability(macosx,introduced=10.4,deprecated=10.6,obsoleted=10.7))); + +The availability attribute states that ``f`` was introduced in Mac OS X 10.4, +deprecated in Mac OS X 10.6, and obsoleted in Mac OS X 10.7. This information +is used by Clang to determine when it is safe to use ``f``: for example, if +Clang is instructed to compile code for Mac OS X 10.5, a call to ``f()`` +succeeds. If Clang is instructed to compile code for Mac OS X 10.6, the call +succeeds but Clang emits a warning specifying that the function is deprecated. +Finally, if Clang is instructed to compile code for Mac OS X 10.7, the call +fails because ``f()`` is no longer available. + +The availability attribute is a comma-separated list starting with the +platform name and then including clauses specifying important milestones in the +declaration's lifetime (in any order) along with additional information. Those +clauses can be: + +introduced=\ *version* + The first version in which this declaration was introduced. + +deprecated=\ *version* + The first version in which this declaration was deprecated, meaning that + users should migrate away from this API. + +obsoleted=\ *version* + The first version in which this declaration was obsoleted, meaning that it + was removed completely and can no longer be used. + +unavailable + This declaration is never available on this platform. + +message=\ *string-literal* + Additional message text that Clang will provide when emitting a warning or + error about use of a deprecated or obsoleted declaration. Useful to direct + users to replacement APIs. + +Multiple availability attributes can be placed on a declaration, which may +correspond to different platforms. Only the availability attribute with the +platform corresponding to the target platform will be used; any others will be +ignored. If no availability attribute specifies availability for the current +target platform, the availability attributes are ignored. Supported platforms +are: + +``ios`` + Apple's iOS operating system. The minimum deployment target is specified by + the ``-mios-version-min=*version*`` or ``-miphoneos-version-min=*version*`` + command-line arguments. + +``macosx`` + Apple's Mac OS X operating system. The minimum deployment target is + specified by the ``-mmacosx-version-min=*version*`` command-line argument. + +A declaration can be used even when deploying back to a platform version prior +to when the declaration was introduced. When this happens, the declaration is +`weakly linked +`_, +as if the ``weak_import`` attribute were added to the declaration. A +weakly-linked declaration may or may not be present a run-time, and a program +can determine whether the declaration is present by checking whether the +address of that declaration is non-NULL. + +If there are multiple declarations of the same entity, the availability +attributes must either match on a per-platform basis or later +declarations must not have availability attributes for that +platform. For example: + +.. code-block:: c + + void g(void) __attribute__((availability(macosx,introduced=10.4))); + void g(void) __attribute__((availability(macosx,introduced=10.4))); // okay, matches + void g(void) __attribute__((availability(ios,introduced=4.0))); // okay, adds a new platform + void g(void); // okay, inherits both macosx and ios availability from above. + void g(void) __attribute__((availability(macosx,introduced=10.5))); // error: mismatch + +When one method overrides another, the overriding method can be more widely available than the overridden method, e.g.,: + +.. code-block:: objc + + @interface A + - (id)method __attribute__((availability(macosx,introduced=10.4))); + - (id)method2 __attribute__((availability(macosx,introduced=10.4))); + @end + + @interface B : A + - (id)method __attribute__((availability(macosx,introduced=10.3))); // okay: method moved into base class later + - (id)method __attribute__((availability(macosx,introduced=10.5))); // error: this method was available via the base class in 10.4 + @end + + +_Noreturn +--------- +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma" + + "","","","X", "" + +A function declared as ``_Noreturn`` shall not return to its caller. The +compiler will generate a diagnostic for a function declared as ``_Noreturn`` +that appears to be capable of returning to its caller. + + +noreturn +-------- +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma" + + "","X","","", "" + +A function declared as ``[[noreturn]]`` shall not return to its caller. The +compiler will generate a diagnostic for a function declared as ``[[noreturn]]`` +that appears to be capable of returning to its caller. + + +carries_dependency +------------------ +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma" + + "X","X","","", "" + +The ``carries_dependency`` attribute specifies dependency propagation into and +out of functions. + +When specified on a function or Objective-C method, the ``carries_dependency`` +attribute means that the return value carries a dependency out of the function, +so that the implementation need not constrain ordering upon return from that +function. Implementations of the function and its caller may choose to preserve +dependencies instead of emitting memory ordering instructions such as fences. + +Note, this attribute does not change the meaning of the program, but may result +in generation of more efficient code. + + +enable_if +--------- +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma" + + "X","","","", "" + +.. Note:: Some features of this attribute are experimental. The meaning of + multiple enable_if attributes on a single declaration is subject to change in + a future version of clang. Also, the ABI is not standardized and the name + mangling may change in future versions. To avoid that, use asm labels. + +The ``enable_if`` attribute can be placed on function declarations to control +which overload is selected based on the values of the function's arguments. +When combined with the ``overloadable`` attribute, this feature is also +available in C. + +.. code-block:: c++ + + int isdigit(int c); + int isdigit(int c) __attribute__((enable_if(c <= -1 || c > 255, "chosen when 'c' is out of range"))) __attribute__((unavailable("'c' must have the value of an unsigned char or EOF"))); + + void foo(char c) { + isdigit(c); + isdigit(10); + isdigit(-10); // results in a compile-time error. + } + +The enable_if attribute takes two arguments, the first is an expression written +in terms of the function parameters, the second is a string explaining why this +overload candidate could not be selected to be displayed in diagnostics. The +expression is part of the function signature for the purposes of determining +whether it is a redeclaration (following the rules used when determining +whether a C++ template specialization is ODR-equivalent), but is not part of +the type. + +The enable_if expression is evaluated as if it were the body of a +bool-returning constexpr function declared with the arguments of the function +it is being applied to, then called with the parameters at the call site. If the +result is false or could not be determined through constant expression +evaluation, then this overload will not be chosen and the provided string may +be used in a diagnostic if the compile fails as a result. + +Because the enable_if expression is an unevaluated context, there are no global +state changes, nor the ability to pass information from the enable_if +expression to the function body. For example, suppose we want calls to +strnlen(strbuf, maxlen) to resolve to strnlen_chk(strbuf, maxlen, size of +strbuf) only if the size of strbuf can be determined: + +.. code-block:: c++ + + __attribute__((always_inline)) + static inline size_t strnlen(const char *s, size_t maxlen) + __attribute__((overloadable)) + __attribute__((enable_if(__builtin_object_size(s, 0) != -1))), + "chosen when the buffer size is known but 'maxlen' is not"))) + { + return strnlen_chk(s, maxlen, __builtin_object_size(s, 0)); + } + +Multiple enable_if attributes may be applied to a single declaration. In this +case, the enable_if expressions are evaluated from left to right in the +following manner. First, the candidates whose enable_if expressions evaluate to +false or cannot be evaluated are discarded. If the remaining candidates do not +share ODR-equivalent enable_if expressions, the overload resolution is +ambiguous. Otherwise, enable_if overload resolution continues with the next +enable_if attribute on the candidates that have not been discarded and have +remaining enable_if attributes. In this way, we pick the most specific +overload out of a number of viable overloads using enable_if. + +.. code-block:: c++ + + void f() __attribute__((enable_if(true, ""))); // #1 + void f() __attribute__((enable_if(true, ""))) __attribute__((enable_if(true, ""))); // #2 + + void g(int i, int j) __attribute__((enable_if(i, ""))); // #1 + void g(int i, int j) __attribute__((enable_if(j, ""))) __attribute__((enable_if(true))); // #2 + +In this example, a call to f() is always resolved to #2, as the first enable_if +expression is ODR-equivalent for both declarations, but #1 does not have another +enable_if expression to continue evaluating, so the next round of evaluation has +only a single candidate. In a call to g(1, 1), the call is ambiguous even though +#2 has more enable_if attributes, because the first enable_if expressions are +not ODR-equivalent. + +Query for this feature with ``__has_attribute(enable_if)``. + + +flatten (gnu::flatten) +---------------------- +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma" + + "X","X","","", "" + +The ``flatten`` attribute causes calls within the attributed function to +be inlined unless it is impossible to do so, for example if the body of the +callee is unavailable or if the callee has the ``noinline`` attribute. + + +format (gnu::format) +-------------------- +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma" + + "X","X","","", "" + +Clang supports the ``format`` attribute, which indicates that the function +accepts a ``printf`` or ``scanf``-like format string and corresponding +arguments or a ``va_list`` that contains these arguments. + +Please see `GCC documentation about format attribute +`_ to find details +about attribute syntax. + +Clang implements two kinds of checks with this attribute. + +#. Clang checks that the function with the ``format`` attribute is called with + a format string that uses format specifiers that are allowed, and that + arguments match the format string. This is the ``-Wformat`` warning, it is + on by default. + +#. Clang checks that the format string argument is a literal string. This is + the ``-Wformat-nonliteral`` warning, it is off by default. + + Clang implements this mostly the same way as GCC, but there is a difference + for functions that accept a ``va_list`` argument (for example, ``vprintf``). + GCC does not emit ``-Wformat-nonliteral`` warning for calls to such + functions. Clang does not warn if the format string comes from a function + parameter, where the function is annotated with a compatible attribute, + otherwise it warns. For example: + + .. code-block:: c + + __attribute__((__format__ (__scanf__, 1, 3))) + void foo(const char* s, char *buf, ...) { + va_list ap; + va_start(ap, buf); + + vprintf(s, ap); // warning: format string is not a string literal + } + + In this case we warn because ``s`` contains a format string for a + ``scanf``-like function, but it is passed to a ``printf``-like function. + + If the attribute is removed, clang still warns, because the format string is + not a string literal. + + Another example: + + .. code-block:: c + + __attribute__((__format__ (__printf__, 1, 3))) + void foo(const char* s, char *buf, ...) { + va_list ap; + va_start(ap, buf); + + vprintf(s, ap); // warning + } + + In this case Clang does not warn because the format string ``s`` and + the corresponding arguments are annotated. If the arguments are + incorrect, the caller of ``foo`` will receive a warning. + + +noduplicate (clang::noduplicate) +-------------------------------- +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma" + + "X","X","","", "" + +The ``noduplicate`` attribute can be placed on function declarations to control +whether function calls to this function can be duplicated or not as a result of +optimizations. This is required for the implementation of functions with +certain special requirements, like the OpenCL "barrier" function, that might +need to be run concurrently by all the threads that are executing in lockstep +on the hardware. For example this attribute applied on the function +"nodupfunc" in the code below avoids that: + +.. code-block:: c + + void nodupfunc() __attribute__((noduplicate)); + // Setting it as a C++11 attribute is also valid + // void nodupfunc() [[clang::noduplicate]]; + void foo(); + void bar(); + + nodupfunc(); + if (a > n) { + foo(); + } else { + bar(); + } + +gets possibly modified by some optimizations into code similar to this: + +.. code-block:: c + + if (a > n) { + nodupfunc(); + foo(); + } else { + nodupfunc(); + bar(); + } + +where the call to "nodupfunc" is duplicated and sunk into the two branches +of the condition. + + +no_sanitize (clang::no_sanitize) +-------------------------------- +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma" + + "X","X","","", "" + +Use the ``no_sanitize`` attribute on a function declaration to specify +that a particular instrumentation or set of instrumentations should not be +applied to that function. The attribute takes a list of string literals, +which have the same meaning as values accepted by the ``-fno-sanitize=`` +flag. For example, ``__attribute__((no_sanitize("address", "thread")))`` +specifies that AddressSanitizer and ThreadSanitizer should not be applied +to the function. + +See :ref:`Controlling Code Generation ` for a +full list of supported sanitizer flags. + + +no_sanitize_address (no_address_safety_analysis, gnu::no_address_safety_analysis, gnu::no_sanitize_address) +----------------------------------------------------------------------------------------------------------- +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma" + + "X","X","","", "" + +.. _langext-address_sanitizer: + +Use ``__attribute__((no_sanitize_address))`` on a function declaration to +specify that address safety instrumentation (e.g. AddressSanitizer) should +not be applied to that function. + + +no_sanitize_thread +------------------ +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma" + + "X","X","","", "" + +.. _langext-thread_sanitizer: + +Use ``__attribute__((no_sanitize_thread))`` on a function declaration to +specify that checks for data races on plain (non-atomic) memory accesses should +not be inserted by ThreadSanitizer. The function is still instrumented by the +tool to avoid false positives and provide meaningful stack traces. + + +no_sanitize_memory +------------------ +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma" + + "X","X","","", "" + +.. _langext-memory_sanitizer: + +Use ``__attribute__((no_sanitize_memory))`` on a function declaration to +specify that checks for uninitialized memory should not be inserted +(e.g. by MemorySanitizer). The function may still be instrumented by the tool +to avoid false positives in other places. + + +no_split_stack (gnu::no_split_stack) +------------------------------------ +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma" + + "X","X","","", "" + +The ``no_split_stack`` attribute disables the emission of the split stack +preamble for a particular function. It has no effect if ``-fsplit-stack`` +is not specified. + + +objc_boxable +------------ +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma" + + "X","","","", "" + +Structs and unions marked with the ``objc_boxable`` attribute can be used +with the Objective-C boxed expression syntax, ``@(...)``. + +**Usage**: ``__attribute__((objc_boxable))``. This attribute +can only be placed on a declaration of a trivially-copyable struct or union: + +.. code-block:: objc + + struct __attribute__((objc_boxable)) some_struct { + int i; + }; + union __attribute__((objc_boxable)) some_union { + int i; + float f; + }; + typedef struct __attribute__((objc_boxable)) _some_struct some_struct; + + // ... + + some_struct ss; + NSValue *boxed = @(ss); + + +objc_method_family +------------------ +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma" + + "X","","","", "" + +Many methods in Objective-C have conventional meanings determined by their +selectors. It is sometimes useful to be able to mark a method as having a +particular conventional meaning despite not having the right selector, or as +not having the conventional meaning that its selector would suggest. For these +use cases, we provide an attribute to specifically describe the "method family" +that a method belongs to. + +**Usage**: ``__attribute__((objc_method_family(X)))``, where ``X`` is one of +``none``, ``alloc``, ``copy``, ``init``, ``mutableCopy``, or ``new``. This +attribute can only be placed at the end of a method declaration: + +.. code-block:: objc + + - (NSString *)initMyStringValue __attribute__((objc_method_family(none))); + +Users who do not wish to change the conventional meaning of a method, and who +merely want to document its non-standard retain and release semantics, should +use the retaining behavior attributes (``ns_returns_retained``, +``ns_returns_not_retained``, etc). + +Query for this feature with ``__has_attribute(objc_method_family)``. + + +objc_requires_super +------------------- +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma" + + "X","","","", "" + +Some Objective-C classes allow a subclass to override a particular method in a +parent class but expect that the overriding method also calls the overridden +method in the parent class. For these cases, we provide an attribute to +designate that a method requires a "call to ``super``" in the overriding +method in the subclass. + +**Usage**: ``__attribute__((objc_requires_super))``. This attribute can only +be placed at the end of a method declaration: + +.. code-block:: objc + + - (void)foo __attribute__((objc_requires_super)); + +This attribute can only be applied the method declarations within a class, and +not a protocol. Currently this attribute does not enforce any placement of +where the call occurs in the overriding method (such as in the case of +``-dealloc`` where the call must appear at the end). It checks only that it +exists. + +Note that on both OS X and iOS that the Foundation framework provides a +convenience macro ``NS_REQUIRES_SUPER`` that provides syntactic sugar for this +attribute: + +.. code-block:: objc + + - (void)foo NS_REQUIRES_SUPER; + +This macro is conditionally defined depending on the compiler's support for +this attribute. If the compiler does not support the attribute the macro +expands to nothing. + +Operationally, when a method has this annotation the compiler will warn if the +implementation of an override in a subclass does not call super. For example: + +.. code-block:: objc + + warning: method possibly missing a [super AnnotMeth] call + - (void) AnnotMeth{}; + ^ + + +objc_runtime_name +----------------- +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma" + + "X","","","", "" + +By default, the Objective-C interface or protocol identifier is used +in the metadata name for that object. The `objc_runtime_name` +attribute allows annotated interfaces or protocols to use the +specified string argument in the object's metadata name instead of the +default name. + +**Usage**: ``__attribute__((objc_runtime_name("MyLocalName")))``. This attribute +can only be placed before an @protocol or @interface declaration: + +.. code-block:: objc + + __attribute__((objc_runtime_name("MyLocalName"))) + @interface Message + @end + + +optnone (clang::optnone) +------------------------ +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma" + + "X","X","","", "" + +The ``optnone`` attribute suppresses essentially all optimizations +on a function or method, regardless of the optimization level applied to +the compilation unit as a whole. This is particularly useful when you +need to debug a particular function, but it is infeasible to build the +entire application without optimization. Avoiding optimization on the +specified function can improve the quality of the debugging information +for that function. + +This attribute is incompatible with the ``always_inline`` and ``minsize`` +attributes. + + +overloadable +------------ +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma" + + "X","","","", "" + +Clang provides support for C++ function overloading in C. Function overloading +in C is introduced using the ``overloadable`` attribute. For example, one +might provide several overloaded versions of a ``tgsin`` function that invokes +the appropriate standard function computing the sine of a value with ``float``, +``double``, or ``long double`` precision: + +.. code-block:: c + + #include + float __attribute__((overloadable)) tgsin(float x) { return sinf(x); } + double __attribute__((overloadable)) tgsin(double x) { return sin(x); } + long double __attribute__((overloadable)) tgsin(long double x) { return sinl(x); } + +Given these declarations, one can call ``tgsin`` with a ``float`` value to +receive a ``float`` result, with a ``double`` to receive a ``double`` result, +etc. Function overloading in C follows the rules of C++ function overloading +to pick the best overload given the call arguments, with a few C-specific +semantics: + +* Conversion from ``float`` or ``double`` to ``long double`` is ranked as a + floating-point promotion (per C99) rather than as a floating-point conversion + (as in C++). + +* A conversion from a pointer of type ``T*`` to a pointer of type ``U*`` is + considered a pointer conversion (with conversion rank) if ``T`` and ``U`` are + compatible types. + +* A conversion from type ``T`` to a value of type ``U`` is permitted if ``T`` + and ``U`` are compatible types. This conversion is given "conversion" rank. + +The declaration of ``overloadable`` functions is restricted to function +declarations and definitions. Most importantly, if any function with a given +name is given the ``overloadable`` attribute, then all function declarations +and definitions with that name (and in that scope) must have the +``overloadable`` attribute. This rule even applies to redeclarations of +functions whose original declaration had the ``overloadable`` attribute, e.g., + +.. code-block:: c + + int f(int) __attribute__((overloadable)); + float f(float); // error: declaration of "f" must have the "overloadable" attribute + + int g(int) __attribute__((overloadable)); + int g(int) { } // error: redeclaration of "g" must also have the "overloadable" attribute + +Functions marked ``overloadable`` must have prototypes. Therefore, the +following code is ill-formed: + +.. code-block:: c + + int h() __attribute__((overloadable)); // error: h does not have a prototype + +However, ``overloadable`` functions are allowed to use a ellipsis even if there +are no named parameters (as is permitted in C++). This feature is particularly +useful when combined with the ``unavailable`` attribute: + +.. code-block:: c++ + + void honeypot(...) __attribute__((overloadable, unavailable)); // calling me is an error + +Functions declared with the ``overloadable`` attribute have their names mangled +according to the same rules as C++ function names. For example, the three +``tgsin`` functions in our motivating example get the mangled names +``_Z5tgsinf``, ``_Z5tgsind``, and ``_Z5tgsine``, respectively. There are two +caveats to this use of name mangling: + +* Future versions of Clang may change the name mangling of functions overloaded + in C, so you should not depend on an specific mangling. To be completely + safe, we strongly urge the use of ``static inline`` with ``overloadable`` + functions. + +* The ``overloadable`` attribute has almost no meaning when used in C++, + because names will already be mangled and functions are already overloadable. + However, when an ``overloadable`` function occurs within an ``extern "C"`` + linkage specification, it's name *will* be mangled in the same way as it + would in C. + +Query for this feature with ``__has_extension(attribute_overloadable)``. + + +release_capability (release_shared_capability, clang::release_capability, clang::release_shared_capability) +----------------------------------------------------------------------------------------------------------- +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma" + + "X","X","","", "" + +Marks a function as releasing a capability. + + +target (gnu::target) +-------------------- +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma" + + "X","X","","", "" + +Clang supports the GNU style ``__attribute__((target("OPTIONS")))`` attribute. +This attribute may be attached to a function definition and instructs +the backend to use different code generation options than were passed on the +command line. + +The current set of options correspond to the existing "subtarget features" for +the target with or without a "-mno-" in front corresponding to the absence +of the feature, as well as ``arch="CPU"`` which will change the default "CPU" +for the function. + +Example "subtarget features" from the x86 backend include: "mmx", "sse", "sse4.2", +"avx", "xop" and largely correspond to the machine specific options handled by +the front end. + + +try_acquire_capability (try_acquire_shared_capability, clang::try_acquire_capability, clang::try_acquire_shared_capability) +--------------------------------------------------------------------------------------------------------------------------- +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma" + + "X","X","","", "" + +Marks a function that attempts to acquire a capability. This function may fail to +actually acquire the capability; they accept a Boolean value determining +whether acquiring the capability means success (true), or failing to acquire +the capability means success (false). + + +Variable Attributes +=================== + + +init_seg +-------- +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma" + + "","","","", "X" + +The attribute applied by ``pragma init_seg()`` controls the section into +which global initialization function pointers are emitted. It is only +available with ``-fms-extensions``. Typically, this function pointer is +emitted into ``.CRT$XCU`` on Windows. The user can change the order of +initialization by using a different section name with the same +``.CRT$XC`` prefix and a suffix that sorts lexicographically before or +after the standard ``.CRT$XCU`` sections. See the init_seg_ +documentation on MSDN for more information. + +.. _init_seg: http://msdn.microsoft.com/en-us/library/7977wcck(v=vs.110).aspx + + +section (gnu::section, __declspec(allocate)) +-------------------------------------------- +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma" + + "X","X","X","", "" + +The ``section`` attribute allows you to specify a specific section a +global variable or function should be in after translation. + + +tls_model (gnu::tls_model) +-------------------------- +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma" + + "X","X","","", "" + +The ``tls_model`` attribute allows you to specify which thread-local storage +model to use. It accepts the following strings: + +* global-dynamic +* local-dynamic +* initial-exec +* local-exec + +TLS models are mutually exclusive. + + +thread +------ +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma" + + "","","X","", "" + +The ``__declspec(thread)`` attribute declares a variable with thread local +storage. It is available under the ``-fms-extensions`` flag for MSVC +compatibility. See the documentation for `__declspec(thread)`_ on MSDN. + +.. _`__declspec(thread)`: http://msdn.microsoft.com/en-us/library/9w1sdazb.aspx + +In Clang, ``__declspec(thread)`` is generally equivalent in functionality to the +GNU ``__thread`` keyword. The variable must not have a destructor and must have +a constant initializer, if any. The attribute only applies to variables +declared with static storage duration, such as globals, class static data +members, and static locals. + + +Type Attributes +=============== + + +align_value +----------- +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma" + + "X","","","", "" + +The align_value attribute can be added to the typedef of a pointer type or the +declaration of a variable of pointer or reference type. It specifies that the +pointer will point to, or the reference will bind to, only objects with at +least the provided alignment. This alignment value must be some positive power +of 2. + + .. code-block:: c + + typedef double * aligned_double_ptr __attribute__((align_value(64))); + void foo(double & x __attribute__((align_value(128)), + aligned_double_ptr y) { ... } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sun Sep 6 18:37:03 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8D1AA9CB003; Sun, 6 Sep 2015 18:37:03 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 63AEB15C2; Sun, 6 Sep 2015 18:37:03 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t86Ib351083386; Sun, 6 Sep 2015 18:37:03 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t86Ib376083385; Sun, 6 Sep 2015 18:37:03 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201509061837.t86Ib376083385@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 6 Sep 2015 18:37:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r287513 - vendor/clang/clang-release_370-r246257 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Sep 2015 18:37:03 -0000 Author: dim Date: Sun Sep 6 18:37:02 2015 New Revision: 287513 URL: https://svnweb.freebsd.org/changeset/base/287513 Log: Tag clang 3.7.0 release (r246257). Added: - copied from r287512, vendor/clang/dist/ Directory Properties: vendor/clang/clang-release_370-r246257/ (props changed) From owner-svn-src-all@freebsd.org Sun Sep 6 18:37:25 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8FF829CB03D; Sun, 6 Sep 2015 18:37:25 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7CBB9183A; Sun, 6 Sep 2015 18:37:25 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t86IbP3L083468; Sun, 6 Sep 2015 18:37:25 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t86IbKP8083447; Sun, 6 Sep 2015 18:37:20 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201509061837.t86IbKP8083447@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 6 Sep 2015 18:37:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r287514 - in vendor/lldb/dist: include/lldb/Core include/lldb/Host/common include/lldb/Target source/Core source/Host/common source/Plugins/Disassembler/llvm source/Plugins/Instruction/... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Sep 2015 18:37:25 -0000 Author: dim Date: Sun Sep 6 18:37:19 2015 New Revision: 287514 URL: https://svnweb.freebsd.org/changeset/base/287514 Log: Import stripped lldb 3.7.0 release (r246257). Added: vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContext_mips.h (contents, props changed) vendor/lldb/dist/source/Plugins/Process/Utility/lldb-mips-freebsd-register-enums.h (contents, props changed) vendor/lldb/dist/source/Plugins/Process/Utility/lldb-mips-linux-register-enums.h (contents, props changed) Deleted: vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContext_mips64.h vendor/lldb/dist/source/Plugins/Process/Utility/lldb-mips64-register-enums.h Modified: vendor/lldb/dist/include/lldb/Core/ArchSpec.h vendor/lldb/dist/include/lldb/Host/common/NativeRegisterContext.h vendor/lldb/dist/include/lldb/Target/StopInfo.h vendor/lldb/dist/source/Core/ArchSpec.cpp vendor/lldb/dist/source/Host/common/NativeRegisterContext.cpp vendor/lldb/dist/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp vendor/lldb/dist/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.h vendor/lldb/dist/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp vendor/lldb/dist/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp vendor/lldb/dist/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.h vendor/lldb/dist/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextFreeBSD_mips64.cpp vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextLinux_mips.cpp vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextLinux_mips.h vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextLinux_mips64.cpp vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextLinux_mips64.h vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.h vendor/lldb/dist/source/Plugins/Process/Utility/RegisterInfos_mips.h vendor/lldb/dist/source/Plugins/Process/Utility/RegisterInfos_mips64.h vendor/lldb/dist/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp vendor/lldb/dist/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h vendor/lldb/dist/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp vendor/lldb/dist/source/Target/StopInfo.cpp vendor/lldb/dist/tools/lldb-mi/MICmdCmdData.cpp Modified: vendor/lldb/dist/include/lldb/Core/ArchSpec.h ============================================================================== --- vendor/lldb/dist/include/lldb/Core/ArchSpec.h Sun Sep 6 18:37:02 2015 (r287513) +++ vendor/lldb/dist/include/lldb/Core/ArchSpec.h Sun Sep 6 18:37:19 2015 (r287514) @@ -48,7 +48,26 @@ public: eMIPSSubType_mips64r2el, eMIPSSubType_mips64r6el, }; - + + // Masks for the ases word of an ABI flags structure. + enum MIPSASE + { + eMIPSAse_dsp = 0x00000001, // DSP ASE + eMIPSAse_dspr2 = 0x00000002, // DSP R2 ASE + eMIPSAse_eva = 0x00000004, // Enhanced VA Scheme + eMIPSAse_mcu = 0x00000008, // MCU (MicroController) ASE + eMIPSAse_mdmx = 0x00000010, // MDMX ASE + eMIPSAse_mips3d = 0x00000020, // MIPS-3D ASE + eMIPSAse_mt = 0x00000040, // MT ASE + eMIPSAse_smartmips = 0x00000080, // SmartMIPS ASE + eMIPSAse_virt = 0x00000100, // VZ ASE + eMIPSAse_msa = 0x00000200, // MSA ASE + eMIPSAse_mips16 = 0x00000400, // MIPS16 ASE + eMIPSAse_micromips = 0x00000800, // MICROMIPS ASE + eMIPSAse_xpa = 0x00001000, // XPA ASE + eMIPSAse_mask = 0x00001fff + }; + enum Core { eCore_arm_generic, @@ -546,6 +565,18 @@ public: StopInfoOverrideCallbackType GetStopInfoOverrideCallback () const; + uint32_t + GetFlags () const + { + return m_flags; + } + + void + SetFlags (uint32_t flags) + { + m_flags = flags; + } + protected: bool IsEqualTo (const ArchSpec& rhs, bool exact_match) const; @@ -554,6 +585,11 @@ protected: Core m_core; lldb::ByteOrder m_byte_order; + // Additional arch flags which we cannot get from triple and core + // For MIPS these are application specific extensions like + // micromips, mips16 etc. + uint32_t m_flags; + ConstString m_distribution_id; // Called when m_def or m_entry are changed. Fills in all remaining Modified: vendor/lldb/dist/include/lldb/Host/common/NativeRegisterContext.h ============================================================================== --- vendor/lldb/dist/include/lldb/Host/common/NativeRegisterContext.h Sun Sep 6 18:37:02 2015 (r287513) +++ vendor/lldb/dist/include/lldb/Host/common/NativeRegisterContext.h Sun Sep 6 18:37:19 2015 (r287514) @@ -111,6 +111,19 @@ public: virtual lldb::addr_t GetWatchpointAddress (uint32_t wp_index); + // MIPS Linux kernel returns a masked address (last 3bits are masked) + // when a HW watchpoint is hit. However user may not have set a watchpoint + // on this address. This function emulates the instruction at PC and + // finds the base address used in the load/store instruction. This gives the + // exact address used to read/write the variable being watched. + // For example: + // 'n' is at 0x120010d00 and 'm' is 0x120010d04. When a watchpoint is set at 'm', + // then watch exception is generated even when 'n' is read/written. This function + // returns address of 'n' so that client can check whether a watchpoint is set + // on this address or not. + virtual lldb::addr_t + GetWatchpointHitAddress (uint32_t wp_index); + virtual bool HardwareSingleStep (bool enable); Modified: vendor/lldb/dist/include/lldb/Target/StopInfo.h ============================================================================== --- vendor/lldb/dist/include/lldb/Target/StopInfo.h Sun Sep 6 18:37:02 2015 (r287513) +++ vendor/lldb/dist/include/lldb/Target/StopInfo.h Sun Sep 6 18:37:19 2015 (r287514) @@ -161,7 +161,7 @@ public: CreateStopReasonWithBreakpointSiteID (Thread &thread, lldb::break_id_t break_id, bool should_stop); static lldb::StopInfoSP - CreateStopReasonWithWatchpointID (Thread &thread, lldb::break_id_t watch_id); + CreateStopReasonWithWatchpointID (Thread &thread, lldb::break_id_t watch_id, lldb::addr_t watch_hit_addr = LLDB_INVALID_ADDRESS); static lldb::StopInfoSP CreateStopReasonWithSignal (Thread &thread, int signo, const char *description = nullptr); Modified: vendor/lldb/dist/source/Core/ArchSpec.cpp ============================================================================== --- vendor/lldb/dist/source/Core/ArchSpec.cpp Sun Sep 6 18:37:02 2015 (r287513) +++ vendor/lldb/dist/source/Core/ArchSpec.cpp Sun Sep 6 18:37:19 2015 (r287514) @@ -90,28 +90,28 @@ static const CoreDefinition g_core_defin { eByteOrderLittle, 8, 4, 4, llvm::Triple::aarch64, ArchSpec::eCore_arm_aarch64 , "aarch64" }, // mips32, mips32r2, mips32r3, mips32r5, mips32r6 - { eByteOrderBig , 4, 4, 4, llvm::Triple::mips , ArchSpec::eCore_mips32 , "mips" }, - { eByteOrderBig , 4, 4, 4, llvm::Triple::mips , ArchSpec::eCore_mips32r2 , "mipsr2" }, - { eByteOrderBig , 4, 4, 4, llvm::Triple::mips , ArchSpec::eCore_mips32r3 , "mipsr3" }, - { eByteOrderBig , 4, 4, 4, llvm::Triple::mips , ArchSpec::eCore_mips32r5 , "mipsr5" }, - { eByteOrderBig , 4, 4, 4, llvm::Triple::mips , ArchSpec::eCore_mips32r6 , "mipsr6" }, - { eByteOrderLittle, 4, 4, 4, llvm::Triple::mipsel, ArchSpec::eCore_mips32el , "mipsel" }, - { eByteOrderLittle, 4, 4, 4, llvm::Triple::mipsel, ArchSpec::eCore_mips32r2el , "mipsr2el" }, - { eByteOrderLittle, 4, 4, 4, llvm::Triple::mipsel, ArchSpec::eCore_mips32r3el , "mipsr3el" }, - { eByteOrderLittle, 4, 4, 4, llvm::Triple::mipsel, ArchSpec::eCore_mips32r5el , "mipsr5el" }, - { eByteOrderLittle, 4, 4, 4, llvm::Triple::mipsel, ArchSpec::eCore_mips32r6el , "mipsr6el" }, + { eByteOrderBig , 4, 2, 4, llvm::Triple::mips , ArchSpec::eCore_mips32 , "mips" }, + { eByteOrderBig , 4, 2, 4, llvm::Triple::mips , ArchSpec::eCore_mips32r2 , "mipsr2" }, + { eByteOrderBig , 4, 2, 4, llvm::Triple::mips , ArchSpec::eCore_mips32r3 , "mipsr3" }, + { eByteOrderBig , 4, 2, 4, llvm::Triple::mips , ArchSpec::eCore_mips32r5 , "mipsr5" }, + { eByteOrderBig , 4, 2, 4, llvm::Triple::mips , ArchSpec::eCore_mips32r6 , "mipsr6" }, + { eByteOrderLittle, 4, 2, 4, llvm::Triple::mipsel, ArchSpec::eCore_mips32el , "mipsel" }, + { eByteOrderLittle, 4, 2, 4, llvm::Triple::mipsel, ArchSpec::eCore_mips32r2el , "mipsr2el" }, + { eByteOrderLittle, 4, 2, 4, llvm::Triple::mipsel, ArchSpec::eCore_mips32r3el , "mipsr3el" }, + { eByteOrderLittle, 4, 2, 4, llvm::Triple::mipsel, ArchSpec::eCore_mips32r5el , "mipsr5el" }, + { eByteOrderLittle, 4, 2, 4, llvm::Triple::mipsel, ArchSpec::eCore_mips32r6el , "mipsr6el" }, // mips64, mips64r2, mips64r3, mips64r5, mips64r6 - { eByteOrderBig , 8, 4, 4, llvm::Triple::mips64 , ArchSpec::eCore_mips64 , "mips64" }, - { eByteOrderBig , 8, 4, 4, llvm::Triple::mips64 , ArchSpec::eCore_mips64r2 , "mips64r2" }, - { eByteOrderBig , 8, 4, 4, llvm::Triple::mips64 , ArchSpec::eCore_mips64r3 , "mips64r3" }, - { eByteOrderBig , 8, 4, 4, llvm::Triple::mips64 , ArchSpec::eCore_mips64r5 , "mips64r5" }, - { eByteOrderBig , 8, 4, 4, llvm::Triple::mips64 , ArchSpec::eCore_mips64r6 , "mips64r6" }, - { eByteOrderLittle, 8, 4, 4, llvm::Triple::mips64el, ArchSpec::eCore_mips64el , "mips64el" }, - { eByteOrderLittle, 8, 4, 4, llvm::Triple::mips64el, ArchSpec::eCore_mips64r2el , "mips64r2el" }, - { eByteOrderLittle, 8, 4, 4, llvm::Triple::mips64el, ArchSpec::eCore_mips64r3el , "mips64r3el" }, - { eByteOrderLittle, 8, 4, 4, llvm::Triple::mips64el, ArchSpec::eCore_mips64r5el , "mips64r5el" }, - { eByteOrderLittle, 8, 4, 4, llvm::Triple::mips64el, ArchSpec::eCore_mips64r6el , "mips64r6el" }, + { eByteOrderBig , 8, 2, 4, llvm::Triple::mips64 , ArchSpec::eCore_mips64 , "mips64" }, + { eByteOrderBig , 8, 2, 4, llvm::Triple::mips64 , ArchSpec::eCore_mips64r2 , "mips64r2" }, + { eByteOrderBig , 8, 2, 4, llvm::Triple::mips64 , ArchSpec::eCore_mips64r3 , "mips64r3" }, + { eByteOrderBig , 8, 2, 4, llvm::Triple::mips64 , ArchSpec::eCore_mips64r5 , "mips64r5" }, + { eByteOrderBig , 8, 2, 4, llvm::Triple::mips64 , ArchSpec::eCore_mips64r6 , "mips64r6" }, + { eByteOrderLittle, 8, 2, 4, llvm::Triple::mips64el, ArchSpec::eCore_mips64el , "mips64el" }, + { eByteOrderLittle, 8, 2, 4, llvm::Triple::mips64el, ArchSpec::eCore_mips64r2el , "mips64r2el" }, + { eByteOrderLittle, 8, 2, 4, llvm::Triple::mips64el, ArchSpec::eCore_mips64r3el , "mips64r3el" }, + { eByteOrderLittle, 8, 2, 4, llvm::Triple::mips64el, ArchSpec::eCore_mips64r5el , "mips64r5el" }, + { eByteOrderLittle, 8, 2, 4, llvm::Triple::mips64el, ArchSpec::eCore_mips64r6el , "mips64r6el" }, { eByteOrderBig , 4, 4, 4, llvm::Triple::ppc , ArchSpec::eCore_ppc_generic , "powerpc" }, { eByteOrderBig , 4, 4, 4, llvm::Triple::ppc , ArchSpec::eCore_ppc_ppc601 , "ppc601" }, @@ -419,7 +419,8 @@ ArchSpec::ArchSpec() : m_triple (), m_core (kCore_invalid), m_byte_order (eByteOrderInvalid), - m_distribution_id () + m_distribution_id (), + m_flags (0) { } @@ -427,7 +428,8 @@ ArchSpec::ArchSpec (const char *triple_c m_triple (), m_core (kCore_invalid), m_byte_order (eByteOrderInvalid), - m_distribution_id () + m_distribution_id (), + m_flags (0) { if (triple_cstr) SetTriple(triple_cstr, platform); @@ -438,7 +440,8 @@ ArchSpec::ArchSpec (const char *triple_c m_triple (), m_core (kCore_invalid), m_byte_order (eByteOrderInvalid), - m_distribution_id () + m_distribution_id (), + m_flags (0) { if (triple_cstr) SetTriple(triple_cstr); @@ -448,7 +451,8 @@ ArchSpec::ArchSpec(const llvm::Triple &t m_triple (), m_core (kCore_invalid), m_byte_order (eByteOrderInvalid), - m_distribution_id () + m_distribution_id (), + m_flags (0) { SetTriple(triple); } @@ -457,7 +461,8 @@ ArchSpec::ArchSpec (ArchitectureType arc m_triple (), m_core (kCore_invalid), m_byte_order (eByteOrderInvalid), - m_distribution_id () + m_distribution_id (), + m_flags (0) { SetArchitecture (arch_type, cpu, subtype); } @@ -478,6 +483,7 @@ ArchSpec::operator= (const ArchSpec& rhs m_core = rhs.m_core; m_byte_order = rhs.m_byte_order; m_distribution_id = rhs.m_distribution_id; + m_flags = rhs.m_flags; } return *this; } @@ -489,6 +495,7 @@ ArchSpec::Clear() m_core = kCore_invalid; m_byte_order = eByteOrderInvalid; m_distribution_id.Clear (); + m_flags = 0; } //===----------------------------------------------------------------------===// Modified: vendor/lldb/dist/source/Host/common/NativeRegisterContext.cpp ============================================================================== --- vendor/lldb/dist/source/Host/common/NativeRegisterContext.cpp Sun Sep 6 18:37:02 2015 (r287513) +++ vendor/lldb/dist/source/Host/common/NativeRegisterContext.cpp Sun Sep 6 18:37:19 2015 (r287514) @@ -334,6 +334,12 @@ NativeRegisterContext::GetWatchpointAddr return LLDB_INVALID_ADDRESS; } +lldb::addr_t +NativeRegisterContext::GetWatchpointHitAddress (uint32_t wp_index) +{ + return LLDB_INVALID_ADDRESS; +} + bool NativeRegisterContext::HardwareSingleStep (bool enable) { Modified: vendor/lldb/dist/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp ============================================================================== --- vendor/lldb/dist/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp Sun Sep 6 18:37:02 2015 (r287513) +++ vendor/lldb/dist/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp Sun Sep 6 18:37:19 2015 (r287514) @@ -415,7 +415,7 @@ protected: -DisassemblerLLVMC::LLVMCDisassembler::LLVMCDisassembler (const char *triple, const char *cpu, unsigned flavor, DisassemblerLLVMC &owner): +DisassemblerLLVMC::LLVMCDisassembler::LLVMCDisassembler (const char *triple, const char *cpu, const char *features_str, unsigned flavor, DisassemblerLLVMC &owner): m_is_valid(true) { std::string Error; @@ -429,8 +429,6 @@ DisassemblerLLVMC::LLVMCDisassembler::LL m_instr_info_ap.reset(curr_target->createMCInstrInfo()); m_reg_info_ap.reset (curr_target->createMCRegInfo(triple)); - std::string features_str; - m_subtarget_info_ap.reset(curr_target->createMCSubtargetInfo(triple, cpu, features_str)); @@ -674,8 +672,25 @@ DisassemblerLLVMC::DisassemblerLLVMC (co default: cpu = ""; break; } + + std::string features_str = ""; + if (arch.GetTriple().getArch() == llvm::Triple::mips || arch.GetTriple().getArch() == llvm::Triple::mipsel + || arch.GetTriple().getArch() == llvm::Triple::mips64 || arch.GetTriple().getArch() == llvm::Triple::mips64el) + { + uint32_t arch_flags = arch.GetFlags (); + if (arch_flags & ArchSpec::eMIPSAse_msa) + features_str += "+msa,"; + if (arch_flags & ArchSpec::eMIPSAse_dsp) + features_str += "+dsp,"; + if (arch_flags & ArchSpec::eMIPSAse_dspr2) + features_str += "+dspr2,"; + if (arch_flags & ArchSpec::eMIPSAse_mips16) + features_str += "+mips16,"; + if (arch_flags & ArchSpec::eMIPSAse_micromips) + features_str += "+micromips,"; + } - m_disasm_ap.reset (new LLVMCDisassembler(triple, cpu, flavor, *this)); + m_disasm_ap.reset (new LLVMCDisassembler(triple, cpu, features_str.c_str(), flavor, *this)); if (!m_disasm_ap->IsValid()) { // We use m_disasm_ap.get() to tell whether we are valid or not, so if this isn't good for some reason, @@ -687,7 +702,7 @@ DisassemblerLLVMC::DisassemblerLLVMC (co if (arch.GetTriple().getArch() == llvm::Triple::arm) { std::string thumb_triple(thumb_arch.GetTriple().getTriple()); - m_alternate_disasm_ap.reset(new LLVMCDisassembler(thumb_triple.c_str(), "", flavor, *this)); + m_alternate_disasm_ap.reset(new LLVMCDisassembler(thumb_triple.c_str(), "", "", flavor, *this)); if (!m_alternate_disasm_ap->IsValid()) { m_disasm_ap.reset(); Modified: vendor/lldb/dist/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.h ============================================================================== --- vendor/lldb/dist/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.h Sun Sep 6 18:37:02 2015 (r287513) +++ vendor/lldb/dist/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.h Sun Sep 6 18:37:19 2015 (r287514) @@ -41,7 +41,7 @@ class DisassemblerLLVMC : public lldb_pr class LLVMCDisassembler { public: - LLVMCDisassembler (const char *triple, const char *cpu, unsigned flavor, DisassemblerLLVMC &owner); + LLVMCDisassembler (const char *triple, const char *cpu, const char *features_str, unsigned flavor, DisassemblerLLVMC &owner); ~LLVMCDisassembler(); Modified: vendor/lldb/dist/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp ============================================================================== --- vendor/lldb/dist/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp Sun Sep 6 18:37:02 2015 (r287513) +++ vendor/lldb/dist/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp Sun Sep 6 18:37:19 2015 (r287514) @@ -33,7 +33,7 @@ #include "llvm/ADT/STLExtras.h" #include "Plugins/Process/Utility/InstructionUtils.h" -#include "Plugins/Process/Utility/RegisterContext_mips64.h" //mips32 has same registers nos as mips64 +#include "Plugins/Process/Utility/RegisterContext_mips.h" //mips32 has same registers nos as mips64 using namespace lldb; using namespace lldb_private; @@ -124,6 +124,19 @@ EmulateInstructionMIPS::EmulateInstructi cpu = "generic"; break; } + std::string features = ""; + uint32_t arch_flags = arch.GetFlags (); + if (arch_flags & ArchSpec::eMIPSAse_msa) + features += "+msa,"; + if (arch_flags & ArchSpec::eMIPSAse_dsp) + features += "+dsp,"; + if (arch_flags & ArchSpec::eMIPSAse_dspr2) + features += "+dspr2,"; + if (arch_flags & ArchSpec::eMIPSAse_mips16) + features += "+mips16,"; + if (arch_flags & ArchSpec::eMIPSAse_micromips) + features += "+micromips,"; + m_reg_info.reset (target->createMCRegInfo (triple.getTriple())); assert (m_reg_info.get()); @@ -131,7 +144,7 @@ EmulateInstructionMIPS::EmulateInstructi assert (m_insn_info.get()); m_asm_info.reset (target->createMCAsmInfo (*m_reg_info, triple.getTriple())); - m_subtype_info.reset (target->createMCSubtargetInfo (triple.getTriple(), cpu, "")); + m_subtype_info.reset (target->createMCSubtargetInfo (triple.getTriple(), cpu, features)); assert (m_asm_info.get() && m_subtype_info.get()); m_context.reset (new llvm::MCContext (m_asm_info.get(), m_reg_info.get(), nullptr)); @@ -289,38 +302,38 @@ EmulateInstructionMIPS::GetRegisterName case gcc_dwarf_bad_mips: return "bad"; case gcc_dwarf_cause_mips: return "cause"; case gcc_dwarf_pc_mips: return "pc"; - case gcc_dwarf_f0_mips: return "fp_reg[0]"; - case gcc_dwarf_f1_mips: return "fp_reg[1]"; - case gcc_dwarf_f2_mips: return "fp_reg[2]"; - case gcc_dwarf_f3_mips: return "fp_reg[3]"; - case gcc_dwarf_f4_mips: return "fp_reg[4]"; - case gcc_dwarf_f5_mips: return "fp_reg[5]"; - case gcc_dwarf_f6_mips: return "fp_reg[6]"; - case gcc_dwarf_f7_mips: return "fp_reg[7]"; - case gcc_dwarf_f8_mips: return "fp_reg[8]"; - case gcc_dwarf_f9_mips: return "fp_reg[9]"; - case gcc_dwarf_f10_mips: return "fp_reg[10]"; - case gcc_dwarf_f11_mips: return "fp_reg[11]"; - case gcc_dwarf_f12_mips: return "fp_reg[12]"; - case gcc_dwarf_f13_mips: return "fp_reg[13]"; - case gcc_dwarf_f14_mips: return "fp_reg[14]"; - case gcc_dwarf_f15_mips: return "fp_reg[15]"; - case gcc_dwarf_f16_mips: return "fp_reg[16]"; - case gcc_dwarf_f17_mips: return "fp_reg[17]"; - case gcc_dwarf_f18_mips: return "fp_reg[18]"; - case gcc_dwarf_f19_mips: return "fp_reg[19]"; - case gcc_dwarf_f20_mips: return "fp_reg[20]"; - case gcc_dwarf_f21_mips: return "fp_reg[21]"; - case gcc_dwarf_f22_mips: return "fp_reg[22]"; - case gcc_dwarf_f23_mips: return "fp_reg[23]"; - case gcc_dwarf_f24_mips: return "fp_reg[24]"; - case gcc_dwarf_f25_mips: return "fp_reg[25]"; - case gcc_dwarf_f26_mips: return "fp_reg[26]"; - case gcc_dwarf_f27_mips: return "fp_reg[27]"; - case gcc_dwarf_f28_mips: return "fp_reg[28]"; - case gcc_dwarf_f29_mips: return "fp_reg[29]"; - case gcc_dwarf_f30_mips: return "fp_reg[30]"; - case gcc_dwarf_f31_mips: return "fp_reg[31]"; + case gcc_dwarf_f0_mips: return "f0"; + case gcc_dwarf_f1_mips: return "f1"; + case gcc_dwarf_f2_mips: return "f2"; + case gcc_dwarf_f3_mips: return "f3"; + case gcc_dwarf_f4_mips: return "f4"; + case gcc_dwarf_f5_mips: return "f5"; + case gcc_dwarf_f6_mips: return "f6"; + case gcc_dwarf_f7_mips: return "f7"; + case gcc_dwarf_f8_mips: return "f8"; + case gcc_dwarf_f9_mips: return "f9"; + case gcc_dwarf_f10_mips: return "f10"; + case gcc_dwarf_f11_mips: return "f11"; + case gcc_dwarf_f12_mips: return "f12"; + case gcc_dwarf_f13_mips: return "f13"; + case gcc_dwarf_f14_mips: return "f14"; + case gcc_dwarf_f15_mips: return "f15"; + case gcc_dwarf_f16_mips: return "f16"; + case gcc_dwarf_f17_mips: return "f17"; + case gcc_dwarf_f18_mips: return "f18"; + case gcc_dwarf_f19_mips: return "f19"; + case gcc_dwarf_f20_mips: return "f20"; + case gcc_dwarf_f21_mips: return "f21"; + case gcc_dwarf_f22_mips: return "f22"; + case gcc_dwarf_f23_mips: return "f23"; + case gcc_dwarf_f24_mips: return "f24"; + case gcc_dwarf_f25_mips: return "f25"; + case gcc_dwarf_f26_mips: return "f26"; + case gcc_dwarf_f27_mips: return "f27"; + case gcc_dwarf_f28_mips: return "f28"; + case gcc_dwarf_f29_mips: return "f29"; + case gcc_dwarf_f30_mips: return "f30"; + case gcc_dwarf_f31_mips: return "f31"; case gcc_dwarf_fcsr_mips: return "fcsr"; case gcc_dwarf_fir_mips: return "fir"; } Modified: vendor/lldb/dist/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp ============================================================================== --- vendor/lldb/dist/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp Sun Sep 6 18:37:02 2015 (r287513) +++ vendor/lldb/dist/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp Sun Sep 6 18:37:19 2015 (r287514) @@ -33,7 +33,7 @@ #include "llvm/ADT/STLExtras.h" #include "Plugins/Process/Utility/InstructionUtils.h" -#include "Plugins/Process/Utility/RegisterContext_mips64.h" +#include "Plugins/Process/Utility/RegisterContext_mips.h" using namespace lldb; using namespace lldb_private; @@ -124,6 +124,19 @@ EmulateInstructionMIPS64::EmulateInstruc cpu = "generic"; break; } + std::string features = ""; + uint32_t arch_flags = arch.GetFlags (); + if (arch_flags & ArchSpec::eMIPSAse_msa) + features += "+msa,"; + if (arch_flags & ArchSpec::eMIPSAse_dsp) + features += "+dsp,"; + if (arch_flags & ArchSpec::eMIPSAse_dspr2) + features += "+dspr2,"; + if (arch_flags & ArchSpec::eMIPSAse_mips16) + features += "+mips16,"; + if (arch_flags & ArchSpec::eMIPSAse_micromips) + features += "+micromips,"; + m_reg_info.reset (target->createMCRegInfo (triple.getTriple())); assert (m_reg_info.get()); @@ -131,7 +144,7 @@ EmulateInstructionMIPS64::EmulateInstruc assert (m_insn_info.get()); m_asm_info.reset (target->createMCAsmInfo (*m_reg_info, triple.getTriple())); - m_subtype_info.reset (target->createMCSubtargetInfo (triple.getTriple(), cpu, "")); + m_subtype_info.reset (target->createMCSubtargetInfo (triple.getTriple(), cpu, features)); assert (m_asm_info.get() && m_subtype_info.get()); m_context.reset (new llvm::MCContext (m_asm_info.get(), m_reg_info.get(), nullptr)); @@ -289,38 +302,38 @@ EmulateInstructionMIPS64::GetRegisterNam case gcc_dwarf_bad_mips64: return "bad"; case gcc_dwarf_cause_mips64: return "cause"; case gcc_dwarf_pc_mips64: return "pc"; - case gcc_dwarf_f0_mips64: return "fp_reg[0]"; - case gcc_dwarf_f1_mips64: return "fp_reg[1]"; - case gcc_dwarf_f2_mips64: return "fp_reg[2]"; - case gcc_dwarf_f3_mips64: return "fp_reg[3]"; - case gcc_dwarf_f4_mips64: return "fp_reg[4]"; - case gcc_dwarf_f5_mips64: return "fp_reg[5]"; - case gcc_dwarf_f6_mips64: return "fp_reg[6]"; - case gcc_dwarf_f7_mips64: return "fp_reg[7]"; - case gcc_dwarf_f8_mips64: return "fp_reg[8]"; - case gcc_dwarf_f9_mips64: return "fp_reg[9]"; - case gcc_dwarf_f10_mips64: return "fp_reg[10]"; - case gcc_dwarf_f11_mips64: return "fp_reg[11]"; - case gcc_dwarf_f12_mips64: return "fp_reg[12]"; - case gcc_dwarf_f13_mips64: return "fp_reg[13]"; - case gcc_dwarf_f14_mips64: return "fp_reg[14]"; - case gcc_dwarf_f15_mips64: return "fp_reg[15]"; - case gcc_dwarf_f16_mips64: return "fp_reg[16]"; - case gcc_dwarf_f17_mips64: return "fp_reg[17]"; - case gcc_dwarf_f18_mips64: return "fp_reg[18]"; - case gcc_dwarf_f19_mips64: return "fp_reg[19]"; - case gcc_dwarf_f20_mips64: return "fp_reg[20]"; - case gcc_dwarf_f21_mips64: return "fp_reg[21]"; - case gcc_dwarf_f22_mips64: return "fp_reg[22]"; - case gcc_dwarf_f23_mips64: return "fp_reg[23]"; - case gcc_dwarf_f24_mips64: return "fp_reg[24]"; - case gcc_dwarf_f25_mips64: return "fp_reg[25]"; - case gcc_dwarf_f26_mips64: return "fp_reg[26]"; - case gcc_dwarf_f27_mips64: return "fp_reg[27]"; - case gcc_dwarf_f28_mips64: return "fp_reg[28]"; - case gcc_dwarf_f29_mips64: return "fp_reg[29]"; - case gcc_dwarf_f30_mips64: return "fp_reg[30]"; - case gcc_dwarf_f31_mips64: return "fp_reg[31]"; + case gcc_dwarf_f0_mips64: return "f0"; + case gcc_dwarf_f1_mips64: return "f1"; + case gcc_dwarf_f2_mips64: return "f2"; + case gcc_dwarf_f3_mips64: return "f3"; + case gcc_dwarf_f4_mips64: return "f4"; + case gcc_dwarf_f5_mips64: return "f5"; + case gcc_dwarf_f6_mips64: return "f6"; + case gcc_dwarf_f7_mips64: return "f7"; + case gcc_dwarf_f8_mips64: return "f8"; + case gcc_dwarf_f9_mips64: return "f9"; + case gcc_dwarf_f10_mips64: return "f10"; + case gcc_dwarf_f11_mips64: return "f11"; + case gcc_dwarf_f12_mips64: return "f12"; + case gcc_dwarf_f13_mips64: return "f13"; + case gcc_dwarf_f14_mips64: return "f14"; + case gcc_dwarf_f15_mips64: return "f15"; + case gcc_dwarf_f16_mips64: return "f16"; + case gcc_dwarf_f17_mips64: return "f17"; + case gcc_dwarf_f18_mips64: return "f18"; + case gcc_dwarf_f19_mips64: return "f19"; + case gcc_dwarf_f20_mips64: return "f20"; + case gcc_dwarf_f21_mips64: return "f21"; + case gcc_dwarf_f22_mips64: return "f22"; + case gcc_dwarf_f23_mips64: return "f23"; + case gcc_dwarf_f24_mips64: return "f24"; + case gcc_dwarf_f25_mips64: return "f25"; + case gcc_dwarf_f26_mips64: return "f26"; + case gcc_dwarf_f27_mips64: return "f27"; + case gcc_dwarf_f28_mips64: return "f28"; + case gcc_dwarf_f29_mips64: return "f29"; + case gcc_dwarf_f30_mips64: return "f30"; + case gcc_dwarf_f31_mips64: return "f31"; case gcc_dwarf_fcsr_mips64: return "fcsr"; case gcc_dwarf_fir_mips64: return "fir"; } @@ -397,6 +410,9 @@ EmulateInstructionMIPS64::GetOpcodeForIn { "SD", &EmulateInstructionMIPS64::Emulate_SD, "SD rt,offset(rs)" }, { "LD", &EmulateInstructionMIPS64::Emulate_LD, "LD rt,offset(base)" }, + { "SW", &EmulateInstructionMIPS64::Emulate_SW, "SW rt,offset(rs)" }, + { "LW", &EmulateInstructionMIPS64::Emulate_LW, "LW rt,offset(rs)" }, + //---------------------------------------------------------------------- // Branch instructions //---------------------------------------------------------------------- @@ -644,35 +660,95 @@ EmulateInstructionMIPS64::Emulate_DADDiu } bool +EmulateInstructionMIPS64::Emulate_SW (llvm::MCInst& insn) +{ + bool success = false; + uint32_t base; + int64_t imm, address; + Context bad_vaddr_context; + + base = m_reg_info->getEncodingValue (insn.getOperand(1).getReg()); + imm = insn.getOperand(2).getImm(); + + RegisterInfo reg_info_base; + if (!GetRegisterInfo (eRegisterKindDWARF, gcc_dwarf_zero_mips64 + base, reg_info_base)) + return false; + + /* read base register */ + address = ReadRegisterUnsigned (eRegisterKindDWARF, gcc_dwarf_zero_mips64 + base, 0, &success); + if (!success) + return false; + + /* destination address */ + address = address + imm; + + /* Set the bad_vaddr register with base address used in the instruction */ + bad_vaddr_context.type = eContextInvalid; + WriteRegisterUnsigned (bad_vaddr_context, eRegisterKindDWARF, gcc_dwarf_bad_mips64, address); + + return true; +} + +bool +EmulateInstructionMIPS64::Emulate_LW (llvm::MCInst& insn) +{ + bool success = false; + uint32_t base; + int64_t imm, address; + Context bad_vaddr_context; + + base = m_reg_info->getEncodingValue (insn.getOperand(1).getReg()); + imm = insn.getOperand(2).getImm(); + + RegisterInfo reg_info_base; + if (!GetRegisterInfo (eRegisterKindDWARF, gcc_dwarf_zero_mips64 + base, reg_info_base)) + return false; + + /* read base register */ + address = ReadRegisterUnsigned (eRegisterKindDWARF, gcc_dwarf_zero_mips64 + base, 0, &success); + if (!success) + return false; + + /* destination address */ + address = address + imm; + + /* Set the bad_vaddr register with base address used in the instruction */ + bad_vaddr_context.type = eContextInvalid; + WriteRegisterUnsigned (bad_vaddr_context, eRegisterKindDWARF, gcc_dwarf_bad_mips64, address); + + return true; +} + +bool EmulateInstructionMIPS64::Emulate_SD (llvm::MCInst& insn) { + uint64_t address; + RegisterInfo reg_info_base; + RegisterInfo reg_info_src; bool success = false; uint32_t imm16 = insn.getOperand(2).getImm(); uint64_t imm = SignedBits(imm16, 15, 0); uint32_t src, base; + Context bad_vaddr_context; src = m_reg_info->getEncodingValue (insn.getOperand(0).getReg()); base = m_reg_info->getEncodingValue (insn.getOperand(1).getReg()); - /* We look for sp based non-volatile register stores */ - if (base == gcc_dwarf_sp_mips64 && nonvolatile_reg_p (src)) - { - uint64_t address; - RegisterInfo reg_info_base; - RegisterInfo reg_info_src; - - if (!GetRegisterInfo (eRegisterKindDWARF, gcc_dwarf_zero_mips64 + base, reg_info_base) - || !GetRegisterInfo (eRegisterKindDWARF, gcc_dwarf_zero_mips64 + src, reg_info_src)) - return false; + if (!GetRegisterInfo (eRegisterKindDWARF, gcc_dwarf_zero_mips64 + base, reg_info_base) + || !GetRegisterInfo (eRegisterKindDWARF, gcc_dwarf_zero_mips64 + src, reg_info_src)) + return false; - /* read SP */ - address = ReadRegisterUnsigned (eRegisterKindDWARF, gcc_dwarf_zero_mips64 + base, 0, &success); - if (!success) - return false; + /* read SP */ + address = ReadRegisterUnsigned (eRegisterKindDWARF, gcc_dwarf_zero_mips64 + base, 0, &success); + if (!success) + return false; - /* destination address */ - address = address + imm; + /* destination address */ + address = address + imm; + /* We look for sp based non-volatile register stores */ + if (base == gcc_dwarf_sp_mips64 && nonvolatile_reg_p (src)) + { Context context; RegisterValue data_src; context.type = eContextPushRegisterOnStack; @@ -689,11 +765,13 @@ EmulateInstructionMIPS64::Emulate_SD (ll if (!WriteMemory (context, address, buffer, reg_info_src.byte_size)) return false; - - return true; } - return false; + /* Set the bad_vaddr register with base address used in the instruction */ + bad_vaddr_context.type = eContextInvalid; + WriteRegisterUnsigned (bad_vaddr_context, eRegisterKindDWARF, gcc_dwarf_bad_mips64, address); + + return true; } bool Modified: vendor/lldb/dist/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.h ============================================================================== --- vendor/lldb/dist/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.h Sun Sep 6 18:37:02 2015 (r287513) +++ vendor/lldb/dist/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.h Sun Sep 6 18:37:19 2015 (r287514) @@ -128,6 +128,12 @@ protected: Emulate_SD (llvm::MCInst& insn); bool + Emulate_SW (llvm::MCInst& insn); + + bool + Emulate_LW (llvm::MCInst& insn); + + bool Emulate_LD (llvm::MCInst& insn); bool Modified: vendor/lldb/dist/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp ============================================================================== --- vendor/lldb/dist/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp Sun Sep 6 18:37:02 2015 (r287513) +++ vendor/lldb/dist/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp Sun Sep 6 18:37:19 2015 (r287514) @@ -1437,6 +1437,25 @@ ObjectFileELF::GetSectionHeaderInfo(Sect assert(spec_ostype == ostype); } + if (arch_spec.GetMachine() == llvm::Triple::mips || arch_spec.GetMachine() == llvm::Triple::mipsel + || arch_spec.GetMachine() == llvm::Triple::mips64 || arch_spec.GetMachine() == llvm::Triple::mips64el) + { + switch (header.e_flags & llvm::ELF::EF_MIPS_ARCH_ASE) + { + case llvm::ELF::EF_MIPS_MICROMIPS: + arch_spec.SetFlags (ArchSpec::eMIPSAse_micromips); + break; + case llvm::ELF::EF_MIPS_ARCH_ASE_M16: + arch_spec.SetFlags (ArchSpec::eMIPSAse_mips16); + break; + case llvm::ELF::EF_MIPS_ARCH_ASE_MDMX: + arch_spec.SetFlags (ArchSpec::eMIPSAse_mdmx); + break; + default: + break; + } + } + // If there are no section headers we are done. if (header.e_shnum == 0) return 0; @@ -1483,6 +1502,22 @@ ObjectFileELF::GetSectionHeaderInfo(Sect I->section_name = name; + if (arch_spec.GetMachine() == llvm::Triple::mips || arch_spec.GetMachine() == llvm::Triple::mipsel + || arch_spec.GetMachine() == llvm::Triple::mips64 || arch_spec.GetMachine() == llvm::Triple::mips64el) + { + if (header.sh_type == SHT_MIPS_ABIFLAGS) + { + DataExtractor data; + if (section_size && (data.SetData (object_data, header.sh_offset, section_size) == section_size)) + { + lldb::offset_t ase_offset = 12; // MIPS ABI Flags Version: 0 + uint32_t arch_flags = arch_spec.GetFlags (); + arch_flags |= data.GetU32 (&ase_offset); + arch_spec.SetFlags (arch_flags); + } + } + } + if (name == g_sect_name_gnu_debuglink) { DataExtractor data; Modified: vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextFreeBSD_mips64.cpp ============================================================================== --- vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextFreeBSD_mips64.cpp Sun Sep 6 18:37:02 2015 (r287513) +++ vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextFreeBSD_mips64.cpp Sun Sep 6 18:37:19 2015 (r287514) @@ -57,7 +57,7 @@ typedef struct _GPR uint64_t pc; uint64_t ic; uint64_t dummy; -} GPR; +} GPR_freebsd_mips; //--------------------------------------------------------------------------- // Include RegisterInfos_mips64 to declare our g_register_infos_mips64 structure. @@ -74,7 +74,7 @@ RegisterContextFreeBSD_mips64::RegisterC size_t RegisterContextFreeBSD_mips64::GetGPRSize() const { - return sizeof(GPR); + return sizeof(GPR_freebsd_mips); } const RegisterInfo * Modified: vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextLinux_mips.cpp ============================================================================== --- vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextLinux_mips.cpp Sun Sep 6 18:37:02 2015 (r287513) +++ vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextLinux_mips.cpp Sun Sep 6 18:37:19 2015 (r287514) @@ -14,55 +14,14 @@ #include "RegisterContextLinux_mips.h" // Internal codes for mips registers -#include "lldb-mips64-register-enums.h" -#include "RegisterContext_mips64.h" +#include "lldb-mips-linux-register-enums.h" + +// For GP and FP buffers +#include "RegisterContext_mips.h" using namespace lldb_private; using namespace lldb; -// GP registers -typedef struct _GPR -{ - uint32_t zero; - uint32_t r1; - uint32_t r2; - uint32_t r3; - uint32_t r4; - uint32_t r5; - uint32_t r6; - uint32_t r7; - uint32_t r8; - uint32_t r9; - uint32_t r10; - uint32_t r11; - uint32_t r12; - uint32_t r13; - uint32_t r14; - uint32_t r15; - uint32_t r16; - uint32_t r17; - uint32_t r18; - uint32_t r19; - uint32_t r20; - uint32_t r21; - uint32_t r22; - uint32_t r23; - uint32_t r24; - uint32_t r25; - uint32_t r26; - uint32_t r27; - uint32_t gp; - uint32_t sp; - uint32_t r30; - uint32_t ra; - uint32_t mullo; - uint32_t mulhi; - uint32_t pc; - uint32_t badvaddr; - uint32_t sr; - uint32_t cause; -} GPR; - //--------------------------------------------------------------------------- // Include RegisterInfos_mips to declare our g_register_infos_mips structure. //--------------------------------------------------------------------------- @@ -78,7 +37,7 @@ RegisterContextLinux_mips::RegisterConte size_t RegisterContextLinux_mips::GetGPRSize() const { - return sizeof(GPR); + return sizeof(GPR_linux_mips); } const RegisterInfo * @@ -100,3 +59,9 @@ RegisterContextLinux_mips::GetRegisterCo { return static_cast (sizeof (g_register_infos_mips) / sizeof (g_register_infos_mips [0])); } + +uint32_t +RegisterContextLinux_mips::GetUserRegisterCount () const +{ + return static_cast (k_num_user_registers_mips); +} Modified: vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextLinux_mips.h ============================================================================== --- vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextLinux_mips.h Sun Sep 6 18:37:02 2015 (r287513) +++ vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextLinux_mips.h Sun Sep 6 18:37:19 2015 (r287514) @@ -27,6 +27,9 @@ public: uint32_t GetRegisterCount () const override; + + uint32_t + GetUserRegisterCount () const override; }; #endif Modified: vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextLinux_mips64.cpp ============================================================================== --- vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextLinux_mips64.cpp Sun Sep 6 18:37:02 2015 (r287513) +++ vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextLinux_mips64.cpp Sun Sep 6 18:37:19 2015 (r287514) @@ -15,63 +15,22 @@ // For GDB, GCC and DWARF Register numbers #include "RegisterContextLinux_mips64.h" -// Internal codes for all mips64 registers -#include "lldb-mips64-register-enums.h" -#include "RegisterContext_mips64.h" +// For GP and FP buffers +#include "RegisterContext_mips.h" + +// Internal codes for all mips32 and mips64 registers +#include "lldb-mips-linux-register-enums.h" using namespace lldb; using namespace lldb_private; -// GP registers -typedef struct _GPR -{ - uint64_t zero; - uint64_t r1; - uint64_t r2; - uint64_t r3; - uint64_t r4; - uint64_t r5; - uint64_t r6; - uint64_t r7; - uint64_t r8; - uint64_t r9; - uint64_t r10; - uint64_t r11; - uint64_t r12; - uint64_t r13; - uint64_t r14; - uint64_t r15; - uint64_t r16; - uint64_t r17; - uint64_t r18; - uint64_t r19; - uint64_t r20; - uint64_t r21; - uint64_t r22; - uint64_t r23; - uint64_t r24; - uint64_t r25; - uint64_t r26; - uint64_t r27; - uint64_t gp; - uint64_t sp; - uint64_t r30; - uint64_t ra; - uint64_t mullo; - uint64_t mulhi; - uint64_t pc; - uint64_t badvaddr; - uint64_t sr; - uint64_t cause; - uint64_t ic; - uint64_t dummy; -} GPR; - //--------------------------------------------------------------------------- // Include RegisterInfos_mips64 to declare our g_register_infos_mips64 structure. //--------------------------------------------------------------------------- #define DECLARE_REGISTER_INFOS_MIPS64_STRUCT +#define LINUX_MIPS64 #include "RegisterInfos_mips64.h" +#undef LINUX_MIPS64 #undef DECLARE_REGISTER_INFOS_MIPS64_STRUCT //--------------------------------------------------------------------------- @@ -115,17 +74,35 @@ GetRegisterInfoCount (const ArchSpec &ta } } +uint32_t +GetUserRegisterInfoCount (const ArchSpec &target_arch) +{ + switch (target_arch.GetMachine()) + { + case llvm::Triple::mips: + case llvm::Triple::mipsel: + return static_cast (k_num_user_registers_mips); + case llvm::Triple::mips64el: + case llvm::Triple::mips64: + return static_cast (k_num_user_registers_mips64); + default: + assert(false && "Unhandled target architecture."); + return 0; + } +} + RegisterContextLinux_mips64::RegisterContextLinux_mips64(const ArchSpec &target_arch) : lldb_private::RegisterInfoInterface(target_arch), m_register_info_p (GetRegisterInfoPtr (target_arch)), - m_register_info_count (GetRegisterInfoCount (target_arch)) + m_register_info_count (GetRegisterInfoCount (target_arch)), + m_user_register_count (GetUserRegisterInfoCount (target_arch)) { } size_t RegisterContextLinux_mips64::GetGPRSize() const { - return sizeof(GPR); + return sizeof(GPR_linux_mips); } const RegisterInfo * @@ -140,4 +117,10 @@ RegisterContextLinux_mips64::GetRegister return m_register_info_count; } +uint32_t +RegisterContextLinux_mips64::GetUserRegisterCount () const +{ + return m_user_register_count; +} + #endif Modified: vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextLinux_mips64.h ============================================================================== --- vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextLinux_mips64.h Sun Sep 6 18:37:02 2015 (r287513) +++ vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextLinux_mips64.h Sun Sep 6 18:37:19 2015 (r287514) @@ -30,9 +30,13 @@ public: uint32_t GetRegisterCount () const override; + uint32_t + GetUserRegisterCount () const override; + private: const lldb_private::RegisterInfo *m_register_info_p; uint32_t m_register_info_count; + uint32_t m_user_register_count; }; #endif Modified: vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.h ============================================================================== --- vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.h Sun Sep 6 18:37:02 2015 (r287513) +++ vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.h Sun Sep 6 18:37:19 2015 (r287514) @@ -12,8 +12,8 @@ #include "lldb/Core/Log.h" #include "RegisterContextPOSIX.h" -#include "RegisterContext_mips64.h" -#include "lldb-mips64-register-enums.h" +#include "RegisterContext_mips.h" +#include "lldb-mips-freebsd-register-enums.h" using namespace lldb_private; Added: vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContext_mips.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lldb/dist/source/Plugins/Process/Utility/RegisterContext_mips.h Sun Sep 6 18:37:19 2015 (r287514) @@ -0,0 +1,611 @@ +//===-- RegisterContext_mips.h --------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef liblldb_RegisterContext_mips64_H_ +#define liblldb_RegisterContext_mips64_H_ + +// eh_frame and DWARF Register numbers (eRegisterKindEHFrame & eRegisterKindDWARF) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sun Sep 6 18:37:52 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6F89C9CB08C; Sun, 6 Sep 2015 18:37:52 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 463CD1987; Sun, 6 Sep 2015 18:37:52 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t86IbqR6083526; Sun, 6 Sep 2015 18:37:52 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t86IbqHU083525; Sun, 6 Sep 2015 18:37:52 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201509061837.t86IbqHU083525@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 6 Sep 2015 18:37:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r287515 - vendor/lldb/lldb-release_370-r246257 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Sep 2015 18:37:52 -0000 Author: dim Date: Sun Sep 6 18:37:51 2015 New Revision: 287515 URL: https://svnweb.freebsd.org/changeset/base/287515 Log: Tag stripped lldb 3.7.0 release (r246257). Added: - copied from r287514, vendor/lldb/dist/ Directory Properties: vendor/lldb/lldb-release_370-r246257/ (props changed) From owner-svn-src-all@freebsd.org Sun Sep 6 18:41:29 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1C1E09CB28D; Sun, 6 Sep 2015 18:41:29 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 06E411C96; Sun, 6 Sep 2015 18:41:29 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t86IfSVS085419; Sun, 6 Sep 2015 18:41:28 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t86IfPZw085402; Sun, 6 Sep 2015 18:41:25 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201509061841.t86IfPZw085402@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 6 Sep 2015 18:41:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r287516 - in vendor/compiler-rt/dist: . SDKs SDKs/linux SDKs/linux/usr/include SDKs/linux/usr/include/sys cmake cmake/Modules include/sanitizer lib lib/asan lib/asan/scripts lib/asan/te... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Sep 2015 18:41:29 -0000 Author: dim Date: Sun Sep 6 18:41:23 2015 New Revision: 287516 URL: https://svnweb.freebsd.org/changeset/base/287516 Log: Import compiler-rt 3.7.0 release (r246257). Added: vendor/compiler-rt/dist/lib/builtins/atomic_flag_clear.c (contents, props changed) vendor/compiler-rt/dist/lib/builtins/atomic_flag_clear_explicit.c (contents, props changed) vendor/compiler-rt/dist/lib/builtins/atomic_flag_test_and_set.c (contents, props changed) vendor/compiler-rt/dist/lib/builtins/atomic_flag_test_and_set_explicit.c (contents, props changed) vendor/compiler-rt/dist/lib/builtins/atomic_signal_fence.c (contents, props changed) vendor/compiler-rt/dist/lib/builtins/atomic_thread_fence.c (contents, props changed) vendor/compiler-rt/dist/lib/builtins/extendhfsf2.c (contents, props changed) vendor/compiler-rt/dist/lib/builtins/fixtfdi.c (contents, props changed) vendor/compiler-rt/dist/lib/builtins/fixtfsi.c (contents, props changed) vendor/compiler-rt/dist/lib/builtins/fixtfti.c (contents, props changed) vendor/compiler-rt/dist/lib/builtins/fixunstfdi.c (contents, props changed) vendor/compiler-rt/dist/lib/builtins/fixunstfsi.c (contents, props changed) vendor/compiler-rt/dist/lib/builtins/fixunstfti.c (contents, props changed) vendor/compiler-rt/dist/lib/builtins/fp_fixint_impl.inc (contents, props changed) vendor/compiler-rt/dist/lib/builtins/fp_fixuint_impl.inc (contents, props changed) vendor/compiler-rt/dist/lib/builtins/i386/chkstk.S (contents, props changed) vendor/compiler-rt/dist/lib/builtins/truncdfhf2.c (contents, props changed) vendor/compiler-rt/dist/lib/builtins/truncsfhf2.c (contents, props changed) vendor/compiler-rt/dist/lib/builtins/x86_64/chkstk.S (contents, props changed) vendor/compiler-rt/dist/lib/profile/InstrProfilingUtil.c (contents, props changed) vendor/compiler-rt/dist/lib/profile/InstrProfilingUtil.h (contents, props changed) vendor/compiler-rt/dist/lib/safestack/ vendor/compiler-rt/dist/lib/safestack/CMakeLists.txt (contents, props changed) vendor/compiler-rt/dist/lib/safestack/safestack.cc (contents, props changed) vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_posix.h (contents, props changed) vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_symbolizer_internal.h (contents, props changed) vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_symbolizer_mac.cc (contents, props changed) vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_symbolizer_mac.h (contents, props changed) vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_symbolizer_process_libcdep.cc (contents, props changed) vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_symbolizer_win.h (contents, props changed) vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_unwind_linux_libcdep.cc (contents, props changed) vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_symbolizer_test.cc (contents, props changed) vendor/compiler-rt/dist/lib/tsan/rtl/tsan_interceptors.h (contents, props changed) vendor/compiler-rt/dist/lib/tsan/rtl/tsan_new_delete.cc (contents, props changed) vendor/compiler-rt/dist/lib/ubsan/ubsan_init_standalone.cc (contents, props changed) vendor/compiler-rt/dist/lib/ubsan/ubsan_platform.h (contents, props changed) vendor/compiler-rt/dist/lib/ubsan/ubsan_type_hash_itanium.cc (contents, props changed) vendor/compiler-rt/dist/lib/ubsan/ubsan_type_hash_win.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/Darwin/atos-symbolizer-dyld-root-path.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/Darwin/atos-symbolizer.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/Darwin/dladdr-demangling.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/Darwin/empty-section.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/Darwin/sandbox-symbolizer.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/Darwin/suppressions-sandbox.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/Linux/asan_default_suppressions.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/Linux/coverage-missing.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/Linux/init-order-dlopen.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/Linux/leak_check_segv.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/Linux/read_binary_name_regtest.c (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/Linux/signal_during_stop_the_world.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/Linux/static_tls.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/Posix/coverage-direct-activation.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/Posix/coverage-direct-large.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/Posix/coverage-direct.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/Posix/coverage-fork-direct.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/Posix/coverage-fork.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/Posix/coverage-module-unloaded.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/Posix/coverage-sandboxing.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/Posix/coverage.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/Posix/interception-in-shared-lib-test.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/Posix/log_path_fork_test.cc.disabled vendor/compiler-rt/dist/test/asan/TestCases/Windows/bind_io_completion_callback.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/Windows/coverage-basic.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/Windows/default_options.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/Windows/dll_report_globals_symbolization_at_startup.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/Windows/free_hook_realloc.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/Windows/on_error_callback.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/Windows/queue_user_work_item.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/Windows/queue_user_work_item_report.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/Windows/report_globals_reload_dll.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/Windows/report_globals_vs_freelibrary.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/alloca_loop_unpoisoning.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/alloca_vla_interact.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/atoi_strict.c (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/atol_strict.c (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/atoll_strict.c (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/closed-fds.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/coverage-and-lsan.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/coverage-caller-callee-total-count.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/coverage-caller-callee.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/coverage-disabled.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/coverage-levels.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/coverage-maybe-open-file.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/coverage-order-pcs.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/coverage-reset.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/coverage-tracing.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/strcasestr-1.c (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/strcasestr-2.c (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/strcasestr_strict.c (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/strcat_strict.c (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/strchr_strict.c (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/strcmp_strict.c (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/strcspn-1.c (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/strcspn-2.c (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/strcspn_strict.c (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/strncat_strict.c (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/strpbrk-1.c (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/strpbrk-2.c (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/strpbrk_strict.c (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/strspn-1.c (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/strspn-2.c (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/strspn_strict.c (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/strstr-1.c (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/strstr-2.c (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/strstr_strict.c (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/strtol_strict.c (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/strtoll_strict.c (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/suppressions-exec-relative-location.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/verbose-log-path_test.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/vla_chrome_testcase.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/vla_condition_overflow.cc (contents, props changed) vendor/compiler-rt/dist/test/asan/TestCases/vla_loop_overfow.cc (contents, props changed) vendor/compiler-rt/dist/test/builtins/Unit/extendhfsf2_test.c (contents, props changed) vendor/compiler-rt/dist/test/builtins/Unit/fixtfsi_test.c (contents, props changed) vendor/compiler-rt/dist/test/builtins/Unit/fixunstfsi_test.c (contents, props changed) vendor/compiler-rt/dist/test/builtins/Unit/truncdfhf2_test.c (contents, props changed) vendor/compiler-rt/dist/test/builtins/Unit/truncdfsf2_test.c (contents, props changed) vendor/compiler-rt/dist/test/builtins/Unit/truncsfhf2_test.c (contents, props changed) vendor/compiler-rt/dist/test/cfi/README.txt (contents, props changed) vendor/compiler-rt/dist/test/cfi/bad-cast.cpp (contents, props changed) vendor/compiler-rt/dist/test/cfi/nvcall.cpp (contents, props changed) vendor/compiler-rt/dist/test/cfi/sibling.cpp (contents, props changed) vendor/compiler-rt/dist/test/lsan/TestCases/recoverable_leak_check.cc (contents, props changed) vendor/compiler-rt/dist/test/msan/Linux/fopencookie.cc (contents, props changed) vendor/compiler-rt/dist/test/msan/Linux/ioctl_sound.cc (contents, props changed) vendor/compiler-rt/dist/test/msan/Linux/mallinfo.cc (contents, props changed) vendor/compiler-rt/dist/test/msan/Linux/obstack.cc (contents, props changed) vendor/compiler-rt/dist/test/msan/mmap.cc (contents, props changed) vendor/compiler-rt/dist/test/profile/Inputs/gcc-flag-compatibility.c (contents, props changed) vendor/compiler-rt/dist/test/profile/gcc-flag-compatibility.test vendor/compiler-rt/dist/test/profile/instrprof-override-filename-then-reset-default.c (contents, props changed) vendor/compiler-rt/dist/test/profile/instrprof-override-filename-with-env.c (contents, props changed) vendor/compiler-rt/dist/test/profile/instrprof-override-filename.c (contents, props changed) vendor/compiler-rt/dist/test/profile/instrprof-set-filename-then-reset-default.c (contents, props changed) vendor/compiler-rt/dist/test/safestack/ vendor/compiler-rt/dist/test/safestack/CMakeLists.txt (contents, props changed) vendor/compiler-rt/dist/test/safestack/buffer-copy-vla.c (contents, props changed) vendor/compiler-rt/dist/test/safestack/buffer-copy.c (contents, props changed) vendor/compiler-rt/dist/test/safestack/init.c (contents, props changed) vendor/compiler-rt/dist/test/safestack/lit.cfg vendor/compiler-rt/dist/test/safestack/lit.site.cfg.in (contents, props changed) vendor/compiler-rt/dist/test/safestack/lto.c (contents, props changed) vendor/compiler-rt/dist/test/safestack/overflow.c (contents, props changed) vendor/compiler-rt/dist/test/safestack/pthread-cleanup.c (contents, props changed) vendor/compiler-rt/dist/test/safestack/pthread.c (contents, props changed) vendor/compiler-rt/dist/test/safestack/utils.h (contents, props changed) vendor/compiler-rt/dist/test/sanitizer_common/TestCases/Linux/assert.cc (contents, props changed) vendor/compiler-rt/dist/test/sanitizer_common/TestCases/Linux/signal_segv_handler.cc (contents, props changed) vendor/compiler-rt/dist/test/sanitizer_common/TestCases/Posix/ vendor/compiler-rt/dist/test/sanitizer_common/TestCases/Posix/decorate_proc_maps.cc (contents, props changed) vendor/compiler-rt/dist/test/sanitizer_common/TestCases/Posix/lit.local.cfg vendor/compiler-rt/dist/test/sanitizer_common/TestCases/strcasestr.c (contents, props changed) vendor/compiler-rt/dist/test/sanitizer_common/TestCases/strcspn.c (contents, props changed) vendor/compiler-rt/dist/test/sanitizer_common/TestCases/strpbrk.c (contents, props changed) vendor/compiler-rt/dist/test/sanitizer_common/TestCases/strspn.c (contents, props changed) vendor/compiler-rt/dist/test/sanitizer_common/TestCases/strstr.c (contents, props changed) vendor/compiler-rt/dist/test/tsan/cond_destruction.cc (contents, props changed) vendor/compiler-rt/dist/test/tsan/dl_iterate_phdr.cc (contents, props changed) vendor/compiler-rt/dist/test/tsan/fd_dup_norace2.cc (contents, props changed) vendor/compiler-rt/dist/test/tsan/fd_dup_race.cc (contents, props changed) vendor/compiler-rt/dist/test/tsan/java_heap_init.cc (contents, props changed) vendor/compiler-rt/dist/test/tsan/java_race_pc.cc (contents, props changed) vendor/compiler-rt/dist/test/tsan/java_symbolization.cc (contents, props changed) vendor/compiler-rt/dist/test/tsan/large_malloc_meta.cc (contents, props changed) vendor/compiler-rt/dist/test/tsan/mmap_stress.cc (contents, props changed) vendor/compiler-rt/dist/test/tsan/mop1.c (contents, props changed) vendor/compiler-rt/dist/test/tsan/race_top_suppression.cc (contents, props changed) vendor/compiler-rt/dist/test/tsan/race_top_suppression1.cc (contents, props changed) vendor/compiler-rt/dist/test/tsan/setuid.c (contents, props changed) vendor/compiler-rt/dist/test/tsan/setuid2.c (contents, props changed) vendor/compiler-rt/dist/test/tsan/signal_cond.cc (contents, props changed) vendor/compiler-rt/dist/test/tsan/thread_detach2.c (contents, props changed) vendor/compiler-rt/dist/test/ubsan/TestCases/Misc/Linux/ vendor/compiler-rt/dist/test/ubsan/TestCases/Misc/Linux/coverage-levels.cc (contents, props changed) vendor/compiler-rt/dist/test/ubsan/TestCases/Misc/Linux/lit.local.cfg vendor/compiler-rt/dist/test/ubsan/TestCases/Misc/Linux/ubsan_options.cc (contents, props changed) vendor/compiler-rt/dist/test/ubsan/TestCases/Misc/log-path_test.cc (contents, props changed) vendor/compiler-rt/dist/test/ubsan/TestCases/TypeCheck/vptr-virtual-base-construction.cpp (contents, props changed) Deleted: vendor/compiler-rt/dist/SDKs/README.txt vendor/compiler-rt/dist/SDKs/linux/README.txt vendor/compiler-rt/dist/SDKs/linux/usr/include/endian.h vendor/compiler-rt/dist/SDKs/linux/usr/include/fcntl.h vendor/compiler-rt/dist/SDKs/linux/usr/include/limits.h vendor/compiler-rt/dist/SDKs/linux/usr/include/stdio.h vendor/compiler-rt/dist/SDKs/linux/usr/include/stdlib.h vendor/compiler-rt/dist/SDKs/linux/usr/include/string.h vendor/compiler-rt/dist/SDKs/linux/usr/include/sys/fcntl.h vendor/compiler-rt/dist/SDKs/linux/usr/include/sys/mman.h vendor/compiler-rt/dist/SDKs/linux/usr/include/sys/stat.h vendor/compiler-rt/dist/SDKs/linux/usr/include/sys/types.h vendor/compiler-rt/dist/SDKs/linux/usr/include/unistd.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_unwind_posix_libcdep.cc vendor/compiler-rt/dist/test/asan/TestCases/Darwin/interception-in-shared-lib-test.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/coverage-and-lsan.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/coverage-caller-callee-total-count.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/coverage-caller-callee.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/coverage-direct-activation.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/coverage-direct-large.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/coverage-direct.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/coverage-disabled.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/coverage-fork-direct.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/coverage-fork.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/coverage-levels.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/coverage-maybe-open-file.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/coverage-module-unloaded.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/coverage-reset.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/coverage-sandboxing.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/coverage-tracing.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/coverage.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/interception-in-shared-lib-test.cc vendor/compiler-rt/dist/test/asan/TestCases/Posix/init-order-dlopen.cc vendor/compiler-rt/dist/test/asan/TestCases/Windows/globals_multiple_dlls.cc vendor/compiler-rt/dist/test/asan/TestCases/log_path_fork_test.cc.disabled vendor/compiler-rt/dist/test/msan/ioctl_sound.cc vendor/compiler-rt/dist/test/msan/mallinfo.cc vendor/compiler-rt/dist/test/msan/obstack.cc vendor/compiler-rt/dist/test/tsan/signal_segv_handler.cc vendor/compiler-rt/dist/test/ubsan/TestCases/Misc/coverage-levels.cc Modified: vendor/compiler-rt/dist/CMakeLists.txt vendor/compiler-rt/dist/LICENSE.TXT 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/cmake/Modules/SanitizerUtils.cmake vendor/compiler-rt/dist/cmake/config-ix.cmake vendor/compiler-rt/dist/include/sanitizer/coverage_interface.h vendor/compiler-rt/dist/include/sanitizer/dfsan_interface.h vendor/compiler-rt/dist/include/sanitizer/lsan_interface.h vendor/compiler-rt/dist/include/sanitizer/msan_interface.h vendor/compiler-rt/dist/lib/CMakeLists.txt vendor/compiler-rt/dist/lib/asan/CMakeLists.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_fake_stack.cc vendor/compiler-rt/dist/lib/asan/asan_flags.cc 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_interface_internal.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_mac.cc vendor/compiler-rt/dist/lib/asan/asan_mapping.h vendor/compiler-rt/dist/lib/asan/asan_poisoning.cc vendor/compiler-rt/dist/lib/asan/asan_poisoning.h vendor/compiler-rt/dist/lib/asan/asan_posix.cc vendor/compiler-rt/dist/lib/asan/asan_report.cc vendor/compiler-rt/dist/lib/asan/asan_report.h vendor/compiler-rt/dist/lib/asan/asan_rtl.cc 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_suppressions.cc vendor/compiler-rt/dist/lib/asan/asan_suppressions.h vendor/compiler-rt/dist/lib/asan/asan_thread.h vendor/compiler-rt/dist/lib/asan/asan_win.cc vendor/compiler-rt/dist/lib/asan/asan_win_dll_thunk.cc vendor/compiler-rt/dist/lib/asan/asan_win_dynamic_runtime_thunk.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_asm_test.cc vendor/compiler-rt/dist/lib/asan/tests/asan_str_test.cc vendor/compiler-rt/dist/lib/asan/tests/asan_test.cc vendor/compiler-rt/dist/lib/builtins/CMakeLists.txt vendor/compiler-rt/dist/lib/builtins/clear_cache.c vendor/compiler-rt/dist/lib/builtins/enable_execute_stack.c vendor/compiler-rt/dist/lib/builtins/fixdfdi.c vendor/compiler-rt/dist/lib/builtins/fixdfsi.c vendor/compiler-rt/dist/lib/builtins/fixdfti.c vendor/compiler-rt/dist/lib/builtins/fixsfdi.c vendor/compiler-rt/dist/lib/builtins/fixsfsi.c vendor/compiler-rt/dist/lib/builtins/fixsfti.c vendor/compiler-rt/dist/lib/builtins/fixunsdfdi.c vendor/compiler-rt/dist/lib/builtins/fixunsdfsi.c vendor/compiler-rt/dist/lib/builtins/fixunsdfti.c vendor/compiler-rt/dist/lib/builtins/fixunssfdi.c vendor/compiler-rt/dist/lib/builtins/fixunssfsi.c vendor/compiler-rt/dist/lib/builtins/fixunssfti.c vendor/compiler-rt/dist/lib/builtins/fixunsxfdi.c vendor/compiler-rt/dist/lib/builtins/fixunsxfsi.c vendor/compiler-rt/dist/lib/builtins/fixunsxfti.c vendor/compiler-rt/dist/lib/builtins/fixxfdi.c vendor/compiler-rt/dist/lib/builtins/fixxfti.c vendor/compiler-rt/dist/lib/builtins/fp_extend.h vendor/compiler-rt/dist/lib/builtins/fp_extend_impl.inc vendor/compiler-rt/dist/lib/builtins/fp_trunc.h vendor/compiler-rt/dist/lib/builtins/fp_trunc_impl.inc vendor/compiler-rt/dist/lib/builtins/int_endianness.h vendor/compiler-rt/dist/lib/builtins/int_lib.h vendor/compiler-rt/dist/lib/dfsan/dfsan.cc vendor/compiler-rt/dist/lib/dfsan/dfsan_custom.cc vendor/compiler-rt/dist/lib/dfsan/done_abilist.txt vendor/compiler-rt/dist/lib/dfsan/scripts/check_custom_wrappers.sh vendor/compiler-rt/dist/lib/interception/CMakeLists.txt vendor/compiler-rt/dist/lib/interception/interception.h vendor/compiler-rt/dist/lib/interception/interception_win.cc vendor/compiler-rt/dist/lib/lsan/CMakeLists.txt vendor/compiler-rt/dist/lib/lsan/lsan_common.cc vendor/compiler-rt/dist/lib/lsan/lsan_common.h vendor/compiler-rt/dist/lib/lsan/lsan_common_linux.cc vendor/compiler-rt/dist/lib/lsan/lsan_interceptors.cc vendor/compiler-rt/dist/lib/lsan/lsan_thread.h 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.syms.extra vendor/compiler-rt/dist/lib/msan/msan_allocator.cc vendor/compiler-rt/dist/lib/msan/msan_interceptors.cc vendor/compiler-rt/dist/lib/msan/msan_interface_internal.h 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_origin.h vendor/compiler-rt/dist/lib/msan/msan_poisoning.cc vendor/compiler-rt/dist/lib/msan/msan_report.cc vendor/compiler-rt/dist/lib/msan/msan_thread.cc vendor/compiler-rt/dist/lib/msan/tests/CMakeLists.txt vendor/compiler-rt/dist/lib/msan/tests/msan_test.cc vendor/compiler-rt/dist/lib/profile/CMakeLists.txt vendor/compiler-rt/dist/lib/profile/GCDAProfiling.c vendor/compiler-rt/dist/lib/profile/InstrProfiling.h vendor/compiler-rt/dist/lib/profile/InstrProfilingFile.c vendor/compiler-rt/dist/lib/sanitizer_common/CMakeLists.txt vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_allocator.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_atomic.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_common_interceptors.inc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common_libcdep.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_common_syscalls.inc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_coverage_libcdep.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_coverage_mapping_libcdep.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_deadlock_detector1.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_flags.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_flags.inc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_internal_defs.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_libc.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_libignore.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_linux.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_linux.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_linux_libcdep.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_mac.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_mac.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_platform.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_platform_interceptors.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_platform_limits_posix.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_platform_limits_posix.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_posix.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_posix_libcdep.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_printf.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_procmaps_common.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_procmaps_mac.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_stacktrace.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_stacktrace_libcdep.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_stacktrace_printer.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_stacktrace_printer.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_stoptheworld.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_suppressions.cc 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_symbolizer_libbacktrace.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_symbolizer_libbacktrace.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_symbolizer_libcdep.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_symbolizer_win.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_tls_get_addr.cc vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_tls_get_addr.h vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_win.cc vendor/compiler-rt/dist/lib/sanitizer_common/scripts/check_lint.sh vendor/compiler-rt/dist/lib/sanitizer_common/scripts/cpplint.py vendor/compiler-rt/dist/lib/sanitizer_common/scripts/gen_dynamic_list.py vendor/compiler-rt/dist/lib/sanitizer_common/scripts/litlint.py vendor/compiler-rt/dist/lib/sanitizer_common/scripts/sancov.py vendor/compiler-rt/dist/lib/sanitizer_common/tests/CMakeLists.txt vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_libc_test.cc vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_posix_test.cc vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_procmaps_test.cc vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_stacktrace_printer_test.cc vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_stacktrace_test.cc vendor/compiler-rt/dist/lib/sanitizer_common/tests/sanitizer_stoptheworld_test.cc vendor/compiler-rt/dist/lib/tsan/CMakeLists.txt vendor/compiler-rt/dist/lib/tsan/Makefile.old vendor/compiler-rt/dist/lib/tsan/dd/CMakeLists.txt vendor/compiler-rt/dist/lib/tsan/dd/dd_rtl.h vendor/compiler-rt/dist/lib/tsan/go/buildgo.sh vendor/compiler-rt/dist/lib/tsan/rtl/Makefile.old vendor/compiler-rt/dist/lib/tsan/rtl/tsan.syms.extra vendor/compiler-rt/dist/lib/tsan/rtl/tsan_defs.h 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_flags.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_interceptors.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_interface.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_interface.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_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_rtl.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_rtl.h vendor/compiler-rt/dist/lib/tsan/rtl/tsan_rtl_mutex.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_rtl_thread.cc 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_sync.cc vendor/compiler-rt/dist/lib/tsan/rtl/tsan_sync.h vendor/compiler-rt/dist/lib/tsan/rtl/tsan_update_shadow_word_inl.h vendor/compiler-rt/dist/lib/tsan/tests/CMakeLists.txt vendor/compiler-rt/dist/lib/ubsan/CMakeLists.txt vendor/compiler-rt/dist/lib/ubsan/Makefile.mk 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_flags.cc vendor/compiler-rt/dist/lib/ubsan/ubsan_flags.h vendor/compiler-rt/dist/lib/ubsan/ubsan_handlers.cc 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_init.cc vendor/compiler-rt/dist/lib/ubsan/ubsan_init.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_darwin.mk vendor/compiler-rt/dist/make/platform/clang_linux.mk vendor/compiler-rt/dist/make/platform/clang_macho_embedded.mk vendor/compiler-rt/dist/make/platform/darwin_bni.mk vendor/compiler-rt/dist/test/CMakeLists.txt vendor/compiler-rt/dist/test/asan/CMakeLists.txt vendor/compiler-rt/dist/test/asan/TestCases/Android/coverage-android.cc vendor/compiler-rt/dist/test/asan/TestCases/Darwin/dyld_insert_libraries_reexec.cc vendor/compiler-rt/dist/test/asan/TestCases/Darwin/interface_symbols_darwin.c vendor/compiler-rt/dist/test/asan/TestCases/Darwin/reexec-insert-libraries-env.cc vendor/compiler-rt/dist/test/asan/TestCases/Darwin/suppressions-darwin.cc vendor/compiler-rt/dist/test/asan/TestCases/Darwin/unset-insert-libraries-on-exec.cc vendor/compiler-rt/dist/test/asan/TestCases/Helpers/init-order-pthread-create-extra.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/asan_prelink_test.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/asan_preload_test-1.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/asan_preload_test-2.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/asan_rt_confict_test-1.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/clang_gcc_abi.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/initialization-bug-any-order.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/interface_symbols_linux.c vendor/compiler-rt/dist/test/asan/TestCases/Linux/kernel-area.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/leak.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/malloc-in-qsort.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/malloc_delete_mismatch.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/nohugepage_test.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/odr-violation.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/overflow-in-qsort.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/ptrace.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/quarantine_size_mb.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/sized_delete_test.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/stack-overflow-sigbus.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/stack-trace-dlclose.cc vendor/compiler-rt/dist/test/asan/TestCases/Linux/stress_dtls.c vendor/compiler-rt/dist/test/asan/TestCases/Posix/allow_user_segv.cc vendor/compiler-rt/dist/test/asan/TestCases/Posix/asan-symbolize-sanity-test.cc vendor/compiler-rt/dist/test/asan/TestCases/Posix/ioctl.cc vendor/compiler-rt/dist/test/asan/TestCases/Posix/large_allocator_unpoisons_on_free.cc vendor/compiler-rt/dist/test/asan/TestCases/Posix/new_array_cookie_test.cc vendor/compiler-rt/dist/test/asan/TestCases/Posix/new_array_cookie_uaf_test.cc vendor/compiler-rt/dist/test/asan/TestCases/Posix/start-deactivated.cc vendor/compiler-rt/dist/test/asan/TestCases/Posix/tsd_dtor_leak.cc vendor/compiler-rt/dist/test/asan/TestCases/Windows/dll_noreturn.cc vendor/compiler-rt/dist/test/asan/TestCases/Windows/dll_thread_stack_array_left_oob.cc vendor/compiler-rt/dist/test/asan/TestCases/Windows/stack_array_left_oob.cc vendor/compiler-rt/dist/test/asan/TestCases/Windows/thread_stack_array_left_oob.cc vendor/compiler-rt/dist/test/asan/TestCases/alloca_instruments_all_paddings.cc vendor/compiler-rt/dist/test/asan/TestCases/allocator_returns_null.cc vendor/compiler-rt/dist/test/asan/TestCases/asan_and_llvm_coverage_test.cc vendor/compiler-rt/dist/test/asan/TestCases/asan_options-help.cc vendor/compiler-rt/dist/test/asan/TestCases/atexit_stats.cc vendor/compiler-rt/dist/test/asan/TestCases/contiguous_container_crash.cc vendor/compiler-rt/dist/test/asan/TestCases/debug_mapping.cc vendor/compiler-rt/dist/test/asan/TestCases/debug_ppc64_mapping.cc vendor/compiler-rt/dist/test/asan/TestCases/debug_stacks.cc vendor/compiler-rt/dist/test/asan/TestCases/deep_call_stack.cc vendor/compiler-rt/dist/test/asan/TestCases/deep_stack_uaf.cc vendor/compiler-rt/dist/test/asan/TestCases/default_options.cc vendor/compiler-rt/dist/test/asan/TestCases/double-free.cc vendor/compiler-rt/dist/test/asan/TestCases/dump_instruction_bytes.cc vendor/compiler-rt/dist/test/asan/TestCases/free_hook_realloc.cc vendor/compiler-rt/dist/test/asan/TestCases/gc-test.cc vendor/compiler-rt/dist/test/asan/TestCases/heap-overflow-large.cc vendor/compiler-rt/dist/test/asan/TestCases/heap-overflow.cc vendor/compiler-rt/dist/test/asan/TestCases/heavy_uar_test.cc vendor/compiler-rt/dist/test/asan/TestCases/init-order-atexit.cc vendor/compiler-rt/dist/test/asan/TestCases/init-order-pthread-create.cc vendor/compiler-rt/dist/test/asan/TestCases/initialization-blacklist.cc vendor/compiler-rt/dist/test/asan/TestCases/initialization-bug.cc vendor/compiler-rt/dist/test/asan/TestCases/initialization-constexpr.cc vendor/compiler-rt/dist/test/asan/TestCases/initialization-nobug.cc vendor/compiler-rt/dist/test/asan/TestCases/interface_test.cc vendor/compiler-rt/dist/test/asan/TestCases/invalid-free.cc vendor/compiler-rt/dist/test/asan/TestCases/log-path_test.cc vendor/compiler-rt/dist/test/asan/TestCases/malloc_context_size.cc vendor/compiler-rt/dist/test/asan/TestCases/malloc_fill.cc vendor/compiler-rt/dist/test/asan/TestCases/max_redzone.cc vendor/compiler-rt/dist/test/asan/TestCases/memcmp_strict_test.cc vendor/compiler-rt/dist/test/asan/TestCases/mmap_limit_mb.cc vendor/compiler-rt/dist/test/asan/TestCases/no_asan_gen_globals.c vendor/compiler-rt/dist/test/asan/TestCases/on_error_callback.cc vendor/compiler-rt/dist/test/asan/TestCases/poison_partial.cc vendor/compiler-rt/dist/test/asan/TestCases/print_summary.cc vendor/compiler-rt/dist/test/asan/TestCases/printf-1.c vendor/compiler-rt/dist/test/asan/TestCases/printf-2.c vendor/compiler-rt/dist/test/asan/TestCases/printf-3.c vendor/compiler-rt/dist/test/asan/TestCases/printf-4.c vendor/compiler-rt/dist/test/asan/TestCases/printf-5.c vendor/compiler-rt/dist/test/asan/TestCases/sleep_before_dying.c vendor/compiler-rt/dist/test/asan/TestCases/stack-overflow.cc vendor/compiler-rt/dist/test/asan/TestCases/stack-use-after-return.cc vendor/compiler-rt/dist/test/asan/TestCases/strip_path_prefix.c vendor/compiler-rt/dist/test/asan/TestCases/suppressions-function.cc vendor/compiler-rt/dist/test/asan/TestCases/suppressions-interceptor.cc vendor/compiler-rt/dist/test/asan/TestCases/suppressions-library.cc vendor/compiler-rt/dist/test/asan/TestCases/uar_and_exceptions.cc vendor/compiler-rt/dist/test/asan/TestCases/use-after-poison.cc vendor/compiler-rt/dist/test/asan/TestCases/use-after-scope.cc vendor/compiler-rt/dist/test/asan/lit.cfg vendor/compiler-rt/dist/test/builtins/Unit/absvdi2_test.c vendor/compiler-rt/dist/test/builtins/Unit/absvsi2_test.c vendor/compiler-rt/dist/test/builtins/Unit/absvti2_test.c vendor/compiler-rt/dist/test/builtins/Unit/adddf3vfp_test.c vendor/compiler-rt/dist/test/builtins/Unit/addsf3vfp_test.c vendor/compiler-rt/dist/test/builtins/Unit/addtf3_test.c vendor/compiler-rt/dist/test/builtins/Unit/addvdi3_test.c vendor/compiler-rt/dist/test/builtins/Unit/addvsi3_test.c vendor/compiler-rt/dist/test/builtins/Unit/addvti3_test.c vendor/compiler-rt/dist/test/builtins/Unit/ashldi3_test.c vendor/compiler-rt/dist/test/builtins/Unit/ashlti3_test.c vendor/compiler-rt/dist/test/builtins/Unit/ashrdi3_test.c vendor/compiler-rt/dist/test/builtins/Unit/ashrti3_test.c vendor/compiler-rt/dist/test/builtins/Unit/clzdi2_test.c vendor/compiler-rt/dist/test/builtins/Unit/clzsi2_test.c vendor/compiler-rt/dist/test/builtins/Unit/clzti2_test.c vendor/compiler-rt/dist/test/builtins/Unit/cmpdi2_test.c vendor/compiler-rt/dist/test/builtins/Unit/cmpti2_test.c vendor/compiler-rt/dist/test/builtins/Unit/ctzdi2_test.c vendor/compiler-rt/dist/test/builtins/Unit/ctzsi2_test.c vendor/compiler-rt/dist/test/builtins/Unit/ctzti2_test.c vendor/compiler-rt/dist/test/builtins/Unit/divdc3_test.c vendor/compiler-rt/dist/test/builtins/Unit/divdf3vfp_test.c vendor/compiler-rt/dist/test/builtins/Unit/divdi3_test.c vendor/compiler-rt/dist/test/builtins/Unit/divmodsi4_test.c vendor/compiler-rt/dist/test/builtins/Unit/divsc3_test.c vendor/compiler-rt/dist/test/builtins/Unit/divsf3vfp_test.c vendor/compiler-rt/dist/test/builtins/Unit/divsi3_test.c vendor/compiler-rt/dist/test/builtins/Unit/divtc3_test.c vendor/compiler-rt/dist/test/builtins/Unit/divtf3_test.c vendor/compiler-rt/dist/test/builtins/Unit/divti3_test.c vendor/compiler-rt/dist/test/builtins/Unit/divxc3_test.c vendor/compiler-rt/dist/test/builtins/Unit/extebdsfdf2vfp_test.c vendor/compiler-rt/dist/test/builtins/Unit/extenddftf2_test.c vendor/compiler-rt/dist/test/builtins/Unit/extendsftf2_test.c vendor/compiler-rt/dist/test/builtins/Unit/ffsdi2_test.c vendor/compiler-rt/dist/test/builtins/Unit/ffsti2_test.c vendor/compiler-rt/dist/test/builtins/Unit/fixdfdi_test.c vendor/compiler-rt/dist/test/builtins/Unit/fixdfti_test.c vendor/compiler-rt/dist/test/builtins/Unit/fixsfdi_test.c vendor/compiler-rt/dist/test/builtins/Unit/fixsfti_test.c vendor/compiler-rt/dist/test/builtins/Unit/fixunsdfdi_test.c vendor/compiler-rt/dist/test/builtins/Unit/fixunsdfsi_test.c vendor/compiler-rt/dist/test/builtins/Unit/fixunsdfsivfp_test.c vendor/compiler-rt/dist/test/builtins/Unit/fixunsdfti_test.c vendor/compiler-rt/dist/test/builtins/Unit/fixunssfdi_test.c vendor/compiler-rt/dist/test/builtins/Unit/fixunssfsi_test.c vendor/compiler-rt/dist/test/builtins/Unit/fixunssfti_test.c vendor/compiler-rt/dist/test/builtins/Unit/fixunstfdi_test.c vendor/compiler-rt/dist/test/builtins/Unit/fixunsxfdi_test.c vendor/compiler-rt/dist/test/builtins/Unit/fixunsxfsi_test.c vendor/compiler-rt/dist/test/builtins/Unit/fixunsxfti_test.c vendor/compiler-rt/dist/test/builtins/Unit/fixxfdi_test.c vendor/compiler-rt/dist/test/builtins/Unit/fixxfti_test.c vendor/compiler-rt/dist/test/builtins/Unit/floatdidf_test.c vendor/compiler-rt/dist/test/builtins/Unit/floatdisf_test.c vendor/compiler-rt/dist/test/builtins/Unit/floatdixf_test.c vendor/compiler-rt/dist/test/builtins/Unit/floatsidfvfp_test.c vendor/compiler-rt/dist/test/builtins/Unit/floatsisfvfp_test.c vendor/compiler-rt/dist/test/builtins/Unit/floatsitf_test.c vendor/compiler-rt/dist/test/builtins/Unit/floattidf_test.c vendor/compiler-rt/dist/test/builtins/Unit/floattisf_test.c vendor/compiler-rt/dist/test/builtins/Unit/floattixf_test.c vendor/compiler-rt/dist/test/builtins/Unit/floatundidf_test.c vendor/compiler-rt/dist/test/builtins/Unit/floatundisf_test.c vendor/compiler-rt/dist/test/builtins/Unit/floatundixf_test.c vendor/compiler-rt/dist/test/builtins/Unit/floatunsitf_test.c vendor/compiler-rt/dist/test/builtins/Unit/floatunssidfvfp_test.c vendor/compiler-rt/dist/test/builtins/Unit/floatunssisfvfp_test.c vendor/compiler-rt/dist/test/builtins/Unit/floatuntidf_test.c vendor/compiler-rt/dist/test/builtins/Unit/floatuntisf_test.c vendor/compiler-rt/dist/test/builtins/Unit/floatuntixf_test.c vendor/compiler-rt/dist/test/builtins/Unit/fp_test.h vendor/compiler-rt/dist/test/builtins/Unit/lshrdi3_test.c vendor/compiler-rt/dist/test/builtins/Unit/lshrti3_test.c vendor/compiler-rt/dist/test/builtins/Unit/moddi3_test.c vendor/compiler-rt/dist/test/builtins/Unit/modsi3_test.c vendor/compiler-rt/dist/test/builtins/Unit/modti3_test.c vendor/compiler-rt/dist/test/builtins/Unit/muldc3_test.c vendor/compiler-rt/dist/test/builtins/Unit/muldf3vfp_test.c vendor/compiler-rt/dist/test/builtins/Unit/muldi3_test.c vendor/compiler-rt/dist/test/builtins/Unit/mulodi4_test.c vendor/compiler-rt/dist/test/builtins/Unit/mulosi4_test.c vendor/compiler-rt/dist/test/builtins/Unit/muloti4_test.c vendor/compiler-rt/dist/test/builtins/Unit/mulsc3_test.c vendor/compiler-rt/dist/test/builtins/Unit/mulsf3vfp_test.c vendor/compiler-rt/dist/test/builtins/Unit/multc3_test.c vendor/compiler-rt/dist/test/builtins/Unit/multf3_test.c vendor/compiler-rt/dist/test/builtins/Unit/multi3_test.c vendor/compiler-rt/dist/test/builtins/Unit/mulvdi3_test.c vendor/compiler-rt/dist/test/builtins/Unit/mulvsi3_test.c vendor/compiler-rt/dist/test/builtins/Unit/mulvti3_test.c vendor/compiler-rt/dist/test/builtins/Unit/mulxc3_test.c vendor/compiler-rt/dist/test/builtins/Unit/negdf2vfp_test.c vendor/compiler-rt/dist/test/builtins/Unit/negdi2_test.c vendor/compiler-rt/dist/test/builtins/Unit/negsf2vfp_test.c vendor/compiler-rt/dist/test/builtins/Unit/negti2_test.c vendor/compiler-rt/dist/test/builtins/Unit/negvdi2_test.c vendor/compiler-rt/dist/test/builtins/Unit/negvsi2_test.c vendor/compiler-rt/dist/test/builtins/Unit/negvti2_test.c vendor/compiler-rt/dist/test/builtins/Unit/paritydi2_test.c vendor/compiler-rt/dist/test/builtins/Unit/paritysi2_test.c vendor/compiler-rt/dist/test/builtins/Unit/parityti2_test.c vendor/compiler-rt/dist/test/builtins/Unit/popcountdi2_test.c vendor/compiler-rt/dist/test/builtins/Unit/popcountsi2_test.c vendor/compiler-rt/dist/test/builtins/Unit/popcountti2_test.c vendor/compiler-rt/dist/test/builtins/Unit/powidf2_test.c vendor/compiler-rt/dist/test/builtins/Unit/powisf2_test.c vendor/compiler-rt/dist/test/builtins/Unit/powitf2_test.c vendor/compiler-rt/dist/test/builtins/Unit/powixf2_test.c vendor/compiler-rt/dist/test/builtins/Unit/ppc/floatditf_test.c vendor/compiler-rt/dist/test/builtins/Unit/ppc/floatunditf_test.c vendor/compiler-rt/dist/test/builtins/Unit/subdf3vfp_test.c vendor/compiler-rt/dist/test/builtins/Unit/subsf3vfp_test.c vendor/compiler-rt/dist/test/builtins/Unit/subtf3_test.c vendor/compiler-rt/dist/test/builtins/Unit/subvdi3_test.c vendor/compiler-rt/dist/test/builtins/Unit/subvsi3_test.c vendor/compiler-rt/dist/test/builtins/Unit/subvti3_test.c vendor/compiler-rt/dist/test/builtins/Unit/truncdfsf2vfp_test.c vendor/compiler-rt/dist/test/builtins/Unit/trunctfdf2_test.c vendor/compiler-rt/dist/test/builtins/Unit/trunctfsf2_test.c vendor/compiler-rt/dist/test/builtins/Unit/ucmpdi2_test.c vendor/compiler-rt/dist/test/builtins/Unit/ucmpti2_test.c vendor/compiler-rt/dist/test/builtins/Unit/udivdi3_test.c vendor/compiler-rt/dist/test/builtins/Unit/udivmoddi4_test.c vendor/compiler-rt/dist/test/builtins/Unit/udivmodsi4_test.c vendor/compiler-rt/dist/test/builtins/Unit/udivmodti4_test.c vendor/compiler-rt/dist/test/builtins/Unit/udivsi3_test.c vendor/compiler-rt/dist/test/builtins/Unit/udivti3_test.c vendor/compiler-rt/dist/test/builtins/Unit/umoddi3_test.c vendor/compiler-rt/dist/test/builtins/Unit/umodsi3_test.c vendor/compiler-rt/dist/test/builtins/Unit/umodti3_test.c vendor/compiler-rt/dist/test/cfi/CMakeLists.txt vendor/compiler-rt/dist/test/cfi/anon-namespace.cpp vendor/compiler-rt/dist/test/cfi/lit.cfg vendor/compiler-rt/dist/test/cfi/multiple-inheritance.cpp vendor/compiler-rt/dist/test/cfi/overwrite.cpp vendor/compiler-rt/dist/test/cfi/simple-fail.cpp vendor/compiler-rt/dist/test/cfi/simple-pass.cpp vendor/compiler-rt/dist/test/cfi/vdtor.cpp vendor/compiler-rt/dist/test/dfsan/basic.c vendor/compiler-rt/dist/test/dfsan/custom.cc vendor/compiler-rt/dist/test/dfsan/dump_labels.c vendor/compiler-rt/dist/test/dfsan/flags.c vendor/compiler-rt/dist/test/dfsan/fncall.c vendor/compiler-rt/dist/test/dfsan/label_count.c vendor/compiler-rt/dist/test/dfsan/lit.cfg vendor/compiler-rt/dist/test/dfsan/propagate.c vendor/compiler-rt/dist/test/dfsan/vararg.c vendor/compiler-rt/dist/test/dfsan/write_callback.c vendor/compiler-rt/dist/test/lit.common.cfg vendor/compiler-rt/dist/test/lit.common.configured.in vendor/compiler-rt/dist/test/lsan/CMakeLists.txt vendor/compiler-rt/dist/test/msan/Linux/getresid.cc vendor/compiler-rt/dist/test/msan/Linux/glob.cc vendor/compiler-rt/dist/test/msan/Linux/glob_altdirfunc.cc vendor/compiler-rt/dist/test/msan/Linux/glob_nomatch.cc vendor/compiler-rt/dist/test/msan/Linux/sunrpc.cc vendor/compiler-rt/dist/test/msan/Linux/sunrpc_bytes.cc vendor/compiler-rt/dist/test/msan/Linux/sunrpc_string.cc vendor/compiler-rt/dist/test/msan/Linux/syscalls.cc vendor/compiler-rt/dist/test/msan/Linux/tcgetattr.cc vendor/compiler-rt/dist/test/msan/Linux/xattr.cc vendor/compiler-rt/dist/test/msan/backtrace.cc vendor/compiler-rt/dist/test/msan/c-strdup.c vendor/compiler-rt/dist/test/msan/chained_origin.cc vendor/compiler-rt/dist/test/msan/chained_origin_empty_stack.cc vendor/compiler-rt/dist/test/msan/chained_origin_limits.cc vendor/compiler-rt/dist/test/msan/chained_origin_memcpy.cc vendor/compiler-rt/dist/test/msan/chained_origin_with_signals.cc vendor/compiler-rt/dist/test/msan/check_mem_is_initialized.cc vendor/compiler-rt/dist/test/msan/coverage-levels.cc vendor/compiler-rt/dist/test/msan/cxa_atexit.cc vendor/compiler-rt/dist/test/msan/death-callback.cc vendor/compiler-rt/dist/test/msan/dlerror.cc vendor/compiler-rt/dist/test/msan/dso-origin.cc vendor/compiler-rt/dist/test/msan/dtls_test.c vendor/compiler-rt/dist/test/msan/errno.cc vendor/compiler-rt/dist/test/msan/fork.cc vendor/compiler-rt/dist/test/msan/ftime.cc vendor/compiler-rt/dist/test/msan/getaddrinfo-positive.cc vendor/compiler-rt/dist/test/msan/getaddrinfo.cc vendor/compiler-rt/dist/test/msan/getc_unlocked.c vendor/compiler-rt/dist/test/msan/getline.cc vendor/compiler-rt/dist/test/msan/heap-origin.cc vendor/compiler-rt/dist/test/msan/iconv.cc vendor/compiler-rt/dist/test/msan/if_indextoname.cc vendor/compiler-rt/dist/test/msan/ifaddrs.cc vendor/compiler-rt/dist/test/msan/initgroups.cc vendor/compiler-rt/dist/test/msan/insertvalue_origin.cc vendor/compiler-rt/dist/test/msan/ioctl.cc vendor/compiler-rt/dist/test/msan/ioctl_custom.cc vendor/compiler-rt/dist/test/msan/keep-going-dso.cc vendor/compiler-rt/dist/test/msan/keep-going.cc vendor/compiler-rt/dist/test/msan/lit.cfg vendor/compiler-rt/dist/test/msan/mktime.cc vendor/compiler-rt/dist/test/msan/mmap_below_shadow.cc vendor/compiler-rt/dist/test/msan/msan_check_mem_is_initialized.cc vendor/compiler-rt/dist/test/msan/msan_dump_shadow.cc vendor/compiler-rt/dist/test/msan/msan_print_shadow.cc vendor/compiler-rt/dist/test/msan/msan_print_shadow2.cc vendor/compiler-rt/dist/test/msan/msan_print_shadow3.cc vendor/compiler-rt/dist/test/msan/mul_by_const.cc vendor/compiler-rt/dist/test/msan/no_sanitize_memory.cc vendor/compiler-rt/dist/test/msan/no_sanitize_memory_prop.cc vendor/compiler-rt/dist/test/msan/origin-store-long.cc vendor/compiler-rt/dist/test/msan/param_tls_limit.cc vendor/compiler-rt/dist/test/msan/print_stats.cc vendor/compiler-rt/dist/test/msan/pthread_getattr_np_deadlock.cc vendor/compiler-rt/dist/test/msan/rand_r.cc vendor/compiler-rt/dist/test/msan/readdir64.cc vendor/compiler-rt/dist/test/msan/realloc-large-origin.cc vendor/compiler-rt/dist/test/msan/realloc-origin.cc vendor/compiler-rt/dist/test/msan/report-demangling.cc vendor/compiler-rt/dist/test/msan/scandir.cc vendor/compiler-rt/dist/test/msan/scandir_null.cc vendor/compiler-rt/dist/test/msan/select.cc vendor/compiler-rt/dist/test/msan/setlocale.cc vendor/compiler-rt/dist/test/msan/stack-origin.cc vendor/compiler-rt/dist/test/msan/stack-origin2.cc vendor/compiler-rt/dist/test/msan/strlen_of_shadow.cc vendor/compiler-rt/dist/test/msan/strxfrm.cc vendor/compiler-rt/dist/test/msan/sync_lock_set_and_test.cc vendor/compiler-rt/dist/test/msan/textdomain.cc vendor/compiler-rt/dist/test/msan/times.cc vendor/compiler-rt/dist/test/msan/tls_reuse.cc vendor/compiler-rt/dist/test/msan/tzset.cc vendor/compiler-rt/dist/test/msan/unaligned_read_origin.cc vendor/compiler-rt/dist/test/msan/unpoison_string.cc vendor/compiler-rt/dist/test/msan/use-after-free.cc vendor/compiler-rt/dist/test/msan/vector_cvt.cc vendor/compiler-rt/dist/test/msan/vector_select.cc vendor/compiler-rt/dist/test/profile/Inputs/instrprof-dynamic-a.cpp vendor/compiler-rt/dist/test/profile/Inputs/instrprof-dynamic-b.cpp vendor/compiler-rt/dist/test/profile/Inputs/instrprof-dynamic-header.h vendor/compiler-rt/dist/test/profile/Inputs/instrprof-dynamic-main.cpp vendor/compiler-rt/dist/test/profile/lit.cfg vendor/compiler-rt/dist/test/sanitizer_common/CMakeLists.txt vendor/compiler-rt/dist/test/sanitizer_common/TestCases/Linux/getpwnam_r_invalid_user.cc vendor/compiler-rt/dist/test/sanitizer_common/TestCases/Linux/open_memstream.cc vendor/compiler-rt/dist/test/sanitizer_common/lit.common.cfg vendor/compiler-rt/dist/test/sanitizer_common/lit.site.cfg.in vendor/compiler-rt/dist/test/tsan/CMakeLists.txt vendor/compiler-rt/dist/test/tsan/cond_cancel.c vendor/compiler-rt/dist/test/tsan/cond_race.cc vendor/compiler-rt/dist/test/tsan/deadlock_detector_stress_test.cc vendor/compiler-rt/dist/test/tsan/heap_race.cc vendor/compiler-rt/dist/test/tsan/ignore_free.cc vendor/compiler-rt/dist/test/tsan/ignore_malloc.cc vendor/compiler-rt/dist/test/tsan/java.h vendor/compiler-rt/dist/test/tsan/java_race.cc vendor/compiler-rt/dist/test/tsan/longjmp.cc vendor/compiler-rt/dist/test/tsan/longjmp2.cc vendor/compiler-rt/dist/test/tsan/longjmp3.cc vendor/compiler-rt/dist/test/tsan/longjmp4.cc vendor/compiler-rt/dist/test/tsan/malloc_stack.cc vendor/compiler-rt/dist/test/tsan/mmap_large.cc vendor/compiler-rt/dist/test/tsan/signal_longjmp.cc vendor/compiler-rt/dist/test/tsan/signal_recursive.cc vendor/compiler-rt/dist/test/tsan/test.h vendor/compiler-rt/dist/test/ubsan/CMakeLists.txt vendor/compiler-rt/dist/test/ubsan/TestCases/Float/cast-overflow.cpp vendor/compiler-rt/dist/test/ubsan/TestCases/Integer/add-overflow.cpp vendor/compiler-rt/dist/test/ubsan/TestCases/Integer/div-zero.cpp vendor/compiler-rt/dist/test/ubsan/TestCases/Integer/incdec-overflow.cpp vendor/compiler-rt/dist/test/ubsan/TestCases/Integer/negate-overflow.cpp vendor/compiler-rt/dist/test/ubsan/TestCases/Integer/shift.cpp vendor/compiler-rt/dist/test/ubsan/TestCases/Integer/sub-overflow.cpp vendor/compiler-rt/dist/test/ubsan/TestCases/Integer/summary.cpp vendor/compiler-rt/dist/test/ubsan/TestCases/Integer/uadd-overflow.cpp vendor/compiler-rt/dist/test/ubsan/TestCases/Integer/uincdec-overflow.cpp vendor/compiler-rt/dist/test/ubsan/TestCases/Integer/usub-overflow.cpp vendor/compiler-rt/dist/test/ubsan/TestCases/Misc/bounds.cpp vendor/compiler-rt/dist/test/ubsan/TestCases/Misc/deduplication.cpp vendor/compiler-rt/dist/test/ubsan/TestCases/Misc/enum.cpp vendor/compiler-rt/dist/test/ubsan/TestCases/Misc/missing_return.cpp vendor/compiler-rt/dist/test/ubsan/TestCases/TypeCheck/Function/function.cpp vendor/compiler-rt/dist/test/ubsan/TestCases/TypeCheck/misaligned.cpp vendor/compiler-rt/dist/test/ubsan/TestCases/TypeCheck/null.cpp vendor/compiler-rt/dist/test/ubsan/TestCases/TypeCheck/vptr-virtual-base.cpp vendor/compiler-rt/dist/test/ubsan/TestCases/TypeCheck/vptr.cpp vendor/compiler-rt/dist/test/ubsan/lit.common.cfg vendor/compiler-rt/dist/test/ubsan/lit.site.cfg.in vendor/compiler-rt/dist/www/index.html vendor/compiler-rt/dist/www/menu.html.incl Modified: vendor/compiler-rt/dist/CMakeLists.txt ============================================================================== --- vendor/compiler-rt/dist/CMakeLists.txt Sun Sep 6 18:37:51 2015 (r287515) +++ vendor/compiler-rt/dist/CMakeLists.txt Sun Sep 6 18:41:23 2015 (r287516) @@ -139,6 +139,13 @@ string(REPLACE "-" ";" TARGET_TRIPLE_LIS list(GET TARGET_TRIPLE_LIST 0 COMPILER_RT_TEST_TARGET_ARCH) list(GET TARGET_TRIPLE_LIST 1 COMPILER_RT_TEST_TARGET_OS) list(GET TARGET_TRIPLE_LIST 2 COMPILER_RT_TEST_TARGET_ABI) +# Determine if test target triple is specified explicitly, and doesn't match the +# default. +if(NOT COMPILER_RT_TEST_TARGET_TRIPLE STREQUAL TARGET_TRIPLE) + set(COMPILER_RT_HAS_EXPLICIT_TEST_TARGET_TRIPLE TRUE) +else() + set(COMPILER_RT_HAS_EXPLICIT_TEST_TARGET_TRIPLE FALSE) +endif() if ("${COMPILER_RT_TEST_TARGET_ABI}" STREQUAL "androideabi") set(ANDROID 1) @@ -160,13 +167,11 @@ include(CompilerRTUtils) set(COMPILER_RT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) set(COMPILER_RT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}) -# Setup custom SDK sysroots. -set(COMPILER_RT_LINUX_SDK_SYSROOT ${COMPILER_RT_SOURCE_DIR}/SDKs/linux) # We support running instrumented tests when we're not cross compiling # and target a UNIX-like system or Windows. # We can run tests on Android even when we are cross-compiling. -if(("${CMAKE_HOST_SYSTEM}" STREQUAL "${CMAKE_SYSTEM}" AND (UNIX OR MSVC)) OR ANDROID +if(("${CMAKE_HOST_SYSTEM}" STREQUAL "${CMAKE_SYSTEM}" AND (UNIX OR WIN32)) OR ANDROID OR COMPILER_RT_EMULATOR) option(COMPILER_RT_CAN_EXECUTE_TESTS "Can we execute instrumented tests" ON) else() @@ -209,22 +214,22 @@ append_list_if(COMPILER_RT_HAS_FNO_EXCEP append_list_if(COMPILER_RT_HAS_FOMIT_FRAME_POINTER_FLAG -fomit-frame-pointer SANITIZER_COMMON_CFLAGS) append_list_if(COMPILER_RT_HAS_FUNWIND_TABLES_FLAG -funwind-tables SANITIZER_COMMON_CFLAGS) append_list_if(COMPILER_RT_HAS_FNO_STACK_PROTECTOR_FLAG -fno-stack-protector SANITIZER_COMMON_CFLAGS) +append_list_if(COMPILER_RT_HAS_FNO_SANITIZE_SAFE_STACK_FLAG -fno-sanitize=safe-stack SANITIZER_COMMON_CFLAGS) append_list_if(COMPILER_RT_HAS_FVISIBILITY_HIDDEN_FLAG -fvisibility=hidden SANITIZER_COMMON_CFLAGS) append_list_if(COMPILER_RT_HAS_FNO_FUNCTION_SECTIONS_FLAG -fno-function-sections SANITIZER_COMMON_CFLAGS) append_list_if(COMPILER_RT_HAS_FNO_LTO_FLAG -fno-lto SANITIZER_COMMON_CFLAGS) if(MSVC) - # Replace the /MD[d] flags with /MT. + # Replace the /M[DT][d] flags with /MT, and strip any definitions of _DEBUG, + # which cause definition mismatches at link time. # FIXME: In fact, sanitizers should support both /MT and /MD, see PR20214. if(COMPILER_RT_HAS_MT_FLAG) foreach(flag_var CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO) - if(${flag_var} MATCHES "/MD") - string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}") - elseif(${flag_var} MATCHES "/MDd") - string(REGEX REPLACE "/MDd" "/MT" ${flag_var} "${${flag_var}}") - endif() + string(REGEX REPLACE "/M[DT]d" "/MT" ${flag_var} "${${flag_var}}") + string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}") + string(REGEX REPLACE "/D_DEBUG" "" ${flag_var} "${${flag_var}}") endforeach() endif() append_list_if(COMPILER_RT_HAS_Oy_FLAG /Oy- SANITIZER_COMMON_CFLAGS) @@ -240,12 +245,13 @@ if(NOT COMPILER_RT_DEBUG AND NOT MSVC) endif() # Determine if we should restrict stack frame sizes. -# Stack frames on PowerPC and in debug biuld can be much larger than +# Stack frames on PowerPC and Mips and in debug biuld can be much larger than # anticipated. # FIXME: Fix all sanitizers and add -Wframe-larger-than to # SANITIZER_COMMON_FLAGS if(COMPILER_RT_HAS_WFRAME_LARGER_THAN_FLAG AND NOT COMPILER_RT_DEBUG - AND NOT ${LLVM_NATIVE_ARCH} STREQUAL "PowerPC") + AND NOT ${LLVM_NATIVE_ARCH} STREQUAL "PowerPC" + AND NOT ${LLVM_NATIVE_ARCH} STREQUAL "Mips") set(SANITIZER_LIMIT_FRAME_SIZE TRUE) else() set(SANITIZER_LIMIT_FRAME_SIZE FALSE) @@ -292,26 +298,51 @@ if(APPLE) find_darwin_sdk_dir(OSX_SDK_DIR macosx) find_darwin_sdk_dir(IOSSIM_SDK_DIR iphonesimulator) - string(REGEX MATCH "-mmacosx-version-min=" + set(SANITIZER_COMMON_SUPPORTED_OS osx) + string(REGEX MATCH "-mmacosx-version-min=([.0-9]+)" MACOSX_VERSION_MIN_FLAG "${CMAKE_CXX_FLAGS}") - set(SANITIZER_COMMON_SUPPORTED_DARWIN_OS osx) - if (IOSSIM_SDK_DIR AND NOT MACOSX_VERSION_MIN_FLAG) - list(APPEND SANITIZER_COMMON_SUPPORTED_DARWIN_OS iossim) + if(MACOSX_VERSION_MIN_FLAG) + set(SANITIZER_MIN_OSX_VERSION "${CMAKE_MATCH_1}") + elseif(CMAKE_OSX_DEPLOYMENT_TARGET) + set(SANITIZER_MIN_OSX_VERSION ${CMAKE_OSX_DEPLOYMENT_TARGET}) + else() + set(SANITIZER_MIN_OSX_VERSION 10.9) + if(IOSSIM_SDK_DIR) + list(APPEND SANITIZER_COMMON_SUPPORTED_OS iossim) + endif() + endif() + if(SANITIZER_MIN_OSX_VERSION VERSION_LESS "10.7") + message(FATAL_ERROR "Too old OS X version: ${SANITIZER_MIN_OSX_VERSION}") endif() - set(SANITIZER_MIN_OSX_VERSION 10.7) - set(CMAKE_OSX_DEPLOYMENT_TARGET "") # We're setting the flag manually below. + set(CMAKE_OSX_DEPLOYMENT_TARGET "") # We evaluate target OS X version above. set(DARWIN_osx_CFLAGS -mmacosx-version-min=${SANITIZER_MIN_OSX_VERSION} - -isysroot ${OSX_SDK_DIR} -stdlib=libc++) + -stdlib=libc++) set(DARWIN_iossim_CFLAGS + -stdlib=libc++ -mios-simulator-version-min=7.0 -isysroot ${IOSSIM_SDK_DIR}) set(DARWIN_osx_LINKFLAGS -mmacosx-version-min=${SANITIZER_MIN_OSX_VERSION} - -isysroot ${OSX_SDK_DIR} -stdlib=libc++) + -stdlib=libc++ -lc++ -lc++abi) set(DARWIN_iossim_LINKFLAGS + -stdlib=libc++ -lc++ -lc++abi -Wl,-ios_simulator_version_min,7.0.0 -mios-simulator-version-min=7.0 -isysroot ${IOSSIM_SDK_DIR}) + + if(OSX_SDK_DIR) + list(APPEND DARWIN_osx_CFLAGS -isysroot ${OSX_SDK_DIR}) + list(APPEND DARWIN_osx_LINKFLAGS -isysroot ${OSX_SDK_DIR}) + endif() +endif() + +if(APPLE AND SANITIZER_MIN_OSX_VERSION VERSION_LESS "10.9") + # Mac OS X prior to 10.9 had problems with exporting symbols from + # libc++/libc++abi. + set(SANITIZER_CAN_USE_CXXABI FALSE) +else() + set(SANITIZER_CAN_USE_CXXABI TRUE) endif() +pythonize_bool(SANITIZER_CAN_USE_CXXABI) add_subdirectory(include) Modified: vendor/compiler-rt/dist/LICENSE.TXT ============================================================================== --- vendor/compiler-rt/dist/LICENSE.TXT Sun Sep 6 18:37:51 2015 (r287515) +++ vendor/compiler-rt/dist/LICENSE.TXT Sun Sep 6 18:41:23 2015 (r287516) @@ -14,7 +14,7 @@ Full text of the relevant licenses is in University of Illinois/NCSA Open Source License -Copyright (c) 2009-2014 by the contributors listed in CREDITS.TXT +Copyright (c) 2009-2015 by the contributors listed in CREDITS.TXT All rights reserved. @@ -55,7 +55,7 @@ SOFTWARE. ============================================================================== -Copyright (c) 2009-2014 by the contributors listed in CREDITS.TXT +Copyright (c) 2009-2015 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/cmake/Modules/AddCompilerRT.cmake ============================================================================== --- vendor/compiler-rt/dist/cmake/Modules/AddCompilerRT.cmake Sun Sep 6 18:37:51 2015 (r287515) +++ vendor/compiler-rt/dist/cmake/Modules/AddCompilerRT.cmake Sun Sep 6 18:41:23 2015 (r287516) @@ -1,42 +1,48 @@ include(AddLLVM) include(ExternalProject) -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 -# DEFS ) -macro(add_compiler_rt_object_library name arch) - if(CAN_TARGET_${arch}) - parse_arguments(LIB "SOURCES;CFLAGS;DEFS" "" ${ARGN}) - add_library(${name}.${arch} OBJECT ${LIB_SOURCES}) - set_target_compile_flags(${name}.${arch} - ${CMAKE_CXX_FLAGS} ${TARGET_${arch}_CFLAGS} ${LIB_CFLAGS}) - set_property(TARGET ${name}.${arch} APPEND PROPERTY - COMPILE_DEFINITIONS ${LIB_DEFS}) +# Tries to add an "object library" target for a given list of OSs and/or +# architectures with name "." for non-Darwin platforms if +# architecture can be targeted, and "." for Darwin platforms. +# add_compiler_rt_object_libraries( +# OS +# ARCHS +# SOURCES +# CFLAGS +# DEFS ) +function(add_compiler_rt_object_libraries name) + cmake_parse_arguments(LIB "" "" "OS;ARCHS;SOURCES;CFLAGS;DEFS" ${ARGN}) + set(libnames) + if(APPLE) + foreach(os ${LIB_OS}) + set(libname "${name}.${os}") + set(libnames ${libnames} ${libname}) + set(extra_cflags_${libname} ${DARWIN_${os}_CFLAGS}) + endforeach() else() - message(FATAL_ERROR "Archtecture ${arch} can't be targeted") + foreach(arch ${LIB_ARCHS}) + set(libname "${name}.${arch}") + set(libnames ${libnames} ${libname}) + set(extra_cflags_${libname} ${TARGET_${arch}_CFLAGS}) + if(NOT CAN_TARGET_${arch}) + message(FATAL_ERROR "Archtecture ${arch} can't be targeted") + return() + endif() + endforeach() endif() -endmacro() - -# Same as above, but adds universal osx library for either OSX or iOS simulator -# with name "." targeting multiple architectures. -# add_compiler_rt_darwin_object_library( ARCH -# SOURCES -# CFLAGS -# DEFS ) -macro(add_compiler_rt_darwin_object_library name os) - parse_arguments(LIB "ARCH;SOURCES;CFLAGS;DEFS" "" ${ARGN}) - set(libname "${name}.${os}") - add_library(${libname} OBJECT ${LIB_SOURCES}) - set_target_compile_flags(${libname} ${LIB_CFLAGS} ${DARWIN_${os}_CFLAGS}) - set_target_properties(${libname} PROPERTIES OSX_ARCHITECTURES "${LIB_ARCH}") - set_property(TARGET ${libname} APPEND PROPERTY - COMPILE_DEFINITIONS ${LIB_DEFS}) -endmacro() + + foreach(libname ${libnames}) + add_library(${libname} OBJECT ${LIB_SOURCES}) + set_target_compile_flags(${libname} + ${CMAKE_CXX_FLAGS} ${extra_cflags_${libname}} ${LIB_CFLAGS}) + set_property(TARGET ${libname} APPEND PROPERTY + COMPILE_DEFINITIONS ${LIB_DEFS}) + if(APPLE) + set_target_properties(${libname} PROPERTIES OSX_ARCHITECTURES "${LIB_ARCHS}") + endif() + endforeach() +endfunction() # Adds static or shared runtime for a given architecture and puts it in the # proper directory in the build and install trees. @@ -47,13 +53,13 @@ endmacro() # OUTPUT_NAME ) macro(add_compiler_rt_runtime name arch type) if(CAN_TARGET_${arch}) - parse_arguments(LIB "SOURCES;CFLAGS;DEFS;OUTPUT_NAME" "" ${ARGN}) + cmake_parse_arguments(LIB "" "OUTPUT_NAME" "SOURCES;CFLAGS;LINKFLAGS;DEFS" ${ARGN}) add_library(${name} ${type} ${LIB_SOURCES}) # Setup compile flags and definitions. set_target_compile_flags(${name} ${TARGET_${arch}_CFLAGS} ${LIB_CFLAGS}) set_target_link_flags(${name} - ${TARGET_${arch}_CFLAGS} ${LIB_CFLAGS}) + ${TARGET_${arch}_CFLAGS} ${LIB_CFLAGS} ${LIB_LINKFLAGS}) set_property(TARGET ${name} APPEND PROPERTY COMPILE_DEFINITIONS ${LIB_DEFS}) # Setup correct output directory in the build tree. @@ -80,18 +86,18 @@ endmacro() # Same as add_compiler_rt_runtime(... STATIC), but creates a universal library # for several architectures. -# add_compiler_rt_osx_static_runtime( ARCH +# add_compiler_rt_osx_static_runtime( ARCHS # SOURCES # CFLAGS # DEFS ) macro(add_compiler_rt_osx_static_runtime name) - parse_arguments(LIB "ARCH;SOURCES;CFLAGS;DEFS" "" ${ARGN}) + cmake_parse_arguments(LIB "" "" "ARCHS;SOURCES;CFLAGS;DEFS" ${ARGN}) add_library(${name} STATIC ${LIB_SOURCES}) set_target_compile_flags(${name} ${LIB_CFLAGS}) set_property(TARGET ${name} APPEND PROPERTY COMPILE_DEFINITIONS ${LIB_DEFS}) set_target_properties(${name} PROPERTIES - OSX_ARCHITECTURES "${LIB_ARCH}" + OSX_ARCHITECTURES "${LIB_ARCHS}" ARCHIVE_OUTPUT_DIRECTORY ${COMPILER_RT_LIBRARY_OUTPUT_DIR}) install(TARGETS ${name} ARCHIVE DESTINATION ${COMPILER_RT_LIBRARY_INSTALL_DIR}) @@ -100,20 +106,20 @@ endmacro() # Adds dynamic runtime library on osx/iossim, which supports multiple # architectures. # add_compiler_rt_darwin_dynamic_runtime( -# ARCH +# ARCHS # SOURCES # CFLAGS # DEFS # LINKFLAGS ) macro(add_compiler_rt_darwin_dynamic_runtime name os) - parse_arguments(LIB "ARCH;SOURCES;CFLAGS;DEFS;LINKFLAGS" "" ${ARGN}) + cmake_parse_arguments(LIB "" "" "ARCHS;SOURCES;CFLAGS;DEFS;LINKFLAGS" ${ARGN}) add_library(${name} SHARED ${LIB_SOURCES}) set_target_compile_flags(${name} ${LIB_CFLAGS} ${DARWIN_${os}_CFLAGS}) set_target_link_flags(${name} ${LIB_LINKFLAGS} ${DARWIN_${os}_LINKFLAGS}) set_property(TARGET ${name} APPEND PROPERTY COMPILE_DEFINITIONS ${LIB_DEFS}) set_target_properties(${name} PROPERTIES - OSX_ARCHITECTURES "${LIB_ARCH}" + OSX_ARCHITECTURES "${LIB_ARCHS}" LIBRARY_OUTPUT_DIRECTORY ${COMPILER_RT_LIBRARY_OUTPUT_DIR}) install(TARGETS ${name} LIBRARY DESTINATION ${COMPILER_RT_LIBRARY_INSTALL_DIR}) @@ -162,7 +168,7 @@ endif() # DEPS # LINK_FLAGS ) macro(add_compiler_rt_test test_suite test_name) - parse_arguments(TEST "SUBDIR;OBJECTS;DEPS;LINK_FLAGS" "" ${ARGN}) + cmake_parse_arguments(TEST "" "SUBDIR" "OBJECTS;DEPS;LINK_FLAGS" "" ${ARGN}) if(TEST_SUBDIR) set(output_bin "${CMAKE_CURRENT_BINARY_DIR}/${TEST_SUBDIR}/${test_name}") else() @@ -229,7 +235,7 @@ macro(add_custom_libcxx name prefix) message(FATAL_ERROR "libcxx not found!") endif() - parse_arguments(LIBCXX "DEPS;CFLAGS" "" ${ARGN}) + cmake_parse_arguments(LIBCXX "" "" "DEPS;CFLAGS" ${ARGN}) foreach(flag ${LIBCXX_CFLAGS}) set(flagstr "${flagstr} ${flag}") endforeach() @@ -252,6 +258,7 @@ macro(add_custom_libcxx name prefix) LOG_CONFIGURE 1 LOG_INSTALL 1 ) + set_target_properties(${name} PROPERTIES EXCLUDE_FROM_ALL TRUE) ExternalProject_Add_Step(${name} force-reconfigure DEPENDERS configure Modified: vendor/compiler-rt/dist/cmake/Modules/CompilerRTCompile.cmake ============================================================================== --- vendor/compiler-rt/dist/cmake/Modules/CompilerRTCompile.cmake Sun Sep 6 18:37:51 2015 (r287515) +++ vendor/compiler-rt/dist/cmake/Modules/CompilerRTCompile.cmake Sun Sep 6 18:41:23 2015 (r287516) @@ -1,4 +1,28 @@ -include(LLVMParseArguments) +# On Windows, CMAKE_*_FLAGS are built for MSVC but we use the GCC clang.exe, +# which uses completely different flags. Translate some common flag types, and +# drop the rest. +function(translate_msvc_cflags out_flags msvc_flags) + # Insert an empty string in the list to simplify processing. + set(msvc_flags ";${msvc_flags}") + + # Canonicalize /flag to -flag. + string(REPLACE ";/" ";-" msvc_flags "${msvc_flags}") + + # Make space separated -D and -U flags into joined flags. + string(REGEX REPLACE ";-\([DU]\);" ";-\\1" msvc_flags "${msvc_flags}") + + set(clang_flags "") + foreach(flag ${msvc_flags}) + if ("${flag}" MATCHES "^-[DU]") + # Pass through basic command line macro definitions (-DNDEBUG). + list(APPEND clang_flags "${flag}") + elseif ("${flag}" MATCHES "^-O[2x]") + # Canonicalize normal optimization flags to -O2. + list(APPEND clang_flags "-O2") + endif() + endforeach() + set(${out_flags} "${clang_flags}" PARENT_SCOPE) +endfunction() # Compile a source into an object file with COMPILER_RT_TEST_COMPILER using # a provided compile flags and dependenices. @@ -6,7 +30,7 @@ include(LLVMParseArguments) # CFLAGS # DEPS ) macro(clang_compile object_file source) - parse_arguments(SOURCE "CFLAGS;DEPS" "" ${ARGN}) + cmake_parse_arguments(SOURCE "" "" "CFLAGS;DEPS" ${ARGN}) get_filename_component(source_rpath ${source} REALPATH) if(NOT COMPILER_RT_STANDALONE_BUILD) list(APPEND SOURCE_DEPS clang compiler-rt-headers) @@ -20,13 +44,11 @@ macro(clang_compile object_file source) else() string(REPLACE " " ";" global_flags "${CMAKE_C_FLAGS}") endif() - # On Windows, CMAKE_*_FLAGS are built for MSVC but we use the GCC clang.exe - # which doesn't support flags starting with "/smth". Replace those with - # "-smth" equivalents. - if(MSVC) - string(REGEX REPLACE "^/" "-" global_flags "${global_flags}") - string(REPLACE ";/" ";-" global_flags "${global_flags}") + + if (MSVC) + translate_msvc_cflags(global_flags "${global_flags}") endif() + # Ignore unknown warnings. CMAKE_CXX_FLAGS may contain GCC-specific options # which are not supported by Clang. list(APPEND global_flags -Wno-unknown-warning-option) Modified: vendor/compiler-rt/dist/cmake/Modules/CompilerRTLink.cmake ============================================================================== --- vendor/compiler-rt/dist/cmake/Modules/CompilerRTLink.cmake Sun Sep 6 18:37:51 2015 (r287515) +++ vendor/compiler-rt/dist/cmake/Modules/CompilerRTLink.cmake Sun Sep 6 18:41:23 2015 (r287516) @@ -1,12 +1,10 @@ -include(LLVMParseArguments) - # Link a shared library with COMPILER_RT_TEST_COMPILER. # clang_link_shared( # OBJECTS # LINKFLAGS # DEPS ) macro(clang_link_shared so_file) - parse_arguments(SOURCE "OBJECTS;LINKFLAGS;DEPS" "" ${ARGN}) + cmake_parse_arguments(SOURCE "" "" "OBJECTS;LINKFLAGS;DEPS" ${ARGN}) if(NOT COMPILER_RT_STANDALONE_BUILD) list(APPEND SOURCE_DEPS clang) endif() Modified: vendor/compiler-rt/dist/cmake/Modules/CompilerRTUtils.cmake ============================================================================== --- vendor/compiler-rt/dist/cmake/Modules/CompilerRTUtils.cmake Sun Sep 6 18:37:51 2015 (r287515) +++ vendor/compiler-rt/dist/cmake/Modules/CompilerRTUtils.cmake Sun Sep 6 18:41:23 2015 (r287516) @@ -49,3 +49,11 @@ macro(append_no_rtti_flag list) append_list_if(COMPILER_RT_HAS_FNO_RTTI_FLAG -fno-rtti ${list}) append_list_if(COMPILER_RT_HAS_GR_FLAG /GR- ${list}) endmacro() + +macro(append_have_file_definition filename varname list) + check_include_file("${filename}" "${varname}") + if (NOT ${varname}) + set("${varname}" 0) + endif() + list(APPEND ${list} "${varname}=${${varname}}") +endmacro() Modified: vendor/compiler-rt/dist/cmake/Modules/SanitizerUtils.cmake ============================================================================== --- vendor/compiler-rt/dist/cmake/Modules/SanitizerUtils.cmake Sun Sep 6 18:37:51 2015 (r287515) +++ vendor/compiler-rt/dist/cmake/Modules/SanitizerUtils.cmake Sun Sep 6 18:41:23 2015 (r287516) @@ -1,5 +1,3 @@ -include(LLVMParseArguments) - set(SANITIZER_GEN_DYNAMIC_LIST ${COMPILER_RT_SOURCE_DIR}/lib/sanitizer_common/scripts/gen_dynamic_list.py) @@ -13,9 +11,13 @@ set(SANITIZER_LINT_SCRIPT # add_sanitizer_rt_symbols( ) macro(add_sanitizer_rt_symbols name) set(stamp ${CMAKE_CURRENT_BINARY_DIR}/${name}.syms-stamp) + set(extra_args) + foreach(arg ${ARGN}) + list(APPEND extra_args "--extra" ${arg}) + endforeach() add_custom_command(OUTPUT ${stamp} COMMAND ${PYTHON_EXECUTABLE} - ${SANITIZER_GEN_DYNAMIC_LIST} $ ${ARGN} + ${SANITIZER_GEN_DYNAMIC_LIST} ${extra_args} $ > $.syms COMMAND ${CMAKE_COMMAND} -E touch ${stamp} DEPENDS ${name} ${SANITIZER_GEN_DYNAMIC_LIST} ${ARGN} @@ -44,6 +46,29 @@ macro(add_sanitizer_rt_symbols name) endif() endmacro() +macro(add_sanitizer_rt_version_list name) + set(vers ${CMAKE_CURRENT_BINARY_DIR}/${name}.vers) + cmake_parse_arguments(ARG "" "" "LIBS;EXTRA" ${ARGN}) + set(args) + foreach(arg ${ARG_EXTRA}) + list(APPEND args "--extra" ${arg}) + endforeach() + foreach(arg ${ARG_LIBS}) + list(APPEND args "$") + endforeach() + add_custom_command(OUTPUT ${vers} + COMMAND ${PYTHON_EXECUTABLE} + ${SANITIZER_GEN_DYNAMIC_LIST} --version-list ${args} + > ${vers} + DEPENDS ${SANITIZER_GEN_DYNAMIC_LIST} ${ARG_EXTRA} ${ARG_LIBS} + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + COMMENT "Generating version list for ${name}" + VERBATIM) + + add_custom_target(${name}-version-list ALL + DEPENDS ${vers}) +endmacro() + # Add target to check code style for sanitizer runtimes. if(UNIX) add_custom_target(SanitizerLintCheck Modified: vendor/compiler-rt/dist/cmake/config-ix.cmake ============================================================================== --- vendor/compiler-rt/dist/cmake/config-ix.cmake Sun Sep 6 18:37:51 2015 (r287515) +++ vendor/compiler-rt/dist/cmake/config-ix.cmake Sun Sep 6 18:41:23 2015 (r287516) @@ -1,8 +1,16 @@ +include(CMakePushCheckState) include(CheckCXXCompilerFlag) include(CheckLibraryExists) include(CheckSymbolExists) include(TestBigEndian) +function(check_linker_flag flag out_var) + cmake_push_check_state() + set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${flag}") + check_cxx_compiler_flag("" ${out_var}) + cmake_pop_check_state() +endfunction() + # CodeGen options. check_cxx_compiler_flag(-fPIC COMPILER_RT_HAS_FPIC_FLAG) check_cxx_compiler_flag(-fPIE COMPILER_RT_HAS_FPIE_FLAG) @@ -11,6 +19,7 @@ check_cxx_compiler_flag(-fno-exceptions check_cxx_compiler_flag(-fomit-frame-pointer COMPILER_RT_HAS_FOMIT_FRAME_POINTER_FLAG) check_cxx_compiler_flag(-funwind-tables COMPILER_RT_HAS_FUNWIND_TABLES_FLAG) check_cxx_compiler_flag(-fno-stack-protector COMPILER_RT_HAS_FNO_STACK_PROTECTOR_FLAG) +check_cxx_compiler_flag(-fno-sanitize=safe-stack COMPILER_RT_HAS_FNO_SANITIZE_SAFE_STACK_FLAG) check_cxx_compiler_flag(-fvisibility=hidden COMPILER_RT_HAS_FVISIBILITY_HIDDEN_FLAG) check_cxx_compiler_flag(-fno-rtti COMPILER_RT_HAS_FNO_RTTI_FLAG) check_cxx_compiler_flag(-ffreestanding COMPILER_RT_HAS_FFREESTANDING_FLAG) @@ -54,10 +63,16 @@ check_symbol_exists(__func__ "" COMPILER # Libraries. check_library_exists(c printf "" COMPILER_RT_HAS_LIBC) check_library_exists(dl dlopen "" COMPILER_RT_HAS_LIBDL) +check_library_exists(rt shm_open "" COMPILER_RT_HAS_LIBRT) check_library_exists(m pow "" COMPILER_RT_HAS_LIBM) check_library_exists(pthread pthread_create "" COMPILER_RT_HAS_LIBPTHREAD) check_library_exists(stdc++ __cxa_throw "" COMPILER_RT_HAS_LIBSTDCXX) +# Linker flags. +if(ANDROID) + check_linker_flag("-Wl,-z,global" COMPILER_RT_HAS_Z_GLOBAL) +endif() + # Architectures. # List of all architectures we can target. @@ -70,22 +85,43 @@ set(COMPILER_RT_SUPPORTED_ARCH) set(SIMPLE_SOURCE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/simple.cc) file(WRITE ${SIMPLE_SOURCE} "#include \n#include \nint main() {}\n") -# test_target_arch( ) -# Sets the target flags for a given architecture and determines if this -# architecture is supported by trying to build a simple file. -macro(test_target_arch arch) +function(check_compile_definition def argstring out_var) + if("${def}" STREQUAL "") + set(${out_var} TRUE PARENT_SCOPE) + return() + endif() + cmake_push_check_state() + set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${argstring}") + check_symbol_exists(${def} "" ${out_var}) + cmake_pop_check_state() +endfunction() + +# test_target_arch( ) +# Checks if architecture is supported: runs host compiler with provided +# flags to verify that: +# 1) is defined (if non-empty) +# 2) simple file can be successfully built. +# If successful, saves target flags for this architecture. +macro(test_target_arch arch def) set(TARGET_${arch}_CFLAGS ${ARGN}) - set(argstring "${CMAKE_EXE_LINKER_FLAGS}") + set(argstring "") foreach(arg ${ARGN}) set(argstring "${argstring} ${arg}") endforeach() - try_compile(CAN_TARGET_${arch} ${CMAKE_BINARY_DIR} ${SIMPLE_SOURCE} - COMPILE_DEFINITIONS "${TARGET_${arch}_CFLAGS}" - OUTPUT_VARIABLE TARGET_${arch}_OUTPUT - CMAKE_FLAGS "-DCMAKE_EXE_LINKER_FLAGS:STRING=${argstring}") + check_compile_definition("${def}" "${argstring}" HAS_${arch}_DEF) + if(NOT HAS_${arch}_DEF) + set(CAN_TARGET_${arch} FALSE) + else() + set(argstring "${CMAKE_EXE_LINKER_FLAGS} ${argstring}") + try_compile(CAN_TARGET_${arch} ${CMAKE_BINARY_DIR} ${SIMPLE_SOURCE} + COMPILE_DEFINITIONS "${TARGET_${arch}_CFLAGS}" + OUTPUT_VARIABLE TARGET_${arch}_OUTPUT + CMAKE_FLAGS "-DCMAKE_EXE_LINKER_FLAGS:STRING=${argstring}") + endif() if(${CAN_TARGET_${arch}}) list(APPEND COMPILER_RT_SUPPORTED_ARCH ${arch}) - elseif("${COMPILER_RT_TEST_TARGET_ARCH}" MATCHES "${arch}") + elseif("${COMPILER_RT_TEST_TARGET_ARCH}" MATCHES "${arch}" AND + COMPILER_RT_HAS_EXPLICIT_TEST_TARGET_TRIPLE) # Bail out if we cannot target the architecture we plan to test. message(FATAL_ERROR "Cannot compile for ${arch}:\n${TARGET_${arch}_OUTPUT}") endif() @@ -139,33 +175,46 @@ if(ANDROID) else() if("${LLVM_NATIVE_ARCH}" STREQUAL "X86") if(NOT MSVC) - test_target_arch(x86_64 "-m64") - test_target_arch(i386 "-m32") + test_target_arch(x86_64 "" "-m64") + # FIXME: We build runtimes for both i686 and i386, as "clang -m32" may + # target different variant than "$CMAKE_C_COMPILER -m32". This part should + # be gone after we resolve PR14109. + test_target_arch(i686 __i686__ "-m32") + test_target_arch(i386 __i386__ "-m32") else() - test_target_arch(i386 "") + if (CMAKE_SIZEOF_VOID_P EQUAL 4) + test_target_arch(i386 "" "") + else() + test_target_arch(x86_64 "" "") + endif() endif() elseif("${LLVM_NATIVE_ARCH}" STREQUAL "PowerPC") TEST_BIG_ENDIAN(HOST_IS_BIG_ENDIAN) if(HOST_IS_BIG_ENDIAN) - test_target_arch(powerpc64 "-m64") + test_target_arch(powerpc64 "" "-m64") else() - test_target_arch(powerpc64le "-m64") + test_target_arch(powerpc64le "" "-m64") endif() elseif("${LLVM_NATIVE_ARCH}" STREQUAL "Mips") + # Gcc doesn't accept -m32/-m64 so we do the next best thing and use + # -mips32r2/-mips64r2. We don't use -mips1/-mips3 because we want to match + # clang's default CPU's. In the 64-bit case, we must also specify the ABI + # since the default ABI differs between gcc and clang. + # FIXME: Ideally, we would build the N32 library too. if("${COMPILER_RT_TEST_TARGET_ARCH}" MATCHES "mipsel|mips64el") # regex for mipsel, mips64el - test_target_arch(mipsel "-m32") - test_target_arch(mips64el "-m64") + test_target_arch(mipsel "" "-mips32r2" "--target=mipsel-linux-gnu") + test_target_arch(mips64el "" "-mips64r2" "-mabi=n64") else() - test_target_arch(mips "-m32") - test_target_arch(mips64 "-m64") + test_target_arch(mips "" "-mips32r2" "--target=mips-linux-gnu") + test_target_arch(mips64 "" "-mips64r2" "-mabi=n64") endif() elseif("${COMPILER_RT_TEST_TARGET_ARCH}" MATCHES "arm") - test_target_arch(arm "-march=armv7-a") + test_target_arch(arm "" "-march=armv7-a") elseif("${COMPILER_RT_TEST_TARGET_ARCH}" MATCHES "aarch32") - test_target_arch(aarch32 "-march=armv8-a") + test_target_arch(aarch32 "" "-march=armv8-a") elseif("${COMPILER_RT_TEST_TARGET_ARCH}" MATCHES "aarch64") - test_target_arch(aarch64 "-march=armv8-a") + test_target_arch(aarch64 "" "-march=armv8-a") endif() set(COMPILER_RT_OS_SUFFIX "") endif() @@ -184,6 +233,7 @@ function(filter_available_targets out_va set(${out_var} ${archs} PARENT_SCOPE) endfunction() +# Returns a list of architecture specific target cflags in @out_var list. function(get_target_flags_for_arch arch out_var) list(FIND COMPILER_RT_SUPPORTED_ARCH ${arch} ARCH_INDEX) if(ARCH_INDEX EQUAL -1) @@ -196,19 +246,23 @@ endfunction() # Architectures supported by compiler-rt libraries. filter_available_targets(SANITIZER_COMMON_SUPPORTED_ARCH x86_64 i386 i686 powerpc64 powerpc64le arm aarch64 mips mips64 mipsel mips64el) +# LSan and UBSan common files should be available on all architectures supported +# by other sanitizers (even if they build into dummy object files). +filter_available_targets(LSAN_COMMON_SUPPORTED_ARCH + ${SANITIZER_COMMON_SUPPORTED_ARCH}) +filter_available_targets(UBSAN_COMMON_SUPPORTED_ARCH + ${SANITIZER_COMMON_SUPPORTED_ARCH}) filter_available_targets(ASAN_SUPPORTED_ARCH x86_64 i386 i686 powerpc64 powerpc64le arm mips mipsel mips64 mips64el) filter_available_targets(DFSAN_SUPPORTED_ARCH x86_64 mips64 mips64el) filter_available_targets(LSAN_SUPPORTED_ARCH x86_64 mips64 mips64el) -# LSan common files should be available on all architectures supported -# by other sanitizers (even if they build into dummy object files). -filter_available_targets(LSAN_COMMON_SUPPORTED_ARCH - ${SANITIZER_COMMON_SUPPORTED_ARCH}) filter_available_targets(MSAN_SUPPORTED_ARCH x86_64 mips64 mips64el) filter_available_targets(PROFILE_SUPPORTED_ARCH x86_64 i386 i686 arm mips mips64 mipsel mips64el aarch64 powerpc64 powerpc64le) filter_available_targets(TSAN_SUPPORTED_ARCH x86_64 mips64 mips64el) -filter_available_targets(UBSAN_SUPPORTED_ARCH x86_64 i386 i686 arm aarch64 mips mipsel mips64 mips64el) +filter_available_targets(UBSAN_SUPPORTED_ARCH x86_64 i386 i686 arm aarch64 mips + mipsel mips64 mips64el powerpc64 powerpc64le) +filter_available_targets(SAFESTACK_SUPPORTED_ARCH x86_64 i386 i686) if(ANDROID) set(OS_NAME "Android") @@ -218,13 +272,21 @@ endif() if (SANITIZER_COMMON_SUPPORTED_ARCH AND NOT LLVM_USE_SANITIZER AND (OS_NAME MATCHES "Android|Darwin|Linux|FreeBSD" OR - (OS_NAME MATCHES "Windows" AND MSVC AND CMAKE_SIZEOF_VOID_P EQUAL 4))) + (OS_NAME MATCHES "Windows" AND MSVC))) set(COMPILER_RT_HAS_SANITIZER_COMMON TRUE) else() set(COMPILER_RT_HAS_SANITIZER_COMMON FALSE) endif() -if (COMPILER_RT_HAS_SANITIZER_COMMON AND ASAN_SUPPORTED_ARCH) +if (COMPILER_RT_HAS_SANITIZER_COMMON AND + (NOT OS_NAME MATCHES "Windows" OR CMAKE_SIZEOF_VOID_P EQUAL 4)) + set(COMPILER_RT_HAS_INTERCEPTION TRUE) +else() + set(COMPILER_RT_HAS_INTERCEPTION FALSE) +endif() + +if (COMPILER_RT_HAS_SANITIZER_COMMON AND ASAN_SUPPORTED_ARCH AND + (NOT OS_NAME MATCHES "Windows" OR CMAKE_SIZEOF_VOID_P EQUAL 4)) set(COMPILER_RT_HAS_ASAN TRUE) else() set(COMPILER_RT_HAS_ASAN FALSE) @@ -246,19 +308,12 @@ else() endif() if (COMPILER_RT_HAS_SANITIZER_COMMON AND LSAN_SUPPORTED_ARCH AND - OS_NAME MATCHES "Darwin|Linux|FreeBSD") + OS_NAME MATCHES "Linux|FreeBSD") set(COMPILER_RT_HAS_LSAN TRUE) else() set(COMPILER_RT_HAS_LSAN FALSE) endif() -if (COMPILER_RT_HAS_SANITIZER_COMMON AND LSAN_COMMON_SUPPORTED_ARCH AND - OS_NAME MATCHES "Darwin|Linux|FreeBSD|Android") - set(COMPILER_RT_HAS_LSAN_COMMON TRUE) -else() - set(COMPILER_RT_HAS_LSAN_COMMON FALSE) -endif() - if (COMPILER_RT_HAS_SANITIZER_COMMON AND MSAN_SUPPORTED_ARCH AND OS_NAME MATCHES "Linux") set(COMPILER_RT_HAS_MSAN TRUE) @@ -281,9 +336,23 @@ else() endif() if (COMPILER_RT_HAS_SANITIZER_COMMON AND UBSAN_SUPPORTED_ARCH AND - OS_NAME MATCHES "Darwin|Linux|FreeBSD") + OS_NAME MATCHES "Darwin|Linux|FreeBSD|Windows") set(COMPILER_RT_HAS_UBSAN TRUE) else() set(COMPILER_RT_HAS_UBSAN FALSE) endif() +# -msse3 flag is not valid for Mips therefore clang gives a warning +# message with -msse3. But check_c_compiler_flags() checks only for +# compiler error messages. Therefore COMPILER_RT_HAS_MSSE3_FLAG turns out to be +# true on Mips, so we make it false here. +if("${LLVM_NATIVE_ARCH}" STREQUAL "Mips") + set(COMPILER_RT_HAS_MSSE3_FLAG FALSE) +endif() + +if (COMPILER_RT_HAS_SANITIZER_COMMON AND SAFESTACK_SUPPORTED_ARCH AND + OS_NAME MATCHES "Darwin|Linux|FreeBSD") + set(COMPILER_RT_HAS_SAFESTACK TRUE) +else() + set(COMPILER_RT_HAS_SAFESTACK FALSE) +endif() Modified: vendor/compiler-rt/dist/include/sanitizer/coverage_interface.h ============================================================================== --- vendor/compiler-rt/dist/include/sanitizer/coverage_interface.h Sun Sep 6 18:37:51 2015 (r287515) +++ vendor/compiler-rt/dist/include/sanitizer/coverage_interface.h Sun Sep 6 18:41:23 2015 (r287516) @@ -39,6 +39,23 @@ extern "C" { // Some of the entries in *data will be zero. uintptr_t __sanitizer_get_coverage_guards(uintptr_t **data); + // The coverage instrumentation may optionally provide imprecise counters. + // Rather than exposing the counter values to the user we instead map + // the counters to a bitset. + // Every counter is associated with 8 bits in the bitset. + // We define 8 value ranges: 1, 2, 3, 4-7, 8-15, 16-31, 32-127, 128+ + // The i-th bit is set to 1 if the counter value is in the i-th range. + // This counter-based coverage implementation is *not* thread-safe. + + // Returns the number of registered coverage counters. + uintptr_t __sanitizer_get_number_of_counters(); + // Updates the counter 'bitset', clears the counters and returns the number of + // new bits in 'bitset'. + // If 'bitset' is nullptr, only clears the counters. + // Otherwise 'bitset' should be at least + // __sanitizer_get_number_of_counters bytes long and 8-aligned. + uintptr_t + __sanitizer_update_counter_bitset_and_clear_counters(uint8_t *bitset); #ifdef __cplusplus } // extern "C" #endif Modified: vendor/compiler-rt/dist/include/sanitizer/dfsan_interface.h ============================================================================== --- vendor/compiler-rt/dist/include/sanitizer/dfsan_interface.h Sun Sep 6 18:37:51 2015 (r287515) +++ vendor/compiler-rt/dist/include/sanitizer/dfsan_interface.h Sun Sep 6 18:41:23 2015 (r287516) @@ -91,6 +91,16 @@ void dfsan_set_write_callback(dfsan_writ ///