1 //===----------------------------------------------------------------------===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
8 //===----------------------------------------------------------------------===//
10 #ifndef __UNWIND_EHABI_H__
11 #define __UNWIND_EHABI_H__
13 #include <__libunwind_config.h>
15 #if defined(_LIBUNWIND_ARM_EHABI)
20 // Unable to unwind in the ARM index table (section 5 EHABI).
21 #define UNW_EXIDX_CANTUNWIND 0x1
23 static inline uint32_t signExtendPrel31(uint32_t data
) {
24 return data
| ((data
& 0x40000000u
) << 1);
27 static inline uint32_t readPrel31(const uint32_t *data
) {
28 return (((uint32_t)(uintptr_t)data
) + signExtendPrel31(*data
));
31 #if defined(__cplusplus)
35 extern _Unwind_Reason_Code
__aeabi_unwind_cpp_pr0(
36 _Unwind_State state
, _Unwind_Control_Block
*ucbp
, _Unwind_Context
*context
);
38 extern _Unwind_Reason_Code
__aeabi_unwind_cpp_pr1(
39 _Unwind_State state
, _Unwind_Control_Block
*ucbp
, _Unwind_Context
*context
);
41 extern _Unwind_Reason_Code
__aeabi_unwind_cpp_pr2(
42 _Unwind_State state
, _Unwind_Control_Block
*ucbp
, _Unwind_Context
*context
);
44 #if defined(__cplusplus)
48 #endif // defined(_LIBUNWIND_ARM_EHABI)
50 #endif // __UNWIND_EHABI_H__