Path: blob/main/contrib/llvm-project/libunwind/src/Unwind-EHABI.h
35148 views
//===----------------------------------------------------------------------===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//7//===----------------------------------------------------------------------===//89#ifndef __UNWIND_EHABI_H__10#define __UNWIND_EHABI_H__1112#include <__libunwind_config.h>1314#if defined(_LIBUNWIND_ARM_EHABI)1516#include <stdint.h>17#include <unwind.h>1819// Unable to unwind in the ARM index table (section 5 EHABI).20#define UNW_EXIDX_CANTUNWIND 0x12122static inline uint32_t signExtendPrel31(uint32_t data) {23return data | ((data & 0x40000000u) << 1);24}2526static inline uint32_t readPrel31(const uint32_t *data) {27return (((uint32_t)(uintptr_t)data) + signExtendPrel31(*data));28}2930#if defined(__cplusplus)31extern "C" {32#endif3334extern _Unwind_Reason_Code __aeabi_unwind_cpp_pr0(35_Unwind_State state, _Unwind_Control_Block *ucbp, _Unwind_Context *context);3637extern _Unwind_Reason_Code __aeabi_unwind_cpp_pr1(38_Unwind_State state, _Unwind_Control_Block *ucbp, _Unwind_Context *context);3940extern _Unwind_Reason_Code __aeabi_unwind_cpp_pr2(41_Unwind_State state, _Unwind_Control_Block *ucbp, _Unwind_Context *context);4243#if defined(__cplusplus)44} // extern "C"45#endif4647#endif // defined(_LIBUNWIND_ARM_EHABI)4849#endif // __UNWIND_EHABI_H__505152