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 9 #ifndef ____LIBUNWIND_CONFIG_H__ 10 #define ____LIBUNWIND_CONFIG_H__ 11 12 #define _LIBUNWIND_VERSION 15000 13 14 #if defined(__arm__) && !defined(__USING_SJLJ_EXCEPTIONS__) && \ 15 !defined(__ARM_DWARF_EH__) && !defined(__SEH__) 16 #define _LIBUNWIND_ARM_EHABI 17 #endif 18 19 #define _LIBUNWIND_HIGHEST_DWARF_REGISTER_X86 8 20 #define _LIBUNWIND_HIGHEST_DWARF_REGISTER_X86_64 32 21 #define _LIBUNWIND_HIGHEST_DWARF_REGISTER_PPC 112 22 #define _LIBUNWIND_HIGHEST_DWARF_REGISTER_PPC64 116 23 #define _LIBUNWIND_HIGHEST_DWARF_REGISTER_ARM64 95 24 #define _LIBUNWIND_HIGHEST_DWARF_REGISTER_ARM 287 25 #define _LIBUNWIND_HIGHEST_DWARF_REGISTER_OR1K 32 26 #define _LIBUNWIND_HIGHEST_DWARF_REGISTER_MIPS 65 27 #define _LIBUNWIND_HIGHEST_DWARF_REGISTER_SPARC 31 28 #define _LIBUNWIND_HIGHEST_DWARF_REGISTER_SPARC64 31 29 #define _LIBUNWIND_HIGHEST_DWARF_REGISTER_HEXAGON 34 30 #define _LIBUNWIND_HIGHEST_DWARF_REGISTER_RISCV 64 31 #define _LIBUNWIND_HIGHEST_DWARF_REGISTER_VE 143 32 #define _LIBUNWIND_HIGHEST_DWARF_REGISTER_S390X 83 33 34 #if defined(_LIBUNWIND_IS_NATIVE_ONLY) 35 # if defined(__linux__) 36 # define _LIBUNWIND_TARGET_LINUX 1 37 # endif 38 # if defined(__i386__) 39 # define _LIBUNWIND_TARGET_I386 40 # define _LIBUNWIND_CONTEXT_SIZE 8 41 # define _LIBUNWIND_CURSOR_SIZE 15 42 # define _LIBUNWIND_HIGHEST_DWARF_REGISTER _LIBUNWIND_HIGHEST_DWARF_REGISTER_X86 43 # elif defined(__x86_64__) 44 # define _LIBUNWIND_TARGET_X86_64 1 45 # if defined(_WIN64) 46 # define _LIBUNWIND_CONTEXT_SIZE 54 47 # ifdef __SEH__ 48 # define _LIBUNWIND_CURSOR_SIZE 204 49 # else 50 # define _LIBUNWIND_CURSOR_SIZE 66 51 # endif 52 # else 53 # define _LIBUNWIND_CONTEXT_SIZE 21 54 # define _LIBUNWIND_CURSOR_SIZE 33 55 # endif 56 # define _LIBUNWIND_HIGHEST_DWARF_REGISTER _LIBUNWIND_HIGHEST_DWARF_REGISTER_X86_64 57 # elif defined(__powerpc64__) 58 # define _LIBUNWIND_TARGET_PPC64 1 59 # define _LIBUNWIND_CONTEXT_SIZE 167 60 # define _LIBUNWIND_CURSOR_SIZE 179 61 # define _LIBUNWIND_HIGHEST_DWARF_REGISTER _LIBUNWIND_HIGHEST_DWARF_REGISTER_PPC64 62 # elif defined(__powerpc__) 63 # define _LIBUNWIND_TARGET_PPC 1 64 # define _LIBUNWIND_CONTEXT_SIZE 117 65 # define _LIBUNWIND_CURSOR_SIZE 124 66 # define _LIBUNWIND_HIGHEST_DWARF_REGISTER _LIBUNWIND_HIGHEST_DWARF_REGISTER_PPC 67 # elif defined(__aarch64__) 68 # define _LIBUNWIND_TARGET_AARCH64 1 69 # define _LIBUNWIND_CONTEXT_SIZE 66 70 # if defined(__SEH__) 71 # define _LIBUNWIND_CURSOR_SIZE 164 72 # else 73 # define _LIBUNWIND_CURSOR_SIZE 78 74 # endif 75 # define _LIBUNWIND_HIGHEST_DWARF_REGISTER _LIBUNWIND_HIGHEST_DWARF_REGISTER_ARM64 76 # elif defined(__arm__) 77 # define _LIBUNWIND_TARGET_ARM 1 78 # if defined(__SEH__) 79 # define _LIBUNWIND_CONTEXT_SIZE 42 80 # define _LIBUNWIND_CURSOR_SIZE 80 81 # elif defined(__ARM_WMMX) 82 # define _LIBUNWIND_CONTEXT_SIZE 61 83 # define _LIBUNWIND_CURSOR_SIZE 68 84 # else 85 # define _LIBUNWIND_CONTEXT_SIZE 42 86 # define _LIBUNWIND_CURSOR_SIZE 49 87 # endif 88 # define _LIBUNWIND_HIGHEST_DWARF_REGISTER _LIBUNWIND_HIGHEST_DWARF_REGISTER_ARM 89 # elif defined(__or1k__) 90 # define _LIBUNWIND_TARGET_OR1K 1 91 # define _LIBUNWIND_CONTEXT_SIZE 16 92 # define _LIBUNWIND_CURSOR_SIZE 24 93 # define _LIBUNWIND_HIGHEST_DWARF_REGISTER _LIBUNWIND_HIGHEST_DWARF_REGISTER_OR1K 94 # elif defined(__hexagon__) 95 # define _LIBUNWIND_TARGET_HEXAGON 1 96 // Values here change when : Registers.hpp - hexagon_thread_state_t change 97 # define _LIBUNWIND_CONTEXT_SIZE 18 98 # define _LIBUNWIND_CURSOR_SIZE 24 99 # define _LIBUNWIND_HIGHEST_DWARF_REGISTER _LIBUNWIND_HIGHEST_DWARF_REGISTER_HEXAGON 100 # elif defined(__mips__) 101 # if defined(_ABIO32) && _MIPS_SIM == _ABIO32 102 # define _LIBUNWIND_TARGET_MIPS_O32 1 103 # if defined(__mips_hard_float) 104 # define _LIBUNWIND_CONTEXT_SIZE 50 105 # define _LIBUNWIND_CURSOR_SIZE 57 106 # else 107 # define _LIBUNWIND_CONTEXT_SIZE 18 108 # define _LIBUNWIND_CURSOR_SIZE 24 109 # endif 110 # elif defined(_ABIN32) && _MIPS_SIM == _ABIN32 111 # define _LIBUNWIND_TARGET_MIPS_NEWABI 1 112 # if defined(__mips_hard_float) 113 # define _LIBUNWIND_CONTEXT_SIZE 67 114 # define _LIBUNWIND_CURSOR_SIZE 74 115 # else 116 # define _LIBUNWIND_CONTEXT_SIZE 35 117 # define _LIBUNWIND_CURSOR_SIZE 42 118 # endif 119 # elif defined(_ABI64) && _MIPS_SIM == _ABI64 120 # define _LIBUNWIND_TARGET_MIPS_NEWABI 1 121 # if defined(__mips_hard_float) 122 # define _LIBUNWIND_CONTEXT_SIZE 67 123 # define _LIBUNWIND_CURSOR_SIZE 79 124 # else 125 # define _LIBUNWIND_CONTEXT_SIZE 35 126 # define _LIBUNWIND_CURSOR_SIZE 47 127 # endif 128 # else 129 # error "Unsupported MIPS ABI and/or environment" 130 # endif 131 # define _LIBUNWIND_HIGHEST_DWARF_REGISTER _LIBUNWIND_HIGHEST_DWARF_REGISTER_MIPS 132 #elif defined(__sparc__) && defined(__arch64__) 133 #define _LIBUNWIND_TARGET_SPARC64 1 134 #define _LIBUNWIND_HIGHEST_DWARF_REGISTER \ 135 _LIBUNWIND_HIGHEST_DWARF_REGISTER_SPARC64 136 #define _LIBUNWIND_CONTEXT_SIZE 33 137 #define _LIBUNWIND_CURSOR_SIZE 45 138 # elif defined(__sparc__) 139 #define _LIBUNWIND_TARGET_SPARC 1 140 #define _LIBUNWIND_HIGHEST_DWARF_REGISTER _LIBUNWIND_HIGHEST_DWARF_REGISTER_SPARC 141 #define _LIBUNWIND_CONTEXT_SIZE 16 142 #define _LIBUNWIND_CURSOR_SIZE 23 143 # elif defined(__riscv) 144 # define _LIBUNWIND_TARGET_RISCV 1 145 # if defined(__riscv_flen) 146 # define RISCV_FLEN __riscv_flen 147 # else 148 # define RISCV_FLEN 0 149 # endif 150 # define _LIBUNWIND_CONTEXT_SIZE (32 * (__riscv_xlen + RISCV_FLEN) / 64) 151 # if __riscv_xlen == 32 152 # define _LIBUNWIND_CURSOR_SIZE (_LIBUNWIND_CONTEXT_SIZE + 7) 153 # elif __riscv_xlen == 64 154 # define _LIBUNWIND_CURSOR_SIZE (_LIBUNWIND_CONTEXT_SIZE + 12) 155 # else 156 # error "Unsupported RISC-V ABI" 157 # endif 158 # define _LIBUNWIND_HIGHEST_DWARF_REGISTER _LIBUNWIND_HIGHEST_DWARF_REGISTER_RISCV 159 # elif defined(__ve__) 160 # define _LIBUNWIND_TARGET_VE 1 161 # define _LIBUNWIND_CONTEXT_SIZE 67 162 # define _LIBUNWIND_CURSOR_SIZE 79 163 # define _LIBUNWIND_HIGHEST_DWARF_REGISTER _LIBUNWIND_HIGHEST_DWARF_REGISTER_VE 164 # elif defined(__s390x__) 165 # define _LIBUNWIND_TARGET_S390X 1 166 # define _LIBUNWIND_CONTEXT_SIZE 34 167 # define _LIBUNWIND_CURSOR_SIZE 46 168 # define _LIBUNWIND_HIGHEST_DWARF_REGISTER _LIBUNWIND_HIGHEST_DWARF_REGISTER_S390X 169 # else 170 # error "Unsupported architecture." 171 # endif 172 #else // !_LIBUNWIND_IS_NATIVE_ONLY 173 # define _LIBUNWIND_TARGET_I386 174 # define _LIBUNWIND_TARGET_X86_64 1 175 # define _LIBUNWIND_TARGET_PPC 1 176 # define _LIBUNWIND_TARGET_PPC64 1 177 # define _LIBUNWIND_TARGET_AARCH64 1 178 # define _LIBUNWIND_TARGET_ARM 1 179 # define _LIBUNWIND_TARGET_OR1K 1 180 # define _LIBUNWIND_TARGET_MIPS_O32 1 181 # define _LIBUNWIND_TARGET_MIPS_NEWABI 1 182 # define _LIBUNWIND_TARGET_SPARC 1 183 # define _LIBUNWIND_TARGET_SPARC64 1 184 # define _LIBUNWIND_TARGET_HEXAGON 1 185 # define _LIBUNWIND_TARGET_RISCV 1 186 # define _LIBUNWIND_TARGET_VE 1 187 # define _LIBUNWIND_TARGET_S390X 1 188 # define _LIBUNWIND_CONTEXT_SIZE 167 189 # define _LIBUNWIND_CURSOR_SIZE 179 190 # define _LIBUNWIND_HIGHEST_DWARF_REGISTER 287 191 #endif // _LIBUNWIND_IS_NATIVE_ONLY 192 193 #endif // ____LIBUNWIND_CONFIG_H__ 194