From owner-svn-src-all@freebsd.org Sun Jan 29 20:58:56 2017 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 3E851CC7FD5; Sun, 29 Jan 2017 20:58:56 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 190511454; Sun, 29 Jan 2017 20:58:56 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0TKwteQ075143; Sun, 29 Jan 2017 20:58:55 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0TKwsWw075140; Sun, 29 Jan 2017 20:58:54 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201701292058.v0TKwsWw075140@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 29 Jan 2017 20:58:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r312960 - in vendor/compiler-rt/dist: lib/builtins/arm lib/xray test/xray 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.23 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, 29 Jan 2017 20:58:56 -0000 Author: dim Date: Sun Jan 29 20:58:54 2017 New Revision: 312960 URL: https://svnweb.freebsd.org/changeset/base/312960 Log: Vendor import of compiler-rt release_40 branch r293443: https://llvm.org/svn/llvm-project/compiler-rt/branches/release_40@293443 Modified: vendor/compiler-rt/dist/lib/builtins/arm/comparesf2.S vendor/compiler-rt/dist/lib/xray/xray_arm.cc vendor/compiler-rt/dist/test/xray/lit.cfg Modified: vendor/compiler-rt/dist/lib/builtins/arm/comparesf2.S ============================================================================== --- vendor/compiler-rt/dist/lib/builtins/arm/comparesf2.S Sun Jan 29 20:58:52 2017 (r312959) +++ vendor/compiler-rt/dist/lib/builtins/arm/comparesf2.S Sun Jan 29 20:58:54 2017 (r312960) @@ -283,7 +283,7 @@ DEFINE_COMPILERRT_FUNCTION(__unordsf2) END_COMPILERRT_FUNCTION(__unordsf2) #if defined(COMPILER_RT_ARMHF_TARGET) -DEFINE_COMPILERRT_FUNCTION(__aeabi_fcmpum): +DEFINE_COMPILERRT_FUNCTION(__aeabi_fcmpum) vmov s0, r0 vmov s1, r1 b SYMBOL_NAME(__unordsf2) Modified: vendor/compiler-rt/dist/lib/xray/xray_arm.cc ============================================================================== --- vendor/compiler-rt/dist/lib/xray/xray_arm.cc Sun Jan 29 20:58:52 2017 (r312959) +++ vendor/compiler-rt/dist/lib/xray/xray_arm.cc Sun Jan 29 20:58:54 2017 (r312960) @@ -19,6 +19,8 @@ #include #include +extern "C" void __clear_cache(void* start, void* end); + namespace __xray { uint64_t cycleFrequency() XRAY_NEVER_INSTRUMENT { @@ -116,8 +118,8 @@ inline static bool patchSled(const bool // B #20 uint32_t *FirstAddress = reinterpret_cast(Sled.Address); + uint32_t *CurAddress = FirstAddress + 1; if (Enable) { - uint32_t *CurAddress = FirstAddress + 1; CurAddress = Write32bitLoadR0(CurAddress, reinterpret_cast(FuncId)); CurAddress = @@ -125,6 +127,7 @@ inline static bool patchSled(const bool *CurAddress = uint32_t(PatchOpcodes::PO_BlxIp); CurAddress++; *CurAddress = uint32_t(PatchOpcodes::PO_PopR0Lr); + CurAddress++; std::atomic_store_explicit( reinterpret_cast *>(FirstAddress), uint32_t(PatchOpcodes::PO_PushR0Lr), std::memory_order_release); @@ -133,6 +136,8 @@ inline static bool patchSled(const bool reinterpret_cast *>(FirstAddress), uint32_t(PatchOpcodes::PO_B20), std::memory_order_release); } + __clear_cache(reinterpret_cast(FirstAddress), + reinterpret_cast(CurAddress)); return true; } Modified: vendor/compiler-rt/dist/test/xray/lit.cfg ============================================================================== --- vendor/compiler-rt/dist/test/xray/lit.cfg Sun Jan 29 20:58:52 2017 (r312959) +++ vendor/compiler-rt/dist/test/xray/lit.cfg Sun Jan 29 20:58:54 2017 (r312960) @@ -30,8 +30,14 @@ config.substitutions.append( # Default test suffixes. config.suffixes = ['.c', '.cc', '.cpp'] -if config.host_os not in ['Linux'] or config.host_arch.find('64') == -1: +if config.host_os not in ['Linux']: config.unsupported = True +elif '64' not in config.host_arch: + if 'arm' in config.host_arch: + if '-mthumb' in config.target_cflags: + config.unsupported = True + else: + config.unsupported = True # Allow tests to use REQUIRES=stable-runtime. For use when you cannot use XFAIL # e.g. because the test sometimes passes, sometimes fails.