From owner-svn-src-all@freebsd.org Mon Jan 4 21:30:56 2016 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 386BEA622C4; Mon, 4 Jan 2016 21:30:56 +0000 (UTC) (envelope-from emaste@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 EA0561E4E; Mon, 4 Jan 2016 21:30:55 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u04LUtbh051954; Mon, 4 Jan 2016 21:30:55 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u04LUs6q051948; Mon, 4 Jan 2016 21:30:54 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201601042130.u04LUs6q051948@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 4 Jan 2016 21:30:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r293181 - vendor/llvm-libunwind/dist/src 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: Mon, 04 Jan 2016 21:30:56 -0000 Author: emaste Date: Mon Jan 4 21:30:54 2016 New Revision: 293181 URL: https://svnweb.freebsd.org/changeset/base/293181 Log: Import LLVM libunwind snapshot revision 256779 From https://llvm.org/svn/llvm-project/libunwind/trunk/ Modified: vendor/llvm-libunwind/dist/src/AddressSpace.hpp vendor/llvm-libunwind/dist/src/DwarfParser.hpp vendor/llvm-libunwind/dist/src/UnwindCursor.hpp vendor/llvm-libunwind/dist/src/UnwindRegistersSave.S vendor/llvm-libunwind/dist/src/config.h vendor/llvm-libunwind/dist/src/libunwind.cpp Modified: vendor/llvm-libunwind/dist/src/AddressSpace.hpp ============================================================================== --- vendor/llvm-libunwind/dist/src/AddressSpace.hpp Mon Jan 4 21:16:49 2016 (r293180) +++ vendor/llvm-libunwind/dist/src/AddressSpace.hpp Mon Jan 4 21:30:54 2016 (r293181) @@ -35,7 +35,11 @@ namespace libunwind { #include "Registers.hpp" #if _LIBUNWIND_ARM_EHABI -#ifdef __linux__ +#if defined(__FreeBSD__) + +typedef void *_Unwind_Ptr; + +#elif defined(__linux__) typedef long unsigned int *_Unwind_Ptr; extern "C" _Unwind_Ptr __gnu_Unwind_Find_exidx(_Unwind_Ptr addr, int *len); Modified: vendor/llvm-libunwind/dist/src/DwarfParser.hpp ============================================================================== --- vendor/llvm-libunwind/dist/src/DwarfParser.hpp Mon Jan 4 21:16:49 2016 (r293180) +++ vendor/llvm-libunwind/dist/src/DwarfParser.hpp Mon Jan 4 21:30:54 2016 (r293181) @@ -380,7 +380,9 @@ bool CFI_Parser::parseInstructions(A uint64_t length; uint8_t opcode = addressSpace.get8(p); uint8_t operand; +#if !defined(_LIBUNWIND_NO_HEAP) PrologInfoStackEntry *entry; +#endif ++p; switch (opcode) { case DW_CFA_nop: @@ -492,6 +494,7 @@ bool CFI_Parser::parseInstructions(A fprintf(stderr, "DW_CFA_register(reg=%" PRIu64 ", reg2=%" PRIu64 ")\n", reg, reg2); break; +#if !defined(_LIBUNWIND_NO_HEAP) case DW_CFA_remember_state: // avoid operator new, because that would be an upward dependency entry = (PrologInfoStackEntry *)malloc(sizeof(PrologInfoStackEntry)); @@ -517,6 +520,7 @@ bool CFI_Parser::parseInstructions(A if (logDwarf) fprintf(stderr, "DW_CFA_restore_state\n"); break; +#endif case DW_CFA_def_cfa: reg = addressSpace.getULEB128(p, instructionsEnd); offset = (int64_t)addressSpace.getULEB128(p, instructionsEnd); Modified: vendor/llvm-libunwind/dist/src/UnwindCursor.hpp ============================================================================== --- vendor/llvm-libunwind/dist/src/UnwindCursor.hpp Mon Jan 4 21:16:49 2016 (r293180) +++ vendor/llvm-libunwind/dist/src/UnwindCursor.hpp Mon Jan 4 21:30:54 2016 (r293181) @@ -114,6 +114,7 @@ typename A::pint_t DwarfFDECache::fin template void DwarfFDECache::add(pint_t mh, pint_t ip_start, pint_t ip_end, pint_t fde) { +#if !defined(_LIBUNWIND_NO_HEAP) _LIBUNWIND_LOG_NON_ZERO(::pthread_rwlock_wrlock(&_lock)); if (_bufferUsed >= _bufferEnd) { size_t oldSize = (size_t)(_bufferEnd - _buffer); @@ -139,6 +140,7 @@ void DwarfFDECache::add(pint_t mh, pi } #endif _LIBUNWIND_LOG_NON_ZERO(::pthread_rwlock_unlock(&_lock)); +#endif } template Modified: vendor/llvm-libunwind/dist/src/UnwindRegistersSave.S ============================================================================== --- vendor/llvm-libunwind/dist/src/UnwindRegistersSave.S Mon Jan 4 21:16:49 2016 (r293180) +++ vendor/llvm-libunwind/dist/src/UnwindRegistersSave.S Mon Jan 4 21:30:54 2016 (r293181) @@ -87,6 +87,15 @@ DEFINE_LIBUNWIND_FUNCTION(unw_getcontext xorl %eax, %eax # return UNW_ESUCCESS ret +# elif defined(__mips__) + +# +# extern int unw_getcontext(unw_context_t* thread_state) +# +# Just trap for the time being. +DEFINE_LIBUNWIND_FUNCTION(unw_getcontext) + teq $0, $0 + #elif defined(__ppc__) ; Modified: vendor/llvm-libunwind/dist/src/config.h ============================================================================== --- vendor/llvm-libunwind/dist/src/config.h Mon Jan 4 21:16:49 2016 (r293180) +++ vendor/llvm-libunwind/dist/src/config.h Mon Jan 4 21:30:54 2016 (r293181) @@ -41,7 +41,8 @@ #define _LIBUNWIND_BUILD_ZERO_COST_APIS (defined(__i386__) || \ defined(__x86_64__) || \ - defined(__arm64__)) + defined(__arm64__) || \ + defined(__mips__)) #define _LIBUNWIND_BUILD_SJLJ_APIS defined(__arm__) #define _LIBUNWIND_SUPPORT_FRAME_APIS (defined(__i386__) || \ defined(__x86_64__)) Modified: vendor/llvm-libunwind/dist/src/libunwind.cpp ============================================================================== --- vendor/llvm-libunwind/dist/src/libunwind.cpp Mon Jan 4 21:16:49 2016 (r293180) +++ vendor/llvm-libunwind/dist/src/libunwind.cpp Mon Jan 4 21:30:54 2016 (r293181) @@ -64,6 +64,8 @@ _LIBUNWIND_EXPORT int unw_init_local(unw #elif defined(__or1k__) new ((void *)cursor) UnwindCursor( context, LocalAddressSpace::sThisAddressSpace); +#elif defined(__mips__) +#warning The MIPS architecture is not supported. #else #error Architecture not supported #endif