1 //===------------------------- Unwind-EHABI.hpp ---------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
9 //===----------------------------------------------------------------------===//
11 #ifndef __UNWIND_EHABI_H__
12 #define __UNWIND_EHABI_H__
14 #include <__libunwind_config.h>
16 #if defined(_LIBUNWIND_ARM_EHABI)
21 // Unable to unwind in the ARM index table (section 5 EHABI).
22 #define UNW_EXIDX_CANTUNWIND 0x1
24 static inline uint32_t signExtendPrel31(uint32_t data) {
25 return data | ((data & 0x40000000u) << 1);
28 static inline uint32_t readPrel31(const uint32_t *data) {
29 return (((uint32_t)(uintptr_t)data) + signExtendPrel31(*data));
32 #if defined(__cplusplus)
36 extern _Unwind_Reason_Code __aeabi_unwind_cpp_pr0(
37 _Unwind_State state, _Unwind_Control_Block *ucbp, _Unwind_Context *context);
39 extern _Unwind_Reason_Code __aeabi_unwind_cpp_pr1(
40 _Unwind_State state, _Unwind_Control_Block *ucbp, _Unwind_Context *context);
42 extern _Unwind_Reason_Code __aeabi_unwind_cpp_pr2(
43 _Unwind_State state, _Unwind_Control_Block *ucbp, _Unwind_Context *context);
45 #if defined(__cplusplus)
49 #endif // defined(_LIBUNWIND_ARM_EHABI)
51 #endif // __UNWIND_EHABI_H__