1 //===------------------------- __libunwind_config.h -----------------------===//
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
7 //===----------------------------------------------------------------------===//
9 #ifndef ____LIBUNWIND_CONFIG_H__
10 #define ____LIBUNWIND_CONFIG_H__
12 #if defined(__arm__) && !defined(__USING_SJLJ_EXCEPTIONS__) && \
13 !defined(__ARM_DWARF_EH__)
14 #define _LIBUNWIND_ARM_EHABI
17 #define _LIBUNWIND_HIGHEST_DWARF_REGISTER_X86 8
18 #define _LIBUNWIND_HIGHEST_DWARF_REGISTER_X86_64 32
19 #define _LIBUNWIND_HIGHEST_DWARF_REGISTER_PPC 112
20 #define _LIBUNWIND_HIGHEST_DWARF_REGISTER_PPC64 116
21 #define _LIBUNWIND_HIGHEST_DWARF_REGISTER_ARM64 95
22 #define _LIBUNWIND_HIGHEST_DWARF_REGISTER_ARM 287
23 #define _LIBUNWIND_HIGHEST_DWARF_REGISTER_OR1K 32
24 #define _LIBUNWIND_HIGHEST_DWARF_REGISTER_MIPS 65
25 #define _LIBUNWIND_HIGHEST_DWARF_REGISTER_SPARC 31
26 #define _LIBUNWIND_HIGHEST_DWARF_REGISTER_RISCV 64
28 #if defined(_LIBUNWIND_IS_NATIVE_ONLY)
29 # if defined(__i386__)
30 # define _LIBUNWIND_TARGET_I386
31 # define _LIBUNWIND_CONTEXT_SIZE 8
32 # define _LIBUNWIND_CURSOR_SIZE 15
33 # define _LIBUNWIND_HIGHEST_DWARF_REGISTER _LIBUNWIND_HIGHEST_DWARF_REGISTER_X86
34 # elif defined(__x86_64__)
35 # define _LIBUNWIND_TARGET_X86_64 1
37 # define _LIBUNWIND_CONTEXT_SIZE 54
39 # define _LIBUNWIND_CURSOR_SIZE 204
41 # define _LIBUNWIND_CURSOR_SIZE 66
44 # define _LIBUNWIND_CONTEXT_SIZE 21
45 # define _LIBUNWIND_CURSOR_SIZE 33
47 # define _LIBUNWIND_HIGHEST_DWARF_REGISTER _LIBUNWIND_HIGHEST_DWARF_REGISTER_X86_64
48 # elif defined(__powerpc64__)
49 # define _LIBUNWIND_TARGET_PPC64 1
50 # define _LIBUNWIND_CONTEXT_SIZE 167
51 # define _LIBUNWIND_CURSOR_SIZE 179
52 # define _LIBUNWIND_HIGHEST_DWARF_REGISTER _LIBUNWIND_HIGHEST_DWARF_REGISTER_PPC64
53 # elif defined(__ppc__)
54 # define _LIBUNWIND_TARGET_PPC 1
55 # define _LIBUNWIND_CONTEXT_SIZE 117
56 # define _LIBUNWIND_CURSOR_SIZE 124
57 # define _LIBUNWIND_HIGHEST_DWARF_REGISTER _LIBUNWIND_HIGHEST_DWARF_REGISTER_PPC
58 # elif defined(__aarch64__)
59 # define _LIBUNWIND_TARGET_AARCH64 1
60 # define _LIBUNWIND_CONTEXT_SIZE 66
62 # define _LIBUNWIND_CURSOR_SIZE 164
64 # define _LIBUNWIND_CURSOR_SIZE 78
66 # define _LIBUNWIND_HIGHEST_DWARF_REGISTER _LIBUNWIND_HIGHEST_DWARF_REGISTER_ARM64
67 # elif defined(__arm__)
68 # define _LIBUNWIND_TARGET_ARM 1
70 # define _LIBUNWIND_CONTEXT_SIZE 42
71 # define _LIBUNWIND_CURSOR_SIZE 80
72 # elif defined(__ARM_WMMX)
73 # define _LIBUNWIND_CONTEXT_SIZE 61
74 # define _LIBUNWIND_CURSOR_SIZE 68
76 # define _LIBUNWIND_CONTEXT_SIZE 42
77 # define _LIBUNWIND_CURSOR_SIZE 49
79 # define _LIBUNWIND_HIGHEST_DWARF_REGISTER _LIBUNWIND_HIGHEST_DWARF_REGISTER_ARM
80 # elif defined(__or1k__)
81 # define _LIBUNWIND_TARGET_OR1K 1
82 # define _LIBUNWIND_CONTEXT_SIZE 16
83 # define _LIBUNWIND_CURSOR_SIZE 24
84 # define _LIBUNWIND_HIGHEST_DWARF_REGISTER _LIBUNWIND_HIGHEST_DWARF_REGISTER_OR1K
85 # elif defined(__mips__)
86 # if defined(_ABIO32) && _MIPS_SIM == _ABIO32
87 # define _LIBUNWIND_TARGET_MIPS_O32 1
88 # if defined(__mips_hard_float)
89 # define _LIBUNWIND_CONTEXT_SIZE 50
90 # define _LIBUNWIND_CURSOR_SIZE 57
92 # define _LIBUNWIND_CONTEXT_SIZE 18
93 # define _LIBUNWIND_CURSOR_SIZE 24
95 # elif defined(_ABIN32) && _MIPS_SIM == _ABIN32
96 # define _LIBUNWIND_TARGET_MIPS_NEWABI 1
97 # if defined(__mips_hard_float)
98 # define _LIBUNWIND_CONTEXT_SIZE 67
99 # define _LIBUNWIND_CURSOR_SIZE 74
101 # define _LIBUNWIND_CONTEXT_SIZE 35
102 # define _LIBUNWIND_CURSOR_SIZE 42
104 # elif defined(_ABI64) && _MIPS_SIM == _ABI64
105 # define _LIBUNWIND_TARGET_MIPS_NEWABI 1
106 # if defined(__mips_hard_float)
107 # define _LIBUNWIND_CONTEXT_SIZE 67
108 # define _LIBUNWIND_CURSOR_SIZE 79
110 # define _LIBUNWIND_CONTEXT_SIZE 35
111 # define _LIBUNWIND_CURSOR_SIZE 47
114 # error "Unsupported MIPS ABI and/or environment"
116 # define _LIBUNWIND_HIGHEST_DWARF_REGISTER _LIBUNWIND_HIGHEST_DWARF_REGISTER_MIPS
117 # elif defined(__sparc__)
118 #define _LIBUNWIND_TARGET_SPARC 1
119 #define _LIBUNWIND_HIGHEST_DWARF_REGISTER _LIBUNWIND_HIGHEST_DWARF_REGISTER_SPARC
120 #define _LIBUNWIND_CONTEXT_SIZE 16
121 #define _LIBUNWIND_CURSOR_SIZE 23
122 # elif defined(__riscv)
123 # if __riscv_xlen == 64
124 # define _LIBUNWIND_TARGET_RISCV 1
125 # define _LIBUNWIND_CONTEXT_SIZE 64
126 # define _LIBUNWIND_CURSOR_SIZE 76
128 # error "Unsupported RISC-V ABI"
130 # define _LIBUNWIND_HIGHEST_DWARF_REGISTER _LIBUNWIND_HIGHEST_DWARF_REGISTER_RISCV
132 # error "Unsupported architecture."
134 #else // !_LIBUNWIND_IS_NATIVE_ONLY
135 # define _LIBUNWIND_TARGET_I386
136 # define _LIBUNWIND_TARGET_X86_64 1
137 # define _LIBUNWIND_TARGET_PPC 1
138 # define _LIBUNWIND_TARGET_PPC64 1
139 # define _LIBUNWIND_TARGET_AARCH64 1
140 # define _LIBUNWIND_TARGET_ARM 1
141 # define _LIBUNWIND_TARGET_OR1K 1
142 # define _LIBUNWIND_TARGET_MIPS_O32 1
143 # define _LIBUNWIND_TARGET_MIPS_NEWABI 1
144 # define _LIBUNWIND_TARGET_SPARC 1
145 # define _LIBUNWIND_TARGET_RISCV 1
146 # define _LIBUNWIND_CONTEXT_SIZE 167
147 # define _LIBUNWIND_CURSOR_SIZE 179
148 # define _LIBUNWIND_HIGHEST_DWARF_REGISTER 287
149 #endif // _LIBUNWIND_IS_NATIVE_ONLY
151 #endif // ____LIBUNWIND_CONFIG_H__