[AMDGPU] prevent shrinking udiv/urem if either operand is in (SignedMax,UnsignedMax...
[llvm-project.git] / libunwind / src / Unwind-EHABI.h
blobff3b5fc6fea77fba0f4ebc4d74e72bac984935fa
1 //===----------------------------------------------------------------------===//
2 //
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
6 //
7 //
8 //===----------------------------------------------------------------------===//
10 #ifndef __UNWIND_EHABI_H__
11 #define __UNWIND_EHABI_H__
13 #include <__libunwind_config.h>
15 #if defined(_LIBUNWIND_ARM_EHABI)
17 #include <stdint.h>
18 #include <unwind.h>
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)
32 extern "C" {
33 #endif
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)
45 } // extern "C"
46 #endif
48 #endif // defined(_LIBUNWIND_ARM_EHABI)
50 #endif // __UNWIND_EHABI_H__