Logan Chien | 5191fe9 | 2015-07-19 15:23:10 +0000 | [diff] [blame] | 1 | //===------------------------- __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__) |
Ranjeet Singh | 5808011 | 2017-03-31 15:28:06 +0000 | [diff] [blame^] | 15 | #define _LIBUNWIND_ARM_EHABI |
Logan Chien | 5191fe9 | 2015-07-19 15:23:10 +0000 | [diff] [blame] | 16 | #endif |
| 17 | |
Asiri Rathnayake | 54387ee | 2016-05-25 12:36:34 +0000 | [diff] [blame] | 18 | #if defined(_LIBUNWIND_IS_NATIVE_ONLY) |
| 19 | # if defined(__i386__) |
Ranjeet Singh | 5808011 | 2017-03-31 15:28:06 +0000 | [diff] [blame^] | 20 | # define _LIBUNWIND_TARGET_I386 |
Asiri Rathnayake | 54387ee | 2016-05-25 12:36:34 +0000 | [diff] [blame] | 21 | # define _LIBUNWIND_CONTEXT_SIZE 8 |
| 22 | # define _LIBUNWIND_CURSOR_SIZE 19 |
Ed Maste | 41020b9 | 2016-07-20 15:19:09 +0000 | [diff] [blame] | 23 | # define _LIBUNWIND_HIGHEST_DWARF_REGISTER 9 |
Asiri Rathnayake | 54387ee | 2016-05-25 12:36:34 +0000 | [diff] [blame] | 24 | # elif defined(__x86_64__) |
| 25 | # define _LIBUNWIND_TARGET_X86_64 1 |
| 26 | # define _LIBUNWIND_CONTEXT_SIZE 21 |
| 27 | # define _LIBUNWIND_CURSOR_SIZE 33 |
Ed Maste | 41020b9 | 2016-07-20 15:19:09 +0000 | [diff] [blame] | 28 | # define _LIBUNWIND_HIGHEST_DWARF_REGISTER 17 |
Asiri Rathnayake | 54387ee | 2016-05-25 12:36:34 +0000 | [diff] [blame] | 29 | # elif defined(__ppc__) |
| 30 | # define _LIBUNWIND_TARGET_PPC 1 |
| 31 | # define _LIBUNWIND_CONTEXT_SIZE 117 |
| 32 | # define _LIBUNWIND_CURSOR_SIZE 128 |
Ed Maste | 41020b9 | 2016-07-20 15:19:09 +0000 | [diff] [blame] | 33 | # define _LIBUNWIND_HIGHEST_DWARF_REGISTER 113 |
Asiri Rathnayake | 54387ee | 2016-05-25 12:36:34 +0000 | [diff] [blame] | 34 | # elif defined(__aarch64__) |
| 35 | # define _LIBUNWIND_TARGET_AARCH64 1 |
| 36 | # define _LIBUNWIND_CONTEXT_SIZE 66 |
| 37 | # define _LIBUNWIND_CURSOR_SIZE 78 |
Ed Maste | 41020b9 | 2016-07-20 15:19:09 +0000 | [diff] [blame] | 38 | # define _LIBUNWIND_HIGHEST_DWARF_REGISTER 96 |
Asiri Rathnayake | 54387ee | 2016-05-25 12:36:34 +0000 | [diff] [blame] | 39 | # elif defined(__arm__) |
| 40 | # define _LIBUNWIND_TARGET_ARM 1 |
Asiri Rathnayake | f33c342 | 2016-07-07 10:55:39 +0000 | [diff] [blame] | 41 | # if defined(__ARM_WMMX) |
| 42 | # define _LIBUNWIND_CONTEXT_SIZE 60 |
| 43 | # define _LIBUNWIND_CURSOR_SIZE 67 |
| 44 | # else |
| 45 | # define _LIBUNWIND_CONTEXT_SIZE 42 |
| 46 | # define _LIBUNWIND_CURSOR_SIZE 49 |
| 47 | # endif |
Ed Maste | 41020b9 | 2016-07-20 15:19:09 +0000 | [diff] [blame] | 48 | # define _LIBUNWIND_HIGHEST_DWARF_REGISTER 96 |
Asiri Rathnayake | 54387ee | 2016-05-25 12:36:34 +0000 | [diff] [blame] | 49 | # elif defined(__or1k__) |
| 50 | # define _LIBUNWIND_TARGET_OR1K 1 |
| 51 | # define _LIBUNWIND_CONTEXT_SIZE 16 |
| 52 | # define _LIBUNWIND_CURSOR_SIZE 28 |
Ed Maste | 41020b9 | 2016-07-20 15:19:09 +0000 | [diff] [blame] | 53 | # define _LIBUNWIND_HIGHEST_DWARF_REGISTER 32 |
Asiri Rathnayake | 54387ee | 2016-05-25 12:36:34 +0000 | [diff] [blame] | 54 | # else |
| 55 | # error "Unsupported architecture." |
| 56 | # endif |
| 57 | #else // !_LIBUNWIND_IS_NATIVE_ONLY |
Ranjeet Singh | 5808011 | 2017-03-31 15:28:06 +0000 | [diff] [blame^] | 58 | # define _LIBUNWIND_TARGET_I386 |
Asiri Rathnayake | 54387ee | 2016-05-25 12:36:34 +0000 | [diff] [blame] | 59 | # define _LIBUNWIND_TARGET_X86_64 1 |
| 60 | # define _LIBUNWIND_TARGET_PPC 1 |
| 61 | # define _LIBUNWIND_TARGET_AARCH64 1 |
| 62 | # define _LIBUNWIND_TARGET_ARM 1 |
| 63 | # define _LIBUNWIND_TARGET_OR1K 1 |
| 64 | # define _LIBUNWIND_CONTEXT_SIZE 128 |
| 65 | # define _LIBUNWIND_CURSOR_SIZE 140 |
Ed Maste | 41020b9 | 2016-07-20 15:19:09 +0000 | [diff] [blame] | 66 | # define _LIBUNWIND_HIGHEST_DWARF_REGISTER 120 |
Asiri Rathnayake | 54387ee | 2016-05-25 12:36:34 +0000 | [diff] [blame] | 67 | #endif // _LIBUNWIND_IS_NATIVE_ONLY |
| 68 | |
Logan Chien | 5191fe9 | 2015-07-19 15:23:10 +0000 | [diff] [blame] | 69 | #endif // ____LIBUNWIND_CONFIG_H__ |