• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===------------------------- __libunwind_config.h -----------------------===//
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 #if defined(__arm__) && !defined(__USING_SJLJ_EXCEPTIONS__) && \
13     !defined(__ARM_DWARF_EH__)
14 #define _LIBUNWIND_ARM_EHABI
15 #endif
16 
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 
27 #if defined(_LIBUNWIND_IS_NATIVE_ONLY)
28 # if defined(__i386__)
29 #  define _LIBUNWIND_TARGET_I386
30 #  define _LIBUNWIND_CONTEXT_SIZE 8
31 #  define _LIBUNWIND_CURSOR_SIZE 15
32 #  define _LIBUNWIND_HIGHEST_DWARF_REGISTER _LIBUNWIND_HIGHEST_DWARF_REGISTER_X86
33 # elif defined(__x86_64__)
34 #  define _LIBUNWIND_TARGET_X86_64 1
35 #  if defined(_WIN64)
36 #    define _LIBUNWIND_CONTEXT_SIZE 54
37 #    ifdef __SEH__
38 #      define _LIBUNWIND_CURSOR_SIZE 204
39 #    else
40 #      define _LIBUNWIND_CURSOR_SIZE 66
41 #    endif
42 #  else
43 #    define _LIBUNWIND_CONTEXT_SIZE 21
44 #    define _LIBUNWIND_CURSOR_SIZE 33
45 #  endif
46 #  define _LIBUNWIND_HIGHEST_DWARF_REGISTER _LIBUNWIND_HIGHEST_DWARF_REGISTER_X86_64
47 # elif defined(__powerpc64__)
48 #  define _LIBUNWIND_TARGET_PPC64 1
49 #  define _LIBUNWIND_CONTEXT_SIZE 167
50 #  define _LIBUNWIND_CURSOR_SIZE 179
51 #  define _LIBUNWIND_HIGHEST_DWARF_REGISTER _LIBUNWIND_HIGHEST_DWARF_REGISTER_PPC64
52 # elif defined(__ppc__)
53 #  define _LIBUNWIND_TARGET_PPC 1
54 #  define _LIBUNWIND_CONTEXT_SIZE 117
55 #  define _LIBUNWIND_CURSOR_SIZE 124
56 #  define _LIBUNWIND_HIGHEST_DWARF_REGISTER _LIBUNWIND_HIGHEST_DWARF_REGISTER_PPC
57 # elif defined(__aarch64__)
58 #  define _LIBUNWIND_TARGET_AARCH64 1
59 #  define _LIBUNWIND_CONTEXT_SIZE 66
60 #  if defined(__SEH__)
61 #    define _LIBUNWIND_CURSOR_SIZE 164
62 #  else
63 #    define _LIBUNWIND_CURSOR_SIZE 78
64 #  endif
65 #  define _LIBUNWIND_HIGHEST_DWARF_REGISTER _LIBUNWIND_HIGHEST_DWARF_REGISTER_ARM64
66 # elif defined(__arm__)
67 #  define _LIBUNWIND_TARGET_ARM 1
68 #  if defined(__SEH__)
69 #    define _LIBUNWIND_CONTEXT_SIZE 42
70 #    define _LIBUNWIND_CURSOR_SIZE 80
71 #  elif defined(__ARM_WMMX)
72 #    define _LIBUNWIND_CONTEXT_SIZE 61
73 #    define _LIBUNWIND_CURSOR_SIZE 68
74 #  else
75 #    define _LIBUNWIND_CONTEXT_SIZE 42
76 #    define _LIBUNWIND_CURSOR_SIZE 49
77 #  endif
78 #  define _LIBUNWIND_HIGHEST_DWARF_REGISTER _LIBUNWIND_HIGHEST_DWARF_REGISTER_ARM
79 # elif defined(__or1k__)
80 #  define _LIBUNWIND_TARGET_OR1K 1
81 #  define _LIBUNWIND_CONTEXT_SIZE 16
82 #  define _LIBUNWIND_CURSOR_SIZE 24
83 #  define _LIBUNWIND_HIGHEST_DWARF_REGISTER _LIBUNWIND_HIGHEST_DWARF_REGISTER_OR1K
84 # elif defined(__mips__)
85 #  if defined(_ABIO32) && _MIPS_SIM == _ABIO32
86 #    define _LIBUNWIND_TARGET_MIPS_O32 1
87 #    if defined(__mips_hard_float)
88 #      define _LIBUNWIND_CONTEXT_SIZE 50
89 #      define _LIBUNWIND_CURSOR_SIZE 57
90 #    else
91 #      define _LIBUNWIND_CONTEXT_SIZE 18
92 #      define _LIBUNWIND_CURSOR_SIZE 24
93 #    endif
94 #  elif defined(_ABIN32) && _MIPS_SIM == _ABIN32
95 #    define _LIBUNWIND_TARGET_MIPS_NEWABI 1
96 #    if defined(__mips_hard_float)
97 #      define _LIBUNWIND_CONTEXT_SIZE 67
98 #      define _LIBUNWIND_CURSOR_SIZE 74
99 #    else
100 #      define _LIBUNWIND_CONTEXT_SIZE 35
101 #      define _LIBUNWIND_CURSOR_SIZE 42
102 #    endif
103 #  elif defined(_ABI64) && _MIPS_SIM == _ABI64
104 #    define _LIBUNWIND_TARGET_MIPS_NEWABI 1
105 #    if defined(__mips_hard_float)
106 #      define _LIBUNWIND_CONTEXT_SIZE 67
107 #      define _LIBUNWIND_CURSOR_SIZE 79
108 #    else
109 #      define _LIBUNWIND_CONTEXT_SIZE 35
110 #      define _LIBUNWIND_CURSOR_SIZE 47
111 #    endif
112 #  else
113 #    error "Unsupported MIPS ABI and/or environment"
114 #  endif
115 #  define _LIBUNWIND_HIGHEST_DWARF_REGISTER _LIBUNWIND_HIGHEST_DWARF_REGISTER_MIPS
116 # elif defined(__sparc__)
117   #define _LIBUNWIND_TARGET_SPARC 1
118   #define _LIBUNWIND_HIGHEST_DWARF_REGISTER _LIBUNWIND_HIGHEST_DWARF_REGISTER_SPARC
119   #define _LIBUNWIND_CONTEXT_SIZE 16
120   #define _LIBUNWIND_CURSOR_SIZE 23
121 # else
122 #  error "Unsupported architecture."
123 # endif
124 #else // !_LIBUNWIND_IS_NATIVE_ONLY
125 # define _LIBUNWIND_TARGET_I386
126 # define _LIBUNWIND_TARGET_X86_64 1
127 # define _LIBUNWIND_TARGET_PPC 1
128 # define _LIBUNWIND_TARGET_PPC64 1
129 # define _LIBUNWIND_TARGET_AARCH64 1
130 # define _LIBUNWIND_TARGET_ARM 1
131 # define _LIBUNWIND_TARGET_OR1K 1
132 # define _LIBUNWIND_TARGET_MIPS_O32 1
133 # define _LIBUNWIND_TARGET_MIPS_NEWABI 1
134 # define _LIBUNWIND_TARGET_SPARC 1
135 # define _LIBUNWIND_CONTEXT_SIZE 167
136 # define _LIBUNWIND_CURSOR_SIZE 179
137 # define _LIBUNWIND_HIGHEST_DWARF_REGISTER 287
138 #endif // _LIBUNWIND_IS_NATIVE_ONLY
139 
140 #endif // ____LIBUNWIND_CONFIG_H__
141