blob: 65e6eb5c93044d8781bd5422638e24c50980562c [file] [log] [blame]
Logan Chien5191fe92015-07-19 15:23:10 +00001//===------------------------- __libunwind_config.h -----------------------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is dual licensed under the MIT and the University of Illinois Open
6// Source Licenses. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10#ifndef ____LIBUNWIND_CONFIG_H__
11#define ____LIBUNWIND_CONFIG_H__
12
13#if defined(__arm__) && !defined(__USING_SJLJ_EXCEPTIONS__) && \
14 !defined(__ARM_DWARF_EH__)
15#define _LIBUNWIND_ARM_EHABI 1
16#else
17#define _LIBUNWIND_ARM_EHABI 0
18#endif
19
Asiri Rathnayake54387ee2016-05-25 12:36:34 +000020#if defined(_LIBUNWIND_IS_NATIVE_ONLY)
21# if defined(__i386__)
22# define _LIBUNWIND_TARGET_I386 1
23# define _LIBUNWIND_CONTEXT_SIZE 8
24# define _LIBUNWIND_CURSOR_SIZE 19
25# elif defined(__x86_64__)
26# define _LIBUNWIND_TARGET_X86_64 1
27# define _LIBUNWIND_CONTEXT_SIZE 21
28# define _LIBUNWIND_CURSOR_SIZE 33
29# elif defined(__ppc__)
30# define _LIBUNWIND_TARGET_PPC 1
31# define _LIBUNWIND_CONTEXT_SIZE 117
32# define _LIBUNWIND_CURSOR_SIZE 128
33# elif defined(__aarch64__)
34# define _LIBUNWIND_TARGET_AARCH64 1
35# define _LIBUNWIND_CONTEXT_SIZE 66
36# define _LIBUNWIND_CURSOR_SIZE 78
37# elif defined(__arm__)
38# define _LIBUNWIND_TARGET_ARM 1
Asiri Rathnayakef33c3422016-07-07 10:55:39 +000039# if defined(__ARM_WMMX)
40# define _LIBUNWIND_CONTEXT_SIZE 60
41# define _LIBUNWIND_CURSOR_SIZE 67
42# else
43# define _LIBUNWIND_CONTEXT_SIZE 42
44# define _LIBUNWIND_CURSOR_SIZE 49
45# endif
Asiri Rathnayake54387ee2016-05-25 12:36:34 +000046# elif defined(__or1k__)
47# define _LIBUNWIND_TARGET_OR1K 1
48# define _LIBUNWIND_CONTEXT_SIZE 16
49# define _LIBUNWIND_CURSOR_SIZE 28
50# else
51# error "Unsupported architecture."
52# endif
53#else // !_LIBUNWIND_IS_NATIVE_ONLY
54# define _LIBUNWIND_TARGET_I386 1
55# define _LIBUNWIND_TARGET_X86_64 1
56# define _LIBUNWIND_TARGET_PPC 1
57# define _LIBUNWIND_TARGET_AARCH64 1
58# define _LIBUNWIND_TARGET_ARM 1
59# define _LIBUNWIND_TARGET_OR1K 1
60# define _LIBUNWIND_CONTEXT_SIZE 128
61# define _LIBUNWIND_CURSOR_SIZE 140
62#endif // _LIBUNWIND_IS_NATIVE_ONLY
63
Logan Chien5191fe92015-07-19 15:23:10 +000064#endif // ____LIBUNWIND_CONFIG_H__