xref: /freebsd/contrib/llvm-project/libunwind/include/libunwind.h (revision 349cc55c9796c4596a5b9904cd3281af295f878f)
1*349cc55cSDimitry Andric //===----------------------------------------------------------------------===//
20b57cec5SDimitry Andric //
30b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
40b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
50b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
60b57cec5SDimitry Andric //
70b57cec5SDimitry Andric //
80b57cec5SDimitry Andric // Compatible with libunwind API documented at:
90b57cec5SDimitry Andric //   http://www.nongnu.org/libunwind/man/libunwind(3).html
100b57cec5SDimitry Andric //
110b57cec5SDimitry Andric //===----------------------------------------------------------------------===//
120b57cec5SDimitry Andric 
130b57cec5SDimitry Andric #ifndef __LIBUNWIND__
140b57cec5SDimitry Andric #define __LIBUNWIND__
150b57cec5SDimitry Andric 
160b57cec5SDimitry Andric #include <__libunwind_config.h>
170b57cec5SDimitry Andric 
180b57cec5SDimitry Andric #include <stdint.h>
190b57cec5SDimitry Andric #include <stddef.h>
200b57cec5SDimitry Andric 
210b57cec5SDimitry Andric #ifdef __APPLE__
220b57cec5SDimitry Andric   #if __clang__
230b57cec5SDimitry Andric     #if __has_include(<Availability.h>)
240b57cec5SDimitry Andric       #include <Availability.h>
250b57cec5SDimitry Andric     #endif
260b57cec5SDimitry Andric   #elif __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1050
270b57cec5SDimitry Andric     #include <Availability.h>
280b57cec5SDimitry Andric   #endif
290b57cec5SDimitry Andric 
300b57cec5SDimitry Andric   #ifdef __arm__
310b57cec5SDimitry Andric      #define LIBUNWIND_AVAIL __attribute__((unavailable))
320b57cec5SDimitry Andric   #elif defined(__OSX_AVAILABLE_STARTING)
330b57cec5SDimitry Andric     #define LIBUNWIND_AVAIL __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_5_0)
340b57cec5SDimitry Andric   #else
350b57cec5SDimitry Andric     #include <AvailabilityMacros.h>
360b57cec5SDimitry Andric     #ifdef AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
370b57cec5SDimitry Andric       #define LIBUNWIND_AVAIL AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
380b57cec5SDimitry Andric     #else
390b57cec5SDimitry Andric       #define LIBUNWIND_AVAIL __attribute__((unavailable))
400b57cec5SDimitry Andric     #endif
410b57cec5SDimitry Andric   #endif
420b57cec5SDimitry Andric #else
430b57cec5SDimitry Andric   #define LIBUNWIND_AVAIL
440b57cec5SDimitry Andric #endif
450b57cec5SDimitry Andric 
46e8d8bef9SDimitry Andric #if defined(_WIN32) && defined(__SEH__)
47e8d8bef9SDimitry Andric   #define LIBUNWIND_CURSOR_ALIGNMENT_ATTR __attribute__((__aligned__(16)))
48e8d8bef9SDimitry Andric #else
49e8d8bef9SDimitry Andric   #define LIBUNWIND_CURSOR_ALIGNMENT_ATTR
50e8d8bef9SDimitry Andric #endif
51e8d8bef9SDimitry Andric 
520b57cec5SDimitry Andric /* error codes */
530b57cec5SDimitry Andric enum {
540b57cec5SDimitry Andric   UNW_ESUCCESS      = 0,     /* no error */
550b57cec5SDimitry Andric   UNW_EUNSPEC       = -6540, /* unspecified (general) error */
560b57cec5SDimitry Andric   UNW_ENOMEM        = -6541, /* out of memory */
570b57cec5SDimitry Andric   UNW_EBADREG       = -6542, /* bad register number */
580b57cec5SDimitry Andric   UNW_EREADONLYREG  = -6543, /* attempt to write read-only register */
590b57cec5SDimitry Andric   UNW_ESTOPUNWIND   = -6544, /* stop unwinding */
600b57cec5SDimitry Andric   UNW_EINVALIDIP    = -6545, /* invalid IP */
610b57cec5SDimitry Andric   UNW_EBADFRAME     = -6546, /* bad frame */
620b57cec5SDimitry Andric   UNW_EINVAL        = -6547, /* unsupported operation or bad value */
630b57cec5SDimitry Andric   UNW_EBADVERSION   = -6548, /* unwind info has unsupported version */
640b57cec5SDimitry Andric   UNW_ENOINFO       = -6549  /* no unwind info found */
650b57cec5SDimitry Andric #if defined(_LIBUNWIND_TARGET_AARCH64) && !defined(_LIBUNWIND_IS_NATIVE_ONLY)
660b57cec5SDimitry Andric   , UNW_ECROSSRASIGNING = -6550 /* cross unwind with return address signing */
670b57cec5SDimitry Andric #endif
680b57cec5SDimitry Andric };
690b57cec5SDimitry Andric 
700b57cec5SDimitry Andric struct unw_context_t {
710b57cec5SDimitry Andric   uint64_t data[_LIBUNWIND_CONTEXT_SIZE];
720b57cec5SDimitry Andric };
730b57cec5SDimitry Andric typedef struct unw_context_t unw_context_t;
740b57cec5SDimitry Andric 
750b57cec5SDimitry Andric struct unw_cursor_t {
760b57cec5SDimitry Andric   uint64_t data[_LIBUNWIND_CURSOR_SIZE];
77e8d8bef9SDimitry Andric } LIBUNWIND_CURSOR_ALIGNMENT_ATTR;
780b57cec5SDimitry Andric typedef struct unw_cursor_t unw_cursor_t;
790b57cec5SDimitry Andric 
800b57cec5SDimitry Andric typedef struct unw_addr_space *unw_addr_space_t;
810b57cec5SDimitry Andric 
820b57cec5SDimitry Andric typedef int unw_regnum_t;
830b57cec5SDimitry Andric typedef uintptr_t unw_word_t;
840b57cec5SDimitry Andric #if defined(__arm__) && !defined(__ARM_DWARF_EH__)
850b57cec5SDimitry Andric typedef uint64_t unw_fpreg_t;
860b57cec5SDimitry Andric #else
870b57cec5SDimitry Andric typedef double unw_fpreg_t;
880b57cec5SDimitry Andric #endif
890b57cec5SDimitry Andric 
900b57cec5SDimitry Andric struct unw_proc_info_t {
910b57cec5SDimitry Andric   unw_word_t  start_ip;         /* start address of function */
920b57cec5SDimitry Andric   unw_word_t  end_ip;           /* address after end of function */
930b57cec5SDimitry Andric   unw_word_t  lsda;             /* address of language specific data area, */
940b57cec5SDimitry Andric                                 /*  or zero if not used */
950b57cec5SDimitry Andric   unw_word_t  handler;          /* personality routine, or zero if not used */
960b57cec5SDimitry Andric   unw_word_t  gp;               /* not used */
970b57cec5SDimitry Andric   unw_word_t  flags;            /* not used */
980b57cec5SDimitry Andric   uint32_t    format;           /* compact unwind encoding, or zero if none */
990b57cec5SDimitry Andric   uint32_t    unwind_info_size; /* size of DWARF unwind info, or zero if none */
1000b57cec5SDimitry Andric   unw_word_t  unwind_info;      /* address of DWARF unwind info, or zero */
1010b57cec5SDimitry Andric   unw_word_t  extra;            /* mach_header of mach-o image containing func */
1020b57cec5SDimitry Andric };
1030b57cec5SDimitry Andric typedef struct unw_proc_info_t unw_proc_info_t;
1040b57cec5SDimitry Andric 
1050b57cec5SDimitry Andric #ifdef __cplusplus
1060b57cec5SDimitry Andric extern "C" {
1070b57cec5SDimitry Andric #endif
1080b57cec5SDimitry Andric 
1090b57cec5SDimitry Andric extern int unw_getcontext(unw_context_t *) LIBUNWIND_AVAIL;
1100b57cec5SDimitry Andric extern int unw_init_local(unw_cursor_t *, unw_context_t *) LIBUNWIND_AVAIL;
1110b57cec5SDimitry Andric extern int unw_step(unw_cursor_t *) LIBUNWIND_AVAIL;
1120b57cec5SDimitry Andric extern int unw_get_reg(unw_cursor_t *, unw_regnum_t, unw_word_t *) LIBUNWIND_AVAIL;
1130b57cec5SDimitry Andric extern int unw_get_fpreg(unw_cursor_t *, unw_regnum_t, unw_fpreg_t *) LIBUNWIND_AVAIL;
1140b57cec5SDimitry Andric extern int unw_set_reg(unw_cursor_t *, unw_regnum_t, unw_word_t) LIBUNWIND_AVAIL;
1150b57cec5SDimitry Andric extern int unw_set_fpreg(unw_cursor_t *, unw_regnum_t, unw_fpreg_t)  LIBUNWIND_AVAIL;
1160b57cec5SDimitry Andric extern int unw_resume(unw_cursor_t *) LIBUNWIND_AVAIL;
1170b57cec5SDimitry Andric 
1180b57cec5SDimitry Andric #ifdef __arm__
1190b57cec5SDimitry Andric /* Save VFP registers in FSTMX format (instead of FSTMD). */
1200b57cec5SDimitry Andric extern void unw_save_vfp_as_X(unw_cursor_t *) LIBUNWIND_AVAIL;
1210b57cec5SDimitry Andric #endif
1220b57cec5SDimitry Andric 
1230b57cec5SDimitry Andric 
1240b57cec5SDimitry Andric extern const char *unw_regname(unw_cursor_t *, unw_regnum_t) LIBUNWIND_AVAIL;
1250b57cec5SDimitry Andric extern int unw_get_proc_info(unw_cursor_t *, unw_proc_info_t *) LIBUNWIND_AVAIL;
1260b57cec5SDimitry Andric extern int unw_is_fpreg(unw_cursor_t *, unw_regnum_t) LIBUNWIND_AVAIL;
1270b57cec5SDimitry Andric extern int unw_is_signal_frame(unw_cursor_t *) LIBUNWIND_AVAIL;
1280b57cec5SDimitry Andric extern int unw_get_proc_name(unw_cursor_t *, char *, size_t, unw_word_t *) LIBUNWIND_AVAIL;
1290b57cec5SDimitry Andric //extern int       unw_get_save_loc(unw_cursor_t*, int, unw_save_loc_t*);
1300b57cec5SDimitry Andric 
1310b57cec5SDimitry Andric extern unw_addr_space_t unw_local_addr_space;
1320b57cec5SDimitry Andric 
1330b57cec5SDimitry Andric #ifdef __cplusplus
1340b57cec5SDimitry Andric }
1350b57cec5SDimitry Andric #endif
1360b57cec5SDimitry Andric 
1370b57cec5SDimitry Andric // architecture independent register numbers
1380b57cec5SDimitry Andric enum {
1390b57cec5SDimitry Andric   UNW_REG_IP = -1, // instruction pointer
1400b57cec5SDimitry Andric   UNW_REG_SP = -2, // stack pointer
1410b57cec5SDimitry Andric };
1420b57cec5SDimitry Andric 
1430b57cec5SDimitry Andric // 32-bit x86 registers
1440b57cec5SDimitry Andric enum {
1450b57cec5SDimitry Andric   UNW_X86_EAX = 0,
1460b57cec5SDimitry Andric   UNW_X86_ECX = 1,
1470b57cec5SDimitry Andric   UNW_X86_EDX = 2,
1480b57cec5SDimitry Andric   UNW_X86_EBX = 3,
1490b57cec5SDimitry Andric   UNW_X86_EBP = 4,
1500b57cec5SDimitry Andric   UNW_X86_ESP = 5,
1510b57cec5SDimitry Andric   UNW_X86_ESI = 6,
1520b57cec5SDimitry Andric   UNW_X86_EDI = 7
1530b57cec5SDimitry Andric };
1540b57cec5SDimitry Andric 
1550b57cec5SDimitry Andric // 64-bit x86_64 registers
1560b57cec5SDimitry Andric enum {
1570b57cec5SDimitry Andric   UNW_X86_64_RAX = 0,
1580b57cec5SDimitry Andric   UNW_X86_64_RDX = 1,
1590b57cec5SDimitry Andric   UNW_X86_64_RCX = 2,
1600b57cec5SDimitry Andric   UNW_X86_64_RBX = 3,
1610b57cec5SDimitry Andric   UNW_X86_64_RSI = 4,
1620b57cec5SDimitry Andric   UNW_X86_64_RDI = 5,
1630b57cec5SDimitry Andric   UNW_X86_64_RBP = 6,
1640b57cec5SDimitry Andric   UNW_X86_64_RSP = 7,
1650b57cec5SDimitry Andric   UNW_X86_64_R8  = 8,
1660b57cec5SDimitry Andric   UNW_X86_64_R9  = 9,
1670b57cec5SDimitry Andric   UNW_X86_64_R10 = 10,
1680b57cec5SDimitry Andric   UNW_X86_64_R11 = 11,
1690b57cec5SDimitry Andric   UNW_X86_64_R12 = 12,
1700b57cec5SDimitry Andric   UNW_X86_64_R13 = 13,
1710b57cec5SDimitry Andric   UNW_X86_64_R14 = 14,
1720b57cec5SDimitry Andric   UNW_X86_64_R15 = 15,
1730b57cec5SDimitry Andric   UNW_X86_64_RIP = 16,
1740b57cec5SDimitry Andric   UNW_X86_64_XMM0 = 17,
1750b57cec5SDimitry Andric   UNW_X86_64_XMM1 = 18,
1760b57cec5SDimitry Andric   UNW_X86_64_XMM2 = 19,
1770b57cec5SDimitry Andric   UNW_X86_64_XMM3 = 20,
1780b57cec5SDimitry Andric   UNW_X86_64_XMM4 = 21,
1790b57cec5SDimitry Andric   UNW_X86_64_XMM5 = 22,
1800b57cec5SDimitry Andric   UNW_X86_64_XMM6 = 23,
1810b57cec5SDimitry Andric   UNW_X86_64_XMM7 = 24,
1820b57cec5SDimitry Andric   UNW_X86_64_XMM8 = 25,
1830b57cec5SDimitry Andric   UNW_X86_64_XMM9 = 26,
1840b57cec5SDimitry Andric   UNW_X86_64_XMM10 = 27,
1850b57cec5SDimitry Andric   UNW_X86_64_XMM11 = 28,
1860b57cec5SDimitry Andric   UNW_X86_64_XMM12 = 29,
1870b57cec5SDimitry Andric   UNW_X86_64_XMM13 = 30,
1880b57cec5SDimitry Andric   UNW_X86_64_XMM14 = 31,
1890b57cec5SDimitry Andric   UNW_X86_64_XMM15 = 32,
1900b57cec5SDimitry Andric };
1910b57cec5SDimitry Andric 
1920b57cec5SDimitry Andric 
1930b57cec5SDimitry Andric // 32-bit ppc register numbers
1940b57cec5SDimitry Andric enum {
1950b57cec5SDimitry Andric   UNW_PPC_R0  = 0,
1960b57cec5SDimitry Andric   UNW_PPC_R1  = 1,
1970b57cec5SDimitry Andric   UNW_PPC_R2  = 2,
1980b57cec5SDimitry Andric   UNW_PPC_R3  = 3,
1990b57cec5SDimitry Andric   UNW_PPC_R4  = 4,
2000b57cec5SDimitry Andric   UNW_PPC_R5  = 5,
2010b57cec5SDimitry Andric   UNW_PPC_R6  = 6,
2020b57cec5SDimitry Andric   UNW_PPC_R7  = 7,
2030b57cec5SDimitry Andric   UNW_PPC_R8  = 8,
2040b57cec5SDimitry Andric   UNW_PPC_R9  = 9,
2050b57cec5SDimitry Andric   UNW_PPC_R10 = 10,
2060b57cec5SDimitry Andric   UNW_PPC_R11 = 11,
2070b57cec5SDimitry Andric   UNW_PPC_R12 = 12,
2080b57cec5SDimitry Andric   UNW_PPC_R13 = 13,
2090b57cec5SDimitry Andric   UNW_PPC_R14 = 14,
2100b57cec5SDimitry Andric   UNW_PPC_R15 = 15,
2110b57cec5SDimitry Andric   UNW_PPC_R16 = 16,
2120b57cec5SDimitry Andric   UNW_PPC_R17 = 17,
2130b57cec5SDimitry Andric   UNW_PPC_R18 = 18,
2140b57cec5SDimitry Andric   UNW_PPC_R19 = 19,
2150b57cec5SDimitry Andric   UNW_PPC_R20 = 20,
2160b57cec5SDimitry Andric   UNW_PPC_R21 = 21,
2170b57cec5SDimitry Andric   UNW_PPC_R22 = 22,
2180b57cec5SDimitry Andric   UNW_PPC_R23 = 23,
2190b57cec5SDimitry Andric   UNW_PPC_R24 = 24,
2200b57cec5SDimitry Andric   UNW_PPC_R25 = 25,
2210b57cec5SDimitry Andric   UNW_PPC_R26 = 26,
2220b57cec5SDimitry Andric   UNW_PPC_R27 = 27,
2230b57cec5SDimitry Andric   UNW_PPC_R28 = 28,
2240b57cec5SDimitry Andric   UNW_PPC_R29 = 29,
2250b57cec5SDimitry Andric   UNW_PPC_R30 = 30,
2260b57cec5SDimitry Andric   UNW_PPC_R31 = 31,
2270b57cec5SDimitry Andric   UNW_PPC_F0  = 32,
2280b57cec5SDimitry Andric   UNW_PPC_F1  = 33,
2290b57cec5SDimitry Andric   UNW_PPC_F2  = 34,
2300b57cec5SDimitry Andric   UNW_PPC_F3  = 35,
2310b57cec5SDimitry Andric   UNW_PPC_F4  = 36,
2320b57cec5SDimitry Andric   UNW_PPC_F5  = 37,
2330b57cec5SDimitry Andric   UNW_PPC_F6  = 38,
2340b57cec5SDimitry Andric   UNW_PPC_F7  = 39,
2350b57cec5SDimitry Andric   UNW_PPC_F8  = 40,
2360b57cec5SDimitry Andric   UNW_PPC_F9  = 41,
2370b57cec5SDimitry Andric   UNW_PPC_F10 = 42,
2380b57cec5SDimitry Andric   UNW_PPC_F11 = 43,
2390b57cec5SDimitry Andric   UNW_PPC_F12 = 44,
2400b57cec5SDimitry Andric   UNW_PPC_F13 = 45,
2410b57cec5SDimitry Andric   UNW_PPC_F14 = 46,
2420b57cec5SDimitry Andric   UNW_PPC_F15 = 47,
2430b57cec5SDimitry Andric   UNW_PPC_F16 = 48,
2440b57cec5SDimitry Andric   UNW_PPC_F17 = 49,
2450b57cec5SDimitry Andric   UNW_PPC_F18 = 50,
2460b57cec5SDimitry Andric   UNW_PPC_F19 = 51,
2470b57cec5SDimitry Andric   UNW_PPC_F20 = 52,
2480b57cec5SDimitry Andric   UNW_PPC_F21 = 53,
2490b57cec5SDimitry Andric   UNW_PPC_F22 = 54,
2500b57cec5SDimitry Andric   UNW_PPC_F23 = 55,
2510b57cec5SDimitry Andric   UNW_PPC_F24 = 56,
2520b57cec5SDimitry Andric   UNW_PPC_F25 = 57,
2530b57cec5SDimitry Andric   UNW_PPC_F26 = 58,
2540b57cec5SDimitry Andric   UNW_PPC_F27 = 59,
2550b57cec5SDimitry Andric   UNW_PPC_F28 = 60,
2560b57cec5SDimitry Andric   UNW_PPC_F29 = 61,
2570b57cec5SDimitry Andric   UNW_PPC_F30 = 62,
2580b57cec5SDimitry Andric   UNW_PPC_F31 = 63,
2590b57cec5SDimitry Andric   UNW_PPC_MQ  = 64,
2600b57cec5SDimitry Andric   UNW_PPC_LR  = 65,
2610b57cec5SDimitry Andric   UNW_PPC_CTR = 66,
2620b57cec5SDimitry Andric   UNW_PPC_AP  = 67,
2630b57cec5SDimitry Andric   UNW_PPC_CR0 = 68,
2640b57cec5SDimitry Andric   UNW_PPC_CR1 = 69,
2650b57cec5SDimitry Andric   UNW_PPC_CR2 = 70,
2660b57cec5SDimitry Andric   UNW_PPC_CR3 = 71,
2670b57cec5SDimitry Andric   UNW_PPC_CR4 = 72,
2680b57cec5SDimitry Andric   UNW_PPC_CR5 = 73,
2690b57cec5SDimitry Andric   UNW_PPC_CR6 = 74,
2700b57cec5SDimitry Andric   UNW_PPC_CR7 = 75,
2710b57cec5SDimitry Andric   UNW_PPC_XER = 76,
2720b57cec5SDimitry Andric   UNW_PPC_V0  = 77,
2730b57cec5SDimitry Andric   UNW_PPC_V1  = 78,
2740b57cec5SDimitry Andric   UNW_PPC_V2  = 79,
2750b57cec5SDimitry Andric   UNW_PPC_V3  = 80,
2760b57cec5SDimitry Andric   UNW_PPC_V4  = 81,
2770b57cec5SDimitry Andric   UNW_PPC_V5  = 82,
2780b57cec5SDimitry Andric   UNW_PPC_V6  = 83,
2790b57cec5SDimitry Andric   UNW_PPC_V7  = 84,
2800b57cec5SDimitry Andric   UNW_PPC_V8  = 85,
2810b57cec5SDimitry Andric   UNW_PPC_V9  = 86,
2820b57cec5SDimitry Andric   UNW_PPC_V10 = 87,
2830b57cec5SDimitry Andric   UNW_PPC_V11 = 88,
2840b57cec5SDimitry Andric   UNW_PPC_V12 = 89,
2850b57cec5SDimitry Andric   UNW_PPC_V13 = 90,
2860b57cec5SDimitry Andric   UNW_PPC_V14 = 91,
2870b57cec5SDimitry Andric   UNW_PPC_V15 = 92,
2880b57cec5SDimitry Andric   UNW_PPC_V16 = 93,
2890b57cec5SDimitry Andric   UNW_PPC_V17 = 94,
2900b57cec5SDimitry Andric   UNW_PPC_V18 = 95,
2910b57cec5SDimitry Andric   UNW_PPC_V19 = 96,
2920b57cec5SDimitry Andric   UNW_PPC_V20 = 97,
2930b57cec5SDimitry Andric   UNW_PPC_V21 = 98,
2940b57cec5SDimitry Andric   UNW_PPC_V22 = 99,
2950b57cec5SDimitry Andric   UNW_PPC_V23 = 100,
2960b57cec5SDimitry Andric   UNW_PPC_V24 = 101,
2970b57cec5SDimitry Andric   UNW_PPC_V25 = 102,
2980b57cec5SDimitry Andric   UNW_PPC_V26 = 103,
2990b57cec5SDimitry Andric   UNW_PPC_V27 = 104,
3000b57cec5SDimitry Andric   UNW_PPC_V28 = 105,
3010b57cec5SDimitry Andric   UNW_PPC_V29 = 106,
3020b57cec5SDimitry Andric   UNW_PPC_V30 = 107,
3030b57cec5SDimitry Andric   UNW_PPC_V31 = 108,
3040b57cec5SDimitry Andric   UNW_PPC_VRSAVE  = 109,
3050b57cec5SDimitry Andric   UNW_PPC_VSCR    = 110,
3060b57cec5SDimitry Andric   UNW_PPC_SPE_ACC = 111,
3070b57cec5SDimitry Andric   UNW_PPC_SPEFSCR = 112
3080b57cec5SDimitry Andric };
3090b57cec5SDimitry Andric 
3100b57cec5SDimitry Andric // 64-bit ppc register numbers
3110b57cec5SDimitry Andric enum {
3120b57cec5SDimitry Andric   UNW_PPC64_R0      = 0,
3130b57cec5SDimitry Andric   UNW_PPC64_R1      = 1,
3140b57cec5SDimitry Andric   UNW_PPC64_R2      = 2,
3150b57cec5SDimitry Andric   UNW_PPC64_R3      = 3,
3160b57cec5SDimitry Andric   UNW_PPC64_R4      = 4,
3170b57cec5SDimitry Andric   UNW_PPC64_R5      = 5,
3180b57cec5SDimitry Andric   UNW_PPC64_R6      = 6,
3190b57cec5SDimitry Andric   UNW_PPC64_R7      = 7,
3200b57cec5SDimitry Andric   UNW_PPC64_R8      = 8,
3210b57cec5SDimitry Andric   UNW_PPC64_R9      = 9,
3220b57cec5SDimitry Andric   UNW_PPC64_R10     = 10,
3230b57cec5SDimitry Andric   UNW_PPC64_R11     = 11,
3240b57cec5SDimitry Andric   UNW_PPC64_R12     = 12,
3250b57cec5SDimitry Andric   UNW_PPC64_R13     = 13,
3260b57cec5SDimitry Andric   UNW_PPC64_R14     = 14,
3270b57cec5SDimitry Andric   UNW_PPC64_R15     = 15,
3280b57cec5SDimitry Andric   UNW_PPC64_R16     = 16,
3290b57cec5SDimitry Andric   UNW_PPC64_R17     = 17,
3300b57cec5SDimitry Andric   UNW_PPC64_R18     = 18,
3310b57cec5SDimitry Andric   UNW_PPC64_R19     = 19,
3320b57cec5SDimitry Andric   UNW_PPC64_R20     = 20,
3330b57cec5SDimitry Andric   UNW_PPC64_R21     = 21,
3340b57cec5SDimitry Andric   UNW_PPC64_R22     = 22,
3350b57cec5SDimitry Andric   UNW_PPC64_R23     = 23,
3360b57cec5SDimitry Andric   UNW_PPC64_R24     = 24,
3370b57cec5SDimitry Andric   UNW_PPC64_R25     = 25,
3380b57cec5SDimitry Andric   UNW_PPC64_R26     = 26,
3390b57cec5SDimitry Andric   UNW_PPC64_R27     = 27,
3400b57cec5SDimitry Andric   UNW_PPC64_R28     = 28,
3410b57cec5SDimitry Andric   UNW_PPC64_R29     = 29,
3420b57cec5SDimitry Andric   UNW_PPC64_R30     = 30,
3430b57cec5SDimitry Andric   UNW_PPC64_R31     = 31,
3440b57cec5SDimitry Andric   UNW_PPC64_F0      = 32,
3450b57cec5SDimitry Andric   UNW_PPC64_F1      = 33,
3460b57cec5SDimitry Andric   UNW_PPC64_F2      = 34,
3470b57cec5SDimitry Andric   UNW_PPC64_F3      = 35,
3480b57cec5SDimitry Andric   UNW_PPC64_F4      = 36,
3490b57cec5SDimitry Andric   UNW_PPC64_F5      = 37,
3500b57cec5SDimitry Andric   UNW_PPC64_F6      = 38,
3510b57cec5SDimitry Andric   UNW_PPC64_F7      = 39,
3520b57cec5SDimitry Andric   UNW_PPC64_F8      = 40,
3530b57cec5SDimitry Andric   UNW_PPC64_F9      = 41,
3540b57cec5SDimitry Andric   UNW_PPC64_F10     = 42,
3550b57cec5SDimitry Andric   UNW_PPC64_F11     = 43,
3560b57cec5SDimitry Andric   UNW_PPC64_F12     = 44,
3570b57cec5SDimitry Andric   UNW_PPC64_F13     = 45,
3580b57cec5SDimitry Andric   UNW_PPC64_F14     = 46,
3590b57cec5SDimitry Andric   UNW_PPC64_F15     = 47,
3600b57cec5SDimitry Andric   UNW_PPC64_F16     = 48,
3610b57cec5SDimitry Andric   UNW_PPC64_F17     = 49,
3620b57cec5SDimitry Andric   UNW_PPC64_F18     = 50,
3630b57cec5SDimitry Andric   UNW_PPC64_F19     = 51,
3640b57cec5SDimitry Andric   UNW_PPC64_F20     = 52,
3650b57cec5SDimitry Andric   UNW_PPC64_F21     = 53,
3660b57cec5SDimitry Andric   UNW_PPC64_F22     = 54,
3670b57cec5SDimitry Andric   UNW_PPC64_F23     = 55,
3680b57cec5SDimitry Andric   UNW_PPC64_F24     = 56,
3690b57cec5SDimitry Andric   UNW_PPC64_F25     = 57,
3700b57cec5SDimitry Andric   UNW_PPC64_F26     = 58,
3710b57cec5SDimitry Andric   UNW_PPC64_F27     = 59,
3720b57cec5SDimitry Andric   UNW_PPC64_F28     = 60,
3730b57cec5SDimitry Andric   UNW_PPC64_F29     = 61,
3740b57cec5SDimitry Andric   UNW_PPC64_F30     = 62,
3750b57cec5SDimitry Andric   UNW_PPC64_F31     = 63,
3760b57cec5SDimitry Andric   // 64: reserved
3770b57cec5SDimitry Andric   UNW_PPC64_LR      = 65,
3780b57cec5SDimitry Andric   UNW_PPC64_CTR     = 66,
3790b57cec5SDimitry Andric   // 67: reserved
3800b57cec5SDimitry Andric   UNW_PPC64_CR0     = 68,
3810b57cec5SDimitry Andric   UNW_PPC64_CR1     = 69,
3820b57cec5SDimitry Andric   UNW_PPC64_CR2     = 70,
3830b57cec5SDimitry Andric   UNW_PPC64_CR3     = 71,
3840b57cec5SDimitry Andric   UNW_PPC64_CR4     = 72,
3850b57cec5SDimitry Andric   UNW_PPC64_CR5     = 73,
3860b57cec5SDimitry Andric   UNW_PPC64_CR6     = 74,
3870b57cec5SDimitry Andric   UNW_PPC64_CR7     = 75,
3880b57cec5SDimitry Andric   UNW_PPC64_XER     = 76,
3890b57cec5SDimitry Andric   UNW_PPC64_V0      = 77,
3900b57cec5SDimitry Andric   UNW_PPC64_V1      = 78,
3910b57cec5SDimitry Andric   UNW_PPC64_V2      = 79,
3920b57cec5SDimitry Andric   UNW_PPC64_V3      = 80,
3930b57cec5SDimitry Andric   UNW_PPC64_V4      = 81,
3940b57cec5SDimitry Andric   UNW_PPC64_V5      = 82,
3950b57cec5SDimitry Andric   UNW_PPC64_V6      = 83,
3960b57cec5SDimitry Andric   UNW_PPC64_V7      = 84,
3970b57cec5SDimitry Andric   UNW_PPC64_V8      = 85,
3980b57cec5SDimitry Andric   UNW_PPC64_V9      = 86,
3990b57cec5SDimitry Andric   UNW_PPC64_V10     = 87,
4000b57cec5SDimitry Andric   UNW_PPC64_V11     = 88,
4010b57cec5SDimitry Andric   UNW_PPC64_V12     = 89,
4020b57cec5SDimitry Andric   UNW_PPC64_V13     = 90,
4030b57cec5SDimitry Andric   UNW_PPC64_V14     = 91,
4040b57cec5SDimitry Andric   UNW_PPC64_V15     = 92,
4050b57cec5SDimitry Andric   UNW_PPC64_V16     = 93,
4060b57cec5SDimitry Andric   UNW_PPC64_V17     = 94,
4070b57cec5SDimitry Andric   UNW_PPC64_V18     = 95,
4080b57cec5SDimitry Andric   UNW_PPC64_V19     = 96,
4090b57cec5SDimitry Andric   UNW_PPC64_V20     = 97,
4100b57cec5SDimitry Andric   UNW_PPC64_V21     = 98,
4110b57cec5SDimitry Andric   UNW_PPC64_V22     = 99,
4120b57cec5SDimitry Andric   UNW_PPC64_V23     = 100,
4130b57cec5SDimitry Andric   UNW_PPC64_V24     = 101,
4140b57cec5SDimitry Andric   UNW_PPC64_V25     = 102,
4150b57cec5SDimitry Andric   UNW_PPC64_V26     = 103,
4160b57cec5SDimitry Andric   UNW_PPC64_V27     = 104,
4170b57cec5SDimitry Andric   UNW_PPC64_V28     = 105,
4180b57cec5SDimitry Andric   UNW_PPC64_V29     = 106,
4190b57cec5SDimitry Andric   UNW_PPC64_V30     = 107,
4200b57cec5SDimitry Andric   UNW_PPC64_V31     = 108,
4210b57cec5SDimitry Andric   // 109, 111-113: OpenPOWER ELF V2 ABI: reserved
4220b57cec5SDimitry Andric   // Borrowing VRSAVE number from PPC32.
4230b57cec5SDimitry Andric   UNW_PPC64_VRSAVE  = 109,
4240b57cec5SDimitry Andric   UNW_PPC64_VSCR    = 110,
4250b57cec5SDimitry Andric   UNW_PPC64_TFHAR   = 114,
4260b57cec5SDimitry Andric   UNW_PPC64_TFIAR   = 115,
4270b57cec5SDimitry Andric   UNW_PPC64_TEXASR  = 116,
4280b57cec5SDimitry Andric   UNW_PPC64_VS0     = UNW_PPC64_F0,
4290b57cec5SDimitry Andric   UNW_PPC64_VS1     = UNW_PPC64_F1,
4300b57cec5SDimitry Andric   UNW_PPC64_VS2     = UNW_PPC64_F2,
4310b57cec5SDimitry Andric   UNW_PPC64_VS3     = UNW_PPC64_F3,
4320b57cec5SDimitry Andric   UNW_PPC64_VS4     = UNW_PPC64_F4,
4330b57cec5SDimitry Andric   UNW_PPC64_VS5     = UNW_PPC64_F5,
4340b57cec5SDimitry Andric   UNW_PPC64_VS6     = UNW_PPC64_F6,
4350b57cec5SDimitry Andric   UNW_PPC64_VS7     = UNW_PPC64_F7,
4360b57cec5SDimitry Andric   UNW_PPC64_VS8     = UNW_PPC64_F8,
4370b57cec5SDimitry Andric   UNW_PPC64_VS9     = UNW_PPC64_F9,
4380b57cec5SDimitry Andric   UNW_PPC64_VS10    = UNW_PPC64_F10,
4390b57cec5SDimitry Andric   UNW_PPC64_VS11    = UNW_PPC64_F11,
4400b57cec5SDimitry Andric   UNW_PPC64_VS12    = UNW_PPC64_F12,
4410b57cec5SDimitry Andric   UNW_PPC64_VS13    = UNW_PPC64_F13,
4420b57cec5SDimitry Andric   UNW_PPC64_VS14    = UNW_PPC64_F14,
4430b57cec5SDimitry Andric   UNW_PPC64_VS15    = UNW_PPC64_F15,
4440b57cec5SDimitry Andric   UNW_PPC64_VS16    = UNW_PPC64_F16,
4450b57cec5SDimitry Andric   UNW_PPC64_VS17    = UNW_PPC64_F17,
4460b57cec5SDimitry Andric   UNW_PPC64_VS18    = UNW_PPC64_F18,
4470b57cec5SDimitry Andric   UNW_PPC64_VS19    = UNW_PPC64_F19,
4480b57cec5SDimitry Andric   UNW_PPC64_VS20    = UNW_PPC64_F20,
4490b57cec5SDimitry Andric   UNW_PPC64_VS21    = UNW_PPC64_F21,
4500b57cec5SDimitry Andric   UNW_PPC64_VS22    = UNW_PPC64_F22,
4510b57cec5SDimitry Andric   UNW_PPC64_VS23    = UNW_PPC64_F23,
4520b57cec5SDimitry Andric   UNW_PPC64_VS24    = UNW_PPC64_F24,
4530b57cec5SDimitry Andric   UNW_PPC64_VS25    = UNW_PPC64_F25,
4540b57cec5SDimitry Andric   UNW_PPC64_VS26    = UNW_PPC64_F26,
4550b57cec5SDimitry Andric   UNW_PPC64_VS27    = UNW_PPC64_F27,
4560b57cec5SDimitry Andric   UNW_PPC64_VS28    = UNW_PPC64_F28,
4570b57cec5SDimitry Andric   UNW_PPC64_VS29    = UNW_PPC64_F29,
4580b57cec5SDimitry Andric   UNW_PPC64_VS30    = UNW_PPC64_F30,
4590b57cec5SDimitry Andric   UNW_PPC64_VS31    = UNW_PPC64_F31,
4600b57cec5SDimitry Andric   UNW_PPC64_VS32    = UNW_PPC64_V0,
4610b57cec5SDimitry Andric   UNW_PPC64_VS33    = UNW_PPC64_V1,
4620b57cec5SDimitry Andric   UNW_PPC64_VS34    = UNW_PPC64_V2,
4630b57cec5SDimitry Andric   UNW_PPC64_VS35    = UNW_PPC64_V3,
4640b57cec5SDimitry Andric   UNW_PPC64_VS36    = UNW_PPC64_V4,
4650b57cec5SDimitry Andric   UNW_PPC64_VS37    = UNW_PPC64_V5,
4660b57cec5SDimitry Andric   UNW_PPC64_VS38    = UNW_PPC64_V6,
4670b57cec5SDimitry Andric   UNW_PPC64_VS39    = UNW_PPC64_V7,
4680b57cec5SDimitry Andric   UNW_PPC64_VS40    = UNW_PPC64_V8,
4690b57cec5SDimitry Andric   UNW_PPC64_VS41    = UNW_PPC64_V9,
4700b57cec5SDimitry Andric   UNW_PPC64_VS42    = UNW_PPC64_V10,
4710b57cec5SDimitry Andric   UNW_PPC64_VS43    = UNW_PPC64_V11,
4720b57cec5SDimitry Andric   UNW_PPC64_VS44    = UNW_PPC64_V12,
4730b57cec5SDimitry Andric   UNW_PPC64_VS45    = UNW_PPC64_V13,
4740b57cec5SDimitry Andric   UNW_PPC64_VS46    = UNW_PPC64_V14,
4750b57cec5SDimitry Andric   UNW_PPC64_VS47    = UNW_PPC64_V15,
4760b57cec5SDimitry Andric   UNW_PPC64_VS48    = UNW_PPC64_V16,
4770b57cec5SDimitry Andric   UNW_PPC64_VS49    = UNW_PPC64_V17,
4780b57cec5SDimitry Andric   UNW_PPC64_VS50    = UNW_PPC64_V18,
4790b57cec5SDimitry Andric   UNW_PPC64_VS51    = UNW_PPC64_V19,
4800b57cec5SDimitry Andric   UNW_PPC64_VS52    = UNW_PPC64_V20,
4810b57cec5SDimitry Andric   UNW_PPC64_VS53    = UNW_PPC64_V21,
4820b57cec5SDimitry Andric   UNW_PPC64_VS54    = UNW_PPC64_V22,
4830b57cec5SDimitry Andric   UNW_PPC64_VS55    = UNW_PPC64_V23,
4840b57cec5SDimitry Andric   UNW_PPC64_VS56    = UNW_PPC64_V24,
4850b57cec5SDimitry Andric   UNW_PPC64_VS57    = UNW_PPC64_V25,
4860b57cec5SDimitry Andric   UNW_PPC64_VS58    = UNW_PPC64_V26,
4870b57cec5SDimitry Andric   UNW_PPC64_VS59    = UNW_PPC64_V27,
4880b57cec5SDimitry Andric   UNW_PPC64_VS60    = UNW_PPC64_V28,
4890b57cec5SDimitry Andric   UNW_PPC64_VS61    = UNW_PPC64_V29,
4900b57cec5SDimitry Andric   UNW_PPC64_VS62    = UNW_PPC64_V30,
4910b57cec5SDimitry Andric   UNW_PPC64_VS63    = UNW_PPC64_V31
4920b57cec5SDimitry Andric };
4930b57cec5SDimitry Andric 
4940b57cec5SDimitry Andric // 64-bit ARM64 registers
4950b57cec5SDimitry Andric enum {
496*349cc55cSDimitry Andric   UNW_AARCH64_X0 = 0,
497*349cc55cSDimitry Andric   UNW_AARCH64_X1 = 1,
498*349cc55cSDimitry Andric   UNW_AARCH64_X2 = 2,
499*349cc55cSDimitry Andric   UNW_AARCH64_X3 = 3,
500*349cc55cSDimitry Andric   UNW_AARCH64_X4 = 4,
501*349cc55cSDimitry Andric   UNW_AARCH64_X5 = 5,
502*349cc55cSDimitry Andric   UNW_AARCH64_X6 = 6,
503*349cc55cSDimitry Andric   UNW_AARCH64_X7 = 7,
504*349cc55cSDimitry Andric   UNW_AARCH64_X8 = 8,
505*349cc55cSDimitry Andric   UNW_AARCH64_X9 = 9,
506*349cc55cSDimitry Andric   UNW_AARCH64_X10 = 10,
507*349cc55cSDimitry Andric   UNW_AARCH64_X11 = 11,
508*349cc55cSDimitry Andric   UNW_AARCH64_X12 = 12,
509*349cc55cSDimitry Andric   UNW_AARCH64_X13 = 13,
510*349cc55cSDimitry Andric   UNW_AARCH64_X14 = 14,
511*349cc55cSDimitry Andric   UNW_AARCH64_X15 = 15,
512*349cc55cSDimitry Andric   UNW_AARCH64_X16 = 16,
513*349cc55cSDimitry Andric   UNW_AARCH64_X17 = 17,
514*349cc55cSDimitry Andric   UNW_AARCH64_X18 = 18,
515*349cc55cSDimitry Andric   UNW_AARCH64_X19 = 19,
516*349cc55cSDimitry Andric   UNW_AARCH64_X20 = 20,
517*349cc55cSDimitry Andric   UNW_AARCH64_X21 = 21,
518*349cc55cSDimitry Andric   UNW_AARCH64_X22 = 22,
519*349cc55cSDimitry Andric   UNW_AARCH64_X23 = 23,
520*349cc55cSDimitry Andric   UNW_AARCH64_X24 = 24,
521*349cc55cSDimitry Andric   UNW_AARCH64_X25 = 25,
522*349cc55cSDimitry Andric   UNW_AARCH64_X26 = 26,
523*349cc55cSDimitry Andric   UNW_AARCH64_X27 = 27,
524*349cc55cSDimitry Andric   UNW_AARCH64_X28 = 28,
525*349cc55cSDimitry Andric   UNW_AARCH64_X29 = 29,
526*349cc55cSDimitry Andric   UNW_AARCH64_FP = 29,
527*349cc55cSDimitry Andric   UNW_AARCH64_X30 = 30,
528*349cc55cSDimitry Andric   UNW_AARCH64_LR = 30,
529*349cc55cSDimitry Andric   UNW_AARCH64_X31 = 31,
530*349cc55cSDimitry Andric   UNW_AARCH64_SP = 31,
531*349cc55cSDimitry Andric   UNW_AARCH64_PC = 32,
532*349cc55cSDimitry Andric 
5330b57cec5SDimitry Andric   // reserved block
534*349cc55cSDimitry Andric   UNW_AARCH64_RA_SIGN_STATE = 34,
535*349cc55cSDimitry Andric 
536*349cc55cSDimitry Andric   // FP/vector registers
537*349cc55cSDimitry Andric   UNW_AARCH64_V0 = 64,
538*349cc55cSDimitry Andric   UNW_AARCH64_V1 = 65,
539*349cc55cSDimitry Andric   UNW_AARCH64_V2 = 66,
540*349cc55cSDimitry Andric   UNW_AARCH64_V3 = 67,
541*349cc55cSDimitry Andric   UNW_AARCH64_V4 = 68,
542*349cc55cSDimitry Andric   UNW_AARCH64_V5 = 69,
543*349cc55cSDimitry Andric   UNW_AARCH64_V6 = 70,
544*349cc55cSDimitry Andric   UNW_AARCH64_V7 = 71,
545*349cc55cSDimitry Andric   UNW_AARCH64_V8 = 72,
546*349cc55cSDimitry Andric   UNW_AARCH64_V9 = 73,
547*349cc55cSDimitry Andric   UNW_AARCH64_V10 = 74,
548*349cc55cSDimitry Andric   UNW_AARCH64_V11 = 75,
549*349cc55cSDimitry Andric   UNW_AARCH64_V12 = 76,
550*349cc55cSDimitry Andric   UNW_AARCH64_V13 = 77,
551*349cc55cSDimitry Andric   UNW_AARCH64_V14 = 78,
552*349cc55cSDimitry Andric   UNW_AARCH64_V15 = 79,
553*349cc55cSDimitry Andric   UNW_AARCH64_V16 = 80,
554*349cc55cSDimitry Andric   UNW_AARCH64_V17 = 81,
555*349cc55cSDimitry Andric   UNW_AARCH64_V18 = 82,
556*349cc55cSDimitry Andric   UNW_AARCH64_V19 = 83,
557*349cc55cSDimitry Andric   UNW_AARCH64_V20 = 84,
558*349cc55cSDimitry Andric   UNW_AARCH64_V21 = 85,
559*349cc55cSDimitry Andric   UNW_AARCH64_V22 = 86,
560*349cc55cSDimitry Andric   UNW_AARCH64_V23 = 87,
561*349cc55cSDimitry Andric   UNW_AARCH64_V24 = 88,
562*349cc55cSDimitry Andric   UNW_AARCH64_V25 = 89,
563*349cc55cSDimitry Andric   UNW_AARCH64_V26 = 90,
564*349cc55cSDimitry Andric   UNW_AARCH64_V27 = 91,
565*349cc55cSDimitry Andric   UNW_AARCH64_V28 = 92,
566*349cc55cSDimitry Andric   UNW_AARCH64_V29 = 93,
567*349cc55cSDimitry Andric   UNW_AARCH64_V30 = 94,
568*349cc55cSDimitry Andric   UNW_AARCH64_V31 = 95,
569*349cc55cSDimitry Andric 
570*349cc55cSDimitry Andric   // Compatibility aliases
571*349cc55cSDimitry Andric   UNW_ARM64_X0 = UNW_AARCH64_X0,
572*349cc55cSDimitry Andric   UNW_ARM64_X1 = UNW_AARCH64_X1,
573*349cc55cSDimitry Andric   UNW_ARM64_X2 = UNW_AARCH64_X2,
574*349cc55cSDimitry Andric   UNW_ARM64_X3 = UNW_AARCH64_X3,
575*349cc55cSDimitry Andric   UNW_ARM64_X4 = UNW_AARCH64_X4,
576*349cc55cSDimitry Andric   UNW_ARM64_X5 = UNW_AARCH64_X5,
577*349cc55cSDimitry Andric   UNW_ARM64_X6 = UNW_AARCH64_X6,
578*349cc55cSDimitry Andric   UNW_ARM64_X7 = UNW_AARCH64_X7,
579*349cc55cSDimitry Andric   UNW_ARM64_X8 = UNW_AARCH64_X8,
580*349cc55cSDimitry Andric   UNW_ARM64_X9 = UNW_AARCH64_X9,
581*349cc55cSDimitry Andric   UNW_ARM64_X10 = UNW_AARCH64_X10,
582*349cc55cSDimitry Andric   UNW_ARM64_X11 = UNW_AARCH64_X11,
583*349cc55cSDimitry Andric   UNW_ARM64_X12 = UNW_AARCH64_X12,
584*349cc55cSDimitry Andric   UNW_ARM64_X13 = UNW_AARCH64_X13,
585*349cc55cSDimitry Andric   UNW_ARM64_X14 = UNW_AARCH64_X14,
586*349cc55cSDimitry Andric   UNW_ARM64_X15 = UNW_AARCH64_X15,
587*349cc55cSDimitry Andric   UNW_ARM64_X16 = UNW_AARCH64_X16,
588*349cc55cSDimitry Andric   UNW_ARM64_X17 = UNW_AARCH64_X17,
589*349cc55cSDimitry Andric   UNW_ARM64_X18 = UNW_AARCH64_X18,
590*349cc55cSDimitry Andric   UNW_ARM64_X19 = UNW_AARCH64_X19,
591*349cc55cSDimitry Andric   UNW_ARM64_X20 = UNW_AARCH64_X20,
592*349cc55cSDimitry Andric   UNW_ARM64_X21 = UNW_AARCH64_X21,
593*349cc55cSDimitry Andric   UNW_ARM64_X22 = UNW_AARCH64_X22,
594*349cc55cSDimitry Andric   UNW_ARM64_X23 = UNW_AARCH64_X23,
595*349cc55cSDimitry Andric   UNW_ARM64_X24 = UNW_AARCH64_X24,
596*349cc55cSDimitry Andric   UNW_ARM64_X25 = UNW_AARCH64_X25,
597*349cc55cSDimitry Andric   UNW_ARM64_X26 = UNW_AARCH64_X26,
598*349cc55cSDimitry Andric   UNW_ARM64_X27 = UNW_AARCH64_X27,
599*349cc55cSDimitry Andric   UNW_ARM64_X28 = UNW_AARCH64_X28,
600*349cc55cSDimitry Andric   UNW_ARM64_X29 = UNW_AARCH64_X29,
601*349cc55cSDimitry Andric   UNW_ARM64_FP = UNW_AARCH64_FP,
602*349cc55cSDimitry Andric   UNW_ARM64_X30 = UNW_AARCH64_X30,
603*349cc55cSDimitry Andric   UNW_ARM64_LR = UNW_AARCH64_LR,
604*349cc55cSDimitry Andric   UNW_ARM64_X31 = UNW_AARCH64_X31,
605*349cc55cSDimitry Andric   UNW_ARM64_SP = UNW_AARCH64_SP,
606*349cc55cSDimitry Andric   UNW_ARM64_PC = UNW_AARCH64_PC,
607*349cc55cSDimitry Andric   UNW_ARM64_RA_SIGN_STATE = UNW_AARCH64_RA_SIGN_STATE,
608*349cc55cSDimitry Andric   UNW_ARM64_D0 = UNW_AARCH64_V0,
609*349cc55cSDimitry Andric   UNW_ARM64_D1 = UNW_AARCH64_V1,
610*349cc55cSDimitry Andric   UNW_ARM64_D2 = UNW_AARCH64_V2,
611*349cc55cSDimitry Andric   UNW_ARM64_D3 = UNW_AARCH64_V3,
612*349cc55cSDimitry Andric   UNW_ARM64_D4 = UNW_AARCH64_V4,
613*349cc55cSDimitry Andric   UNW_ARM64_D5 = UNW_AARCH64_V5,
614*349cc55cSDimitry Andric   UNW_ARM64_D6 = UNW_AARCH64_V6,
615*349cc55cSDimitry Andric   UNW_ARM64_D7 = UNW_AARCH64_V7,
616*349cc55cSDimitry Andric   UNW_ARM64_D8 = UNW_AARCH64_V8,
617*349cc55cSDimitry Andric   UNW_ARM64_D9 = UNW_AARCH64_V9,
618*349cc55cSDimitry Andric   UNW_ARM64_D10 = UNW_AARCH64_V10,
619*349cc55cSDimitry Andric   UNW_ARM64_D11 = UNW_AARCH64_V11,
620*349cc55cSDimitry Andric   UNW_ARM64_D12 = UNW_AARCH64_V12,
621*349cc55cSDimitry Andric   UNW_ARM64_D13 = UNW_AARCH64_V13,
622*349cc55cSDimitry Andric   UNW_ARM64_D14 = UNW_AARCH64_V14,
623*349cc55cSDimitry Andric   UNW_ARM64_D15 = UNW_AARCH64_V15,
624*349cc55cSDimitry Andric   UNW_ARM64_D16 = UNW_AARCH64_V16,
625*349cc55cSDimitry Andric   UNW_ARM64_D17 = UNW_AARCH64_V17,
626*349cc55cSDimitry Andric   UNW_ARM64_D18 = UNW_AARCH64_V18,
627*349cc55cSDimitry Andric   UNW_ARM64_D19 = UNW_AARCH64_V19,
628*349cc55cSDimitry Andric   UNW_ARM64_D20 = UNW_AARCH64_V20,
629*349cc55cSDimitry Andric   UNW_ARM64_D21 = UNW_AARCH64_V21,
630*349cc55cSDimitry Andric   UNW_ARM64_D22 = UNW_AARCH64_V22,
631*349cc55cSDimitry Andric   UNW_ARM64_D23 = UNW_AARCH64_V23,
632*349cc55cSDimitry Andric   UNW_ARM64_D24 = UNW_AARCH64_V24,
633*349cc55cSDimitry Andric   UNW_ARM64_D25 = UNW_AARCH64_V25,
634*349cc55cSDimitry Andric   UNW_ARM64_D26 = UNW_AARCH64_V26,
635*349cc55cSDimitry Andric   UNW_ARM64_D27 = UNW_AARCH64_V27,
636*349cc55cSDimitry Andric   UNW_ARM64_D28 = UNW_AARCH64_V28,
637*349cc55cSDimitry Andric   UNW_ARM64_D29 = UNW_AARCH64_V29,
638*349cc55cSDimitry Andric   UNW_ARM64_D30 = UNW_AARCH64_V30,
639*349cc55cSDimitry Andric   UNW_ARM64_D31 = UNW_AARCH64_V31,
6400b57cec5SDimitry Andric };
6410b57cec5SDimitry Andric 
6420b57cec5SDimitry Andric // 32-bit ARM registers. Numbers match DWARF for ARM spec #3.1 Table 1.
6430b57cec5SDimitry Andric // Naming scheme uses recommendations given in Note 4 for VFP-v2 and VFP-v3.
6440b57cec5SDimitry Andric // In this scheme, even though the 64-bit floating point registers D0-D31
6450b57cec5SDimitry Andric // overlap physically with the 32-bit floating pointer registers S0-S31,
6460b57cec5SDimitry Andric // they are given a non-overlapping range of register numbers.
6470b57cec5SDimitry Andric //
6480b57cec5SDimitry Andric // Commented out ranges are not preserved during unwinding.
6490b57cec5SDimitry Andric enum {
6500b57cec5SDimitry Andric   UNW_ARM_R0  = 0,
6510b57cec5SDimitry Andric   UNW_ARM_R1  = 1,
6520b57cec5SDimitry Andric   UNW_ARM_R2  = 2,
6530b57cec5SDimitry Andric   UNW_ARM_R3  = 3,
6540b57cec5SDimitry Andric   UNW_ARM_R4  = 4,
6550b57cec5SDimitry Andric   UNW_ARM_R5  = 5,
6560b57cec5SDimitry Andric   UNW_ARM_R6  = 6,
6570b57cec5SDimitry Andric   UNW_ARM_R7  = 7,
6580b57cec5SDimitry Andric   UNW_ARM_R8  = 8,
6590b57cec5SDimitry Andric   UNW_ARM_R9  = 9,
6600b57cec5SDimitry Andric   UNW_ARM_R10 = 10,
6610b57cec5SDimitry Andric   UNW_ARM_R11 = 11,
6620b57cec5SDimitry Andric   UNW_ARM_R12 = 12,
6630b57cec5SDimitry Andric   UNW_ARM_SP  = 13,  // Logical alias for UNW_REG_SP
6640b57cec5SDimitry Andric   UNW_ARM_R13 = 13,
6650b57cec5SDimitry Andric   UNW_ARM_LR  = 14,
6660b57cec5SDimitry Andric   UNW_ARM_R14 = 14,
6670b57cec5SDimitry Andric   UNW_ARM_IP  = 15,  // Logical alias for UNW_REG_IP
6680b57cec5SDimitry Andric   UNW_ARM_R15 = 15,
6690b57cec5SDimitry Andric   // 16-63 -- OBSOLETE. Used in VFP1 to represent both S0-S31 and D0-D31.
6700b57cec5SDimitry Andric   UNW_ARM_S0  = 64,
6710b57cec5SDimitry Andric   UNW_ARM_S1  = 65,
6720b57cec5SDimitry Andric   UNW_ARM_S2  = 66,
6730b57cec5SDimitry Andric   UNW_ARM_S3  = 67,
6740b57cec5SDimitry Andric   UNW_ARM_S4  = 68,
6750b57cec5SDimitry Andric   UNW_ARM_S5  = 69,
6760b57cec5SDimitry Andric   UNW_ARM_S6  = 70,
6770b57cec5SDimitry Andric   UNW_ARM_S7  = 71,
6780b57cec5SDimitry Andric   UNW_ARM_S8  = 72,
6790b57cec5SDimitry Andric   UNW_ARM_S9  = 73,
6800b57cec5SDimitry Andric   UNW_ARM_S10 = 74,
6810b57cec5SDimitry Andric   UNW_ARM_S11 = 75,
6820b57cec5SDimitry Andric   UNW_ARM_S12 = 76,
6830b57cec5SDimitry Andric   UNW_ARM_S13 = 77,
6840b57cec5SDimitry Andric   UNW_ARM_S14 = 78,
6850b57cec5SDimitry Andric   UNW_ARM_S15 = 79,
6860b57cec5SDimitry Andric   UNW_ARM_S16 = 80,
6870b57cec5SDimitry Andric   UNW_ARM_S17 = 81,
6880b57cec5SDimitry Andric   UNW_ARM_S18 = 82,
6890b57cec5SDimitry Andric   UNW_ARM_S19 = 83,
6900b57cec5SDimitry Andric   UNW_ARM_S20 = 84,
6910b57cec5SDimitry Andric   UNW_ARM_S21 = 85,
6920b57cec5SDimitry Andric   UNW_ARM_S22 = 86,
6930b57cec5SDimitry Andric   UNW_ARM_S23 = 87,
6940b57cec5SDimitry Andric   UNW_ARM_S24 = 88,
6950b57cec5SDimitry Andric   UNW_ARM_S25 = 89,
6960b57cec5SDimitry Andric   UNW_ARM_S26 = 90,
6970b57cec5SDimitry Andric   UNW_ARM_S27 = 91,
6980b57cec5SDimitry Andric   UNW_ARM_S28 = 92,
6990b57cec5SDimitry Andric   UNW_ARM_S29 = 93,
7000b57cec5SDimitry Andric   UNW_ARM_S30 = 94,
7010b57cec5SDimitry Andric   UNW_ARM_S31 = 95,
7020b57cec5SDimitry Andric   //  96-103 -- OBSOLETE. F0-F7. Used by the FPA system. Superseded by VFP.
7030b57cec5SDimitry Andric   // 104-111 -- wCGR0-wCGR7, ACC0-ACC7 (Intel wireless MMX)
7040b57cec5SDimitry Andric   UNW_ARM_WR0 = 112,
7050b57cec5SDimitry Andric   UNW_ARM_WR1 = 113,
7060b57cec5SDimitry Andric   UNW_ARM_WR2 = 114,
7070b57cec5SDimitry Andric   UNW_ARM_WR3 = 115,
7080b57cec5SDimitry Andric   UNW_ARM_WR4 = 116,
7090b57cec5SDimitry Andric   UNW_ARM_WR5 = 117,
7100b57cec5SDimitry Andric   UNW_ARM_WR6 = 118,
7110b57cec5SDimitry Andric   UNW_ARM_WR7 = 119,
7120b57cec5SDimitry Andric   UNW_ARM_WR8 = 120,
7130b57cec5SDimitry Andric   UNW_ARM_WR9 = 121,
7140b57cec5SDimitry Andric   UNW_ARM_WR10 = 122,
7150b57cec5SDimitry Andric   UNW_ARM_WR11 = 123,
7160b57cec5SDimitry Andric   UNW_ARM_WR12 = 124,
7170b57cec5SDimitry Andric   UNW_ARM_WR13 = 125,
7180b57cec5SDimitry Andric   UNW_ARM_WR14 = 126,
7190b57cec5SDimitry Andric   UNW_ARM_WR15 = 127,
7200b57cec5SDimitry Andric   // 128-133 -- SPSR, SPSR_{FIQ|IRQ|ABT|UND|SVC}
7210b57cec5SDimitry Andric   // 134-143 -- Reserved
7220b57cec5SDimitry Andric   // 144-150 -- R8_USR-R14_USR
7230b57cec5SDimitry Andric   // 151-157 -- R8_FIQ-R14_FIQ
7240b57cec5SDimitry Andric   // 158-159 -- R13_IRQ-R14_IRQ
7250b57cec5SDimitry Andric   // 160-161 -- R13_ABT-R14_ABT
7260b57cec5SDimitry Andric   // 162-163 -- R13_UND-R14_UND
7270b57cec5SDimitry Andric   // 164-165 -- R13_SVC-R14_SVC
7280b57cec5SDimitry Andric   // 166-191 -- Reserved
7290b57cec5SDimitry Andric   UNW_ARM_WC0 = 192,
7300b57cec5SDimitry Andric   UNW_ARM_WC1 = 193,
7310b57cec5SDimitry Andric   UNW_ARM_WC2 = 194,
7320b57cec5SDimitry Andric   UNW_ARM_WC3 = 195,
7330b57cec5SDimitry Andric   // 196-199 -- wC4-wC7 (Intel wireless MMX control)
7340b57cec5SDimitry Andric   // 200-255 -- Reserved
7350b57cec5SDimitry Andric   UNW_ARM_D0  = 256,
7360b57cec5SDimitry Andric   UNW_ARM_D1  = 257,
7370b57cec5SDimitry Andric   UNW_ARM_D2  = 258,
7380b57cec5SDimitry Andric   UNW_ARM_D3  = 259,
7390b57cec5SDimitry Andric   UNW_ARM_D4  = 260,
7400b57cec5SDimitry Andric   UNW_ARM_D5  = 261,
7410b57cec5SDimitry Andric   UNW_ARM_D6  = 262,
7420b57cec5SDimitry Andric   UNW_ARM_D7  = 263,
7430b57cec5SDimitry Andric   UNW_ARM_D8  = 264,
7440b57cec5SDimitry Andric   UNW_ARM_D9  = 265,
7450b57cec5SDimitry Andric   UNW_ARM_D10 = 266,
7460b57cec5SDimitry Andric   UNW_ARM_D11 = 267,
7470b57cec5SDimitry Andric   UNW_ARM_D12 = 268,
7480b57cec5SDimitry Andric   UNW_ARM_D13 = 269,
7490b57cec5SDimitry Andric   UNW_ARM_D14 = 270,
7500b57cec5SDimitry Andric   UNW_ARM_D15 = 271,
7510b57cec5SDimitry Andric   UNW_ARM_D16 = 272,
7520b57cec5SDimitry Andric   UNW_ARM_D17 = 273,
7530b57cec5SDimitry Andric   UNW_ARM_D18 = 274,
7540b57cec5SDimitry Andric   UNW_ARM_D19 = 275,
7550b57cec5SDimitry Andric   UNW_ARM_D20 = 276,
7560b57cec5SDimitry Andric   UNW_ARM_D21 = 277,
7570b57cec5SDimitry Andric   UNW_ARM_D22 = 278,
7580b57cec5SDimitry Andric   UNW_ARM_D23 = 279,
7590b57cec5SDimitry Andric   UNW_ARM_D24 = 280,
7600b57cec5SDimitry Andric   UNW_ARM_D25 = 281,
7610b57cec5SDimitry Andric   UNW_ARM_D26 = 282,
7620b57cec5SDimitry Andric   UNW_ARM_D27 = 283,
7630b57cec5SDimitry Andric   UNW_ARM_D28 = 284,
7640b57cec5SDimitry Andric   UNW_ARM_D29 = 285,
7650b57cec5SDimitry Andric   UNW_ARM_D30 = 286,
7660b57cec5SDimitry Andric   UNW_ARM_D31 = 287,
7670b57cec5SDimitry Andric   // 288-319 -- Reserved for VFP/Neon
7680b57cec5SDimitry Andric   // 320-8191 -- Reserved
7690b57cec5SDimitry Andric   // 8192-16383 -- Unspecified vendor co-processor register.
7700b57cec5SDimitry Andric };
7710b57cec5SDimitry Andric 
7720b57cec5SDimitry Andric // OpenRISC1000 register numbers
7730b57cec5SDimitry Andric enum {
7740b57cec5SDimitry Andric   UNW_OR1K_R0  = 0,
7750b57cec5SDimitry Andric   UNW_OR1K_R1  = 1,
7760b57cec5SDimitry Andric   UNW_OR1K_R2  = 2,
7770b57cec5SDimitry Andric   UNW_OR1K_R3  = 3,
7780b57cec5SDimitry Andric   UNW_OR1K_R4  = 4,
7790b57cec5SDimitry Andric   UNW_OR1K_R5  = 5,
7800b57cec5SDimitry Andric   UNW_OR1K_R6  = 6,
7810b57cec5SDimitry Andric   UNW_OR1K_R7  = 7,
7820b57cec5SDimitry Andric   UNW_OR1K_R8  = 8,
7830b57cec5SDimitry Andric   UNW_OR1K_R9  = 9,
7840b57cec5SDimitry Andric   UNW_OR1K_R10 = 10,
7850b57cec5SDimitry Andric   UNW_OR1K_R11 = 11,
7860b57cec5SDimitry Andric   UNW_OR1K_R12 = 12,
7870b57cec5SDimitry Andric   UNW_OR1K_R13 = 13,
7880b57cec5SDimitry Andric   UNW_OR1K_R14 = 14,
7890b57cec5SDimitry Andric   UNW_OR1K_R15 = 15,
7900b57cec5SDimitry Andric   UNW_OR1K_R16 = 16,
7910b57cec5SDimitry Andric   UNW_OR1K_R17 = 17,
7920b57cec5SDimitry Andric   UNW_OR1K_R18 = 18,
7930b57cec5SDimitry Andric   UNW_OR1K_R19 = 19,
7940b57cec5SDimitry Andric   UNW_OR1K_R20 = 20,
7950b57cec5SDimitry Andric   UNW_OR1K_R21 = 21,
7960b57cec5SDimitry Andric   UNW_OR1K_R22 = 22,
7970b57cec5SDimitry Andric   UNW_OR1K_R23 = 23,
7980b57cec5SDimitry Andric   UNW_OR1K_R24 = 24,
7990b57cec5SDimitry Andric   UNW_OR1K_R25 = 25,
8000b57cec5SDimitry Andric   UNW_OR1K_R26 = 26,
8010b57cec5SDimitry Andric   UNW_OR1K_R27 = 27,
8020b57cec5SDimitry Andric   UNW_OR1K_R28 = 28,
8030b57cec5SDimitry Andric   UNW_OR1K_R29 = 29,
8040b57cec5SDimitry Andric   UNW_OR1K_R30 = 30,
8050b57cec5SDimitry Andric   UNW_OR1K_R31 = 31,
8060b57cec5SDimitry Andric   UNW_OR1K_EPCR = 32,
8070b57cec5SDimitry Andric };
8080b57cec5SDimitry Andric 
8090b57cec5SDimitry Andric // MIPS registers
8100b57cec5SDimitry Andric enum {
8110b57cec5SDimitry Andric   UNW_MIPS_R0  = 0,
8120b57cec5SDimitry Andric   UNW_MIPS_R1  = 1,
8130b57cec5SDimitry Andric   UNW_MIPS_R2  = 2,
8140b57cec5SDimitry Andric   UNW_MIPS_R3  = 3,
8150b57cec5SDimitry Andric   UNW_MIPS_R4  = 4,
8160b57cec5SDimitry Andric   UNW_MIPS_R5  = 5,
8170b57cec5SDimitry Andric   UNW_MIPS_R6  = 6,
8180b57cec5SDimitry Andric   UNW_MIPS_R7  = 7,
8190b57cec5SDimitry Andric   UNW_MIPS_R8  = 8,
8200b57cec5SDimitry Andric   UNW_MIPS_R9  = 9,
8210b57cec5SDimitry Andric   UNW_MIPS_R10 = 10,
8220b57cec5SDimitry Andric   UNW_MIPS_R11 = 11,
8230b57cec5SDimitry Andric   UNW_MIPS_R12 = 12,
8240b57cec5SDimitry Andric   UNW_MIPS_R13 = 13,
8250b57cec5SDimitry Andric   UNW_MIPS_R14 = 14,
8260b57cec5SDimitry Andric   UNW_MIPS_R15 = 15,
8270b57cec5SDimitry Andric   UNW_MIPS_R16 = 16,
8280b57cec5SDimitry Andric   UNW_MIPS_R17 = 17,
8290b57cec5SDimitry Andric   UNW_MIPS_R18 = 18,
8300b57cec5SDimitry Andric   UNW_MIPS_R19 = 19,
8310b57cec5SDimitry Andric   UNW_MIPS_R20 = 20,
8320b57cec5SDimitry Andric   UNW_MIPS_R21 = 21,
8330b57cec5SDimitry Andric   UNW_MIPS_R22 = 22,
8340b57cec5SDimitry Andric   UNW_MIPS_R23 = 23,
8350b57cec5SDimitry Andric   UNW_MIPS_R24 = 24,
8360b57cec5SDimitry Andric   UNW_MIPS_R25 = 25,
8370b57cec5SDimitry Andric   UNW_MIPS_R26 = 26,
8380b57cec5SDimitry Andric   UNW_MIPS_R27 = 27,
8390b57cec5SDimitry Andric   UNW_MIPS_R28 = 28,
8400b57cec5SDimitry Andric   UNW_MIPS_R29 = 29,
8410b57cec5SDimitry Andric   UNW_MIPS_R30 = 30,
8420b57cec5SDimitry Andric   UNW_MIPS_R31 = 31,
8430b57cec5SDimitry Andric   UNW_MIPS_F0  = 32,
8440b57cec5SDimitry Andric   UNW_MIPS_F1  = 33,
8450b57cec5SDimitry Andric   UNW_MIPS_F2  = 34,
8460b57cec5SDimitry Andric   UNW_MIPS_F3  = 35,
8470b57cec5SDimitry Andric   UNW_MIPS_F4  = 36,
8480b57cec5SDimitry Andric   UNW_MIPS_F5  = 37,
8490b57cec5SDimitry Andric   UNW_MIPS_F6  = 38,
8500b57cec5SDimitry Andric   UNW_MIPS_F7  = 39,
8510b57cec5SDimitry Andric   UNW_MIPS_F8  = 40,
8520b57cec5SDimitry Andric   UNW_MIPS_F9  = 41,
8530b57cec5SDimitry Andric   UNW_MIPS_F10 = 42,
8540b57cec5SDimitry Andric   UNW_MIPS_F11 = 43,
8550b57cec5SDimitry Andric   UNW_MIPS_F12 = 44,
8560b57cec5SDimitry Andric   UNW_MIPS_F13 = 45,
8570b57cec5SDimitry Andric   UNW_MIPS_F14 = 46,
8580b57cec5SDimitry Andric   UNW_MIPS_F15 = 47,
8590b57cec5SDimitry Andric   UNW_MIPS_F16 = 48,
8600b57cec5SDimitry Andric   UNW_MIPS_F17 = 49,
8610b57cec5SDimitry Andric   UNW_MIPS_F18 = 50,
8620b57cec5SDimitry Andric   UNW_MIPS_F19 = 51,
8630b57cec5SDimitry Andric   UNW_MIPS_F20 = 52,
8640b57cec5SDimitry Andric   UNW_MIPS_F21 = 53,
8650b57cec5SDimitry Andric   UNW_MIPS_F22 = 54,
8660b57cec5SDimitry Andric   UNW_MIPS_F23 = 55,
8670b57cec5SDimitry Andric   UNW_MIPS_F24 = 56,
8680b57cec5SDimitry Andric   UNW_MIPS_F25 = 57,
8690b57cec5SDimitry Andric   UNW_MIPS_F26 = 58,
8700b57cec5SDimitry Andric   UNW_MIPS_F27 = 59,
8710b57cec5SDimitry Andric   UNW_MIPS_F28 = 60,
8720b57cec5SDimitry Andric   UNW_MIPS_F29 = 61,
8730b57cec5SDimitry Andric   UNW_MIPS_F30 = 62,
8740b57cec5SDimitry Andric   UNW_MIPS_F31 = 63,
8750b57cec5SDimitry Andric   UNW_MIPS_HI = 64,
8760b57cec5SDimitry Andric   UNW_MIPS_LO = 65,
8770b57cec5SDimitry Andric };
8780b57cec5SDimitry Andric 
8790b57cec5SDimitry Andric // SPARC registers
8800b57cec5SDimitry Andric enum {
8810b57cec5SDimitry Andric   UNW_SPARC_G0 = 0,
8820b57cec5SDimitry Andric   UNW_SPARC_G1 = 1,
8830b57cec5SDimitry Andric   UNW_SPARC_G2 = 2,
8840b57cec5SDimitry Andric   UNW_SPARC_G3 = 3,
8850b57cec5SDimitry Andric   UNW_SPARC_G4 = 4,
8860b57cec5SDimitry Andric   UNW_SPARC_G5 = 5,
8870b57cec5SDimitry Andric   UNW_SPARC_G6 = 6,
8880b57cec5SDimitry Andric   UNW_SPARC_G7 = 7,
8890b57cec5SDimitry Andric   UNW_SPARC_O0 = 8,
8900b57cec5SDimitry Andric   UNW_SPARC_O1 = 9,
8910b57cec5SDimitry Andric   UNW_SPARC_O2 = 10,
8920b57cec5SDimitry Andric   UNW_SPARC_O3 = 11,
8930b57cec5SDimitry Andric   UNW_SPARC_O4 = 12,
8940b57cec5SDimitry Andric   UNW_SPARC_O5 = 13,
8950b57cec5SDimitry Andric   UNW_SPARC_O6 = 14,
8960b57cec5SDimitry Andric   UNW_SPARC_O7 = 15,
8970b57cec5SDimitry Andric   UNW_SPARC_L0 = 16,
8980b57cec5SDimitry Andric   UNW_SPARC_L1 = 17,
8990b57cec5SDimitry Andric   UNW_SPARC_L2 = 18,
9000b57cec5SDimitry Andric   UNW_SPARC_L3 = 19,
9010b57cec5SDimitry Andric   UNW_SPARC_L4 = 20,
9020b57cec5SDimitry Andric   UNW_SPARC_L5 = 21,
9030b57cec5SDimitry Andric   UNW_SPARC_L6 = 22,
9040b57cec5SDimitry Andric   UNW_SPARC_L7 = 23,
9050b57cec5SDimitry Andric   UNW_SPARC_I0 = 24,
9060b57cec5SDimitry Andric   UNW_SPARC_I1 = 25,
9070b57cec5SDimitry Andric   UNW_SPARC_I2 = 26,
9080b57cec5SDimitry Andric   UNW_SPARC_I3 = 27,
9090b57cec5SDimitry Andric   UNW_SPARC_I4 = 28,
9100b57cec5SDimitry Andric   UNW_SPARC_I5 = 29,
9110b57cec5SDimitry Andric   UNW_SPARC_I6 = 30,
9120b57cec5SDimitry Andric   UNW_SPARC_I7 = 31,
9130b57cec5SDimitry Andric };
9140b57cec5SDimitry Andric 
9155ffd83dbSDimitry Andric // Hexagon register numbers
9165ffd83dbSDimitry Andric enum {
9175ffd83dbSDimitry Andric   UNW_HEXAGON_R0,
9185ffd83dbSDimitry Andric   UNW_HEXAGON_R1,
9195ffd83dbSDimitry Andric   UNW_HEXAGON_R2,
9205ffd83dbSDimitry Andric   UNW_HEXAGON_R3,
9215ffd83dbSDimitry Andric   UNW_HEXAGON_R4,
9225ffd83dbSDimitry Andric   UNW_HEXAGON_R5,
9235ffd83dbSDimitry Andric   UNW_HEXAGON_R6,
9245ffd83dbSDimitry Andric   UNW_HEXAGON_R7,
9255ffd83dbSDimitry Andric   UNW_HEXAGON_R8,
9265ffd83dbSDimitry Andric   UNW_HEXAGON_R9,
9275ffd83dbSDimitry Andric   UNW_HEXAGON_R10,
9285ffd83dbSDimitry Andric   UNW_HEXAGON_R11,
9295ffd83dbSDimitry Andric   UNW_HEXAGON_R12,
9305ffd83dbSDimitry Andric   UNW_HEXAGON_R13,
9315ffd83dbSDimitry Andric   UNW_HEXAGON_R14,
9325ffd83dbSDimitry Andric   UNW_HEXAGON_R15,
9335ffd83dbSDimitry Andric   UNW_HEXAGON_R16,
9345ffd83dbSDimitry Andric   UNW_HEXAGON_R17,
9355ffd83dbSDimitry Andric   UNW_HEXAGON_R18,
9365ffd83dbSDimitry Andric   UNW_HEXAGON_R19,
9375ffd83dbSDimitry Andric   UNW_HEXAGON_R20,
9385ffd83dbSDimitry Andric   UNW_HEXAGON_R21,
9395ffd83dbSDimitry Andric   UNW_HEXAGON_R22,
9405ffd83dbSDimitry Andric   UNW_HEXAGON_R23,
9415ffd83dbSDimitry Andric   UNW_HEXAGON_R24,
9425ffd83dbSDimitry Andric   UNW_HEXAGON_R25,
9435ffd83dbSDimitry Andric   UNW_HEXAGON_R26,
9445ffd83dbSDimitry Andric   UNW_HEXAGON_R27,
9455ffd83dbSDimitry Andric   UNW_HEXAGON_R28,
9465ffd83dbSDimitry Andric   UNW_HEXAGON_R29,
9475ffd83dbSDimitry Andric   UNW_HEXAGON_R30,
9485ffd83dbSDimitry Andric   UNW_HEXAGON_R31,
9495ffd83dbSDimitry Andric   UNW_HEXAGON_P3_0,
9505ffd83dbSDimitry Andric   UNW_HEXAGON_PC,
9515ffd83dbSDimitry Andric };
9525ffd83dbSDimitry Andric 
953480093f4SDimitry Andric // RISC-V registers. These match the DWARF register numbers defined by section
954480093f4SDimitry Andric // 4 of the RISC-V ELF psABI specification, which can be found at:
955480093f4SDimitry Andric //
956480093f4SDimitry Andric // https://github.com/riscv/riscv-elf-psabi-doc/blob/master/riscv-elf.md
957480093f4SDimitry Andric enum {
958480093f4SDimitry Andric   UNW_RISCV_X0  = 0,
959480093f4SDimitry Andric   UNW_RISCV_X1  = 1,
960480093f4SDimitry Andric   UNW_RISCV_X2  = 2,
961480093f4SDimitry Andric   UNW_RISCV_X3  = 3,
962480093f4SDimitry Andric   UNW_RISCV_X4  = 4,
963480093f4SDimitry Andric   UNW_RISCV_X5  = 5,
964480093f4SDimitry Andric   UNW_RISCV_X6  = 6,
965480093f4SDimitry Andric   UNW_RISCV_X7  = 7,
966480093f4SDimitry Andric   UNW_RISCV_X8  = 8,
967480093f4SDimitry Andric   UNW_RISCV_X9  = 9,
968480093f4SDimitry Andric   UNW_RISCV_X10 = 10,
969480093f4SDimitry Andric   UNW_RISCV_X11 = 11,
970480093f4SDimitry Andric   UNW_RISCV_X12 = 12,
971480093f4SDimitry Andric   UNW_RISCV_X13 = 13,
972480093f4SDimitry Andric   UNW_RISCV_X14 = 14,
973480093f4SDimitry Andric   UNW_RISCV_X15 = 15,
974480093f4SDimitry Andric   UNW_RISCV_X16 = 16,
975480093f4SDimitry Andric   UNW_RISCV_X17 = 17,
976480093f4SDimitry Andric   UNW_RISCV_X18 = 18,
977480093f4SDimitry Andric   UNW_RISCV_X19 = 19,
978480093f4SDimitry Andric   UNW_RISCV_X20 = 20,
979480093f4SDimitry Andric   UNW_RISCV_X21 = 21,
980480093f4SDimitry Andric   UNW_RISCV_X22 = 22,
981480093f4SDimitry Andric   UNW_RISCV_X23 = 23,
982480093f4SDimitry Andric   UNW_RISCV_X24 = 24,
983480093f4SDimitry Andric   UNW_RISCV_X25 = 25,
984480093f4SDimitry Andric   UNW_RISCV_X26 = 26,
985480093f4SDimitry Andric   UNW_RISCV_X27 = 27,
986480093f4SDimitry Andric   UNW_RISCV_X28 = 28,
987480093f4SDimitry Andric   UNW_RISCV_X29 = 29,
988480093f4SDimitry Andric   UNW_RISCV_X30 = 30,
989480093f4SDimitry Andric   UNW_RISCV_X31 = 31,
990480093f4SDimitry Andric   UNW_RISCV_F0  = 32,
991480093f4SDimitry Andric   UNW_RISCV_F1  = 33,
992480093f4SDimitry Andric   UNW_RISCV_F2  = 34,
993480093f4SDimitry Andric   UNW_RISCV_F3  = 35,
994480093f4SDimitry Andric   UNW_RISCV_F4  = 36,
995480093f4SDimitry Andric   UNW_RISCV_F5  = 37,
996480093f4SDimitry Andric   UNW_RISCV_F6  = 38,
997480093f4SDimitry Andric   UNW_RISCV_F7  = 39,
998480093f4SDimitry Andric   UNW_RISCV_F8  = 40,
999480093f4SDimitry Andric   UNW_RISCV_F9  = 41,
1000480093f4SDimitry Andric   UNW_RISCV_F10 = 42,
1001480093f4SDimitry Andric   UNW_RISCV_F11 = 43,
1002480093f4SDimitry Andric   UNW_RISCV_F12 = 44,
1003480093f4SDimitry Andric   UNW_RISCV_F13 = 45,
1004480093f4SDimitry Andric   UNW_RISCV_F14 = 46,
1005480093f4SDimitry Andric   UNW_RISCV_F15 = 47,
1006480093f4SDimitry Andric   UNW_RISCV_F16 = 48,
1007480093f4SDimitry Andric   UNW_RISCV_F17 = 49,
1008480093f4SDimitry Andric   UNW_RISCV_F18 = 50,
1009480093f4SDimitry Andric   UNW_RISCV_F19 = 51,
1010480093f4SDimitry Andric   UNW_RISCV_F20 = 52,
1011480093f4SDimitry Andric   UNW_RISCV_F21 = 53,
1012480093f4SDimitry Andric   UNW_RISCV_F22 = 54,
1013480093f4SDimitry Andric   UNW_RISCV_F23 = 55,
1014480093f4SDimitry Andric   UNW_RISCV_F24 = 56,
1015480093f4SDimitry Andric   UNW_RISCV_F25 = 57,
1016480093f4SDimitry Andric   UNW_RISCV_F26 = 58,
1017480093f4SDimitry Andric   UNW_RISCV_F27 = 59,
1018480093f4SDimitry Andric   UNW_RISCV_F28 = 60,
1019480093f4SDimitry Andric   UNW_RISCV_F29 = 61,
1020480093f4SDimitry Andric   UNW_RISCV_F30 = 62,
1021480093f4SDimitry Andric   UNW_RISCV_F31 = 63,
1022480093f4SDimitry Andric };
1023480093f4SDimitry Andric 
1024e8d8bef9SDimitry Andric // VE register numbers
1025e8d8bef9SDimitry Andric enum {
1026e8d8bef9SDimitry Andric   UNW_VE_S0   = 0,
1027e8d8bef9SDimitry Andric   UNW_VE_S1   = 1,
1028e8d8bef9SDimitry Andric   UNW_VE_S2   = 2,
1029e8d8bef9SDimitry Andric   UNW_VE_S3   = 3,
1030e8d8bef9SDimitry Andric   UNW_VE_S4   = 4,
1031e8d8bef9SDimitry Andric   UNW_VE_S5   = 5,
1032e8d8bef9SDimitry Andric   UNW_VE_S6   = 6,
1033e8d8bef9SDimitry Andric   UNW_VE_S7   = 7,
1034e8d8bef9SDimitry Andric   UNW_VE_S8   = 8,
1035e8d8bef9SDimitry Andric   UNW_VE_S9   = 9,
1036e8d8bef9SDimitry Andric   UNW_VE_S10  = 10,
1037e8d8bef9SDimitry Andric   UNW_VE_S11  = 11,
1038e8d8bef9SDimitry Andric   UNW_VE_S12  = 12,
1039e8d8bef9SDimitry Andric   UNW_VE_S13  = 13,
1040e8d8bef9SDimitry Andric   UNW_VE_S14  = 14,
1041e8d8bef9SDimitry Andric   UNW_VE_S15  = 15,
1042e8d8bef9SDimitry Andric   UNW_VE_S16  = 16,
1043e8d8bef9SDimitry Andric   UNW_VE_S17  = 17,
1044e8d8bef9SDimitry Andric   UNW_VE_S18  = 18,
1045e8d8bef9SDimitry Andric   UNW_VE_S19  = 19,
1046e8d8bef9SDimitry Andric   UNW_VE_S20  = 20,
1047e8d8bef9SDimitry Andric   UNW_VE_S21  = 21,
1048e8d8bef9SDimitry Andric   UNW_VE_S22  = 22,
1049e8d8bef9SDimitry Andric   UNW_VE_S23  = 23,
1050e8d8bef9SDimitry Andric   UNW_VE_S24  = 24,
1051e8d8bef9SDimitry Andric   UNW_VE_S25  = 25,
1052e8d8bef9SDimitry Andric   UNW_VE_S26  = 26,
1053e8d8bef9SDimitry Andric   UNW_VE_S27  = 27,
1054e8d8bef9SDimitry Andric   UNW_VE_S28  = 28,
1055e8d8bef9SDimitry Andric   UNW_VE_S29  = 29,
1056e8d8bef9SDimitry Andric   UNW_VE_S30  = 30,
1057e8d8bef9SDimitry Andric   UNW_VE_S31  = 31,
1058e8d8bef9SDimitry Andric   UNW_VE_S32  = 32,
1059e8d8bef9SDimitry Andric   UNW_VE_S33  = 33,
1060e8d8bef9SDimitry Andric   UNW_VE_S34  = 34,
1061e8d8bef9SDimitry Andric   UNW_VE_S35  = 35,
1062e8d8bef9SDimitry Andric   UNW_VE_S36  = 36,
1063e8d8bef9SDimitry Andric   UNW_VE_S37  = 37,
1064e8d8bef9SDimitry Andric   UNW_VE_S38  = 38,
1065e8d8bef9SDimitry Andric   UNW_VE_S39  = 39,
1066e8d8bef9SDimitry Andric   UNW_VE_S40  = 40,
1067e8d8bef9SDimitry Andric   UNW_VE_S41  = 41,
1068e8d8bef9SDimitry Andric   UNW_VE_S42  = 42,
1069e8d8bef9SDimitry Andric   UNW_VE_S43  = 43,
1070e8d8bef9SDimitry Andric   UNW_VE_S44  = 44,
1071e8d8bef9SDimitry Andric   UNW_VE_S45  = 45,
1072e8d8bef9SDimitry Andric   UNW_VE_S46  = 46,
1073e8d8bef9SDimitry Andric   UNW_VE_S47  = 47,
1074e8d8bef9SDimitry Andric   UNW_VE_S48  = 48,
1075e8d8bef9SDimitry Andric   UNW_VE_S49  = 49,
1076e8d8bef9SDimitry Andric   UNW_VE_S50  = 50,
1077e8d8bef9SDimitry Andric   UNW_VE_S51  = 51,
1078e8d8bef9SDimitry Andric   UNW_VE_S52  = 52,
1079e8d8bef9SDimitry Andric   UNW_VE_S53  = 53,
1080e8d8bef9SDimitry Andric   UNW_VE_S54  = 54,
1081e8d8bef9SDimitry Andric   UNW_VE_S55  = 55,
1082e8d8bef9SDimitry Andric   UNW_VE_S56  = 56,
1083e8d8bef9SDimitry Andric   UNW_VE_S57  = 57,
1084e8d8bef9SDimitry Andric   UNW_VE_S58  = 58,
1085e8d8bef9SDimitry Andric   UNW_VE_S59  = 59,
1086e8d8bef9SDimitry Andric   UNW_VE_S60  = 60,
1087e8d8bef9SDimitry Andric   UNW_VE_S61  = 61,
1088e8d8bef9SDimitry Andric   UNW_VE_S62  = 62,
1089e8d8bef9SDimitry Andric   UNW_VE_S63  = 63,
1090e8d8bef9SDimitry Andric   UNW_VE_V0   = 64 + 0,
1091e8d8bef9SDimitry Andric   UNW_VE_V1   = 64 + 1,
1092e8d8bef9SDimitry Andric   UNW_VE_V2   = 64 + 2,
1093e8d8bef9SDimitry Andric   UNW_VE_V3   = 64 + 3,
1094e8d8bef9SDimitry Andric   UNW_VE_V4   = 64 + 4,
1095e8d8bef9SDimitry Andric   UNW_VE_V5   = 64 + 5,
1096e8d8bef9SDimitry Andric   UNW_VE_V6   = 64 + 6,
1097e8d8bef9SDimitry Andric   UNW_VE_V7   = 64 + 7,
1098e8d8bef9SDimitry Andric   UNW_VE_V8   = 64 + 8,
1099e8d8bef9SDimitry Andric   UNW_VE_V9   = 64 + 9,
1100e8d8bef9SDimitry Andric   UNW_VE_V10  = 64 + 10,
1101e8d8bef9SDimitry Andric   UNW_VE_V11  = 64 + 11,
1102e8d8bef9SDimitry Andric   UNW_VE_V12  = 64 + 12,
1103e8d8bef9SDimitry Andric   UNW_VE_V13  = 64 + 13,
1104e8d8bef9SDimitry Andric   UNW_VE_V14  = 64 + 14,
1105e8d8bef9SDimitry Andric   UNW_VE_V15  = 64 + 15,
1106e8d8bef9SDimitry Andric   UNW_VE_V16  = 64 + 16,
1107e8d8bef9SDimitry Andric   UNW_VE_V17  = 64 + 17,
1108e8d8bef9SDimitry Andric   UNW_VE_V18  = 64 + 18,
1109e8d8bef9SDimitry Andric   UNW_VE_V19  = 64 + 19,
1110e8d8bef9SDimitry Andric   UNW_VE_V20  = 64 + 20,
1111e8d8bef9SDimitry Andric   UNW_VE_V21  = 64 + 21,
1112e8d8bef9SDimitry Andric   UNW_VE_V22  = 64 + 22,
1113e8d8bef9SDimitry Andric   UNW_VE_V23  = 64 + 23,
1114e8d8bef9SDimitry Andric   UNW_VE_V24  = 64 + 24,
1115e8d8bef9SDimitry Andric   UNW_VE_V25  = 64 + 25,
1116e8d8bef9SDimitry Andric   UNW_VE_V26  = 64 + 26,
1117e8d8bef9SDimitry Andric   UNW_VE_V27  = 64 + 27,
1118e8d8bef9SDimitry Andric   UNW_VE_V28  = 64 + 28,
1119e8d8bef9SDimitry Andric   UNW_VE_V29  = 64 + 29,
1120e8d8bef9SDimitry Andric   UNW_VE_V30  = 64 + 30,
1121e8d8bef9SDimitry Andric   UNW_VE_V31  = 64 + 31,
1122e8d8bef9SDimitry Andric   UNW_VE_V32  = 64 + 32,
1123e8d8bef9SDimitry Andric   UNW_VE_V33  = 64 + 33,
1124e8d8bef9SDimitry Andric   UNW_VE_V34  = 64 + 34,
1125e8d8bef9SDimitry Andric   UNW_VE_V35  = 64 + 35,
1126e8d8bef9SDimitry Andric   UNW_VE_V36  = 64 + 36,
1127e8d8bef9SDimitry Andric   UNW_VE_V37  = 64 + 37,
1128e8d8bef9SDimitry Andric   UNW_VE_V38  = 64 + 38,
1129e8d8bef9SDimitry Andric   UNW_VE_V39  = 64 + 39,
1130e8d8bef9SDimitry Andric   UNW_VE_V40  = 64 + 40,
1131e8d8bef9SDimitry Andric   UNW_VE_V41  = 64 + 41,
1132e8d8bef9SDimitry Andric   UNW_VE_V42  = 64 + 42,
1133e8d8bef9SDimitry Andric   UNW_VE_V43  = 64 + 43,
1134e8d8bef9SDimitry Andric   UNW_VE_V44  = 64 + 44,
1135e8d8bef9SDimitry Andric   UNW_VE_V45  = 64 + 45,
1136e8d8bef9SDimitry Andric   UNW_VE_V46  = 64 + 46,
1137e8d8bef9SDimitry Andric   UNW_VE_V47  = 64 + 47,
1138e8d8bef9SDimitry Andric   UNW_VE_V48  = 64 + 48,
1139e8d8bef9SDimitry Andric   UNW_VE_V49  = 64 + 49,
1140e8d8bef9SDimitry Andric   UNW_VE_V50  = 64 + 50,
1141e8d8bef9SDimitry Andric   UNW_VE_V51  = 64 + 51,
1142e8d8bef9SDimitry Andric   UNW_VE_V52  = 64 + 52,
1143e8d8bef9SDimitry Andric   UNW_VE_V53  = 64 + 53,
1144e8d8bef9SDimitry Andric   UNW_VE_V54  = 64 + 54,
1145e8d8bef9SDimitry Andric   UNW_VE_V55  = 64 + 55,
1146e8d8bef9SDimitry Andric   UNW_VE_V56  = 64 + 56,
1147e8d8bef9SDimitry Andric   UNW_VE_V57  = 64 + 57,
1148e8d8bef9SDimitry Andric   UNW_VE_V58  = 64 + 58,
1149e8d8bef9SDimitry Andric   UNW_VE_V59  = 64 + 59,
1150e8d8bef9SDimitry Andric   UNW_VE_V60  = 64 + 60,
1151e8d8bef9SDimitry Andric   UNW_VE_V61  = 64 + 61,
1152e8d8bef9SDimitry Andric   UNW_VE_V62  = 64 + 62,
1153e8d8bef9SDimitry Andric   UNW_VE_V63  = 64 + 63,
1154e8d8bef9SDimitry Andric   UNW_VE_VM0  = 128 + 0,
1155e8d8bef9SDimitry Andric   UNW_VE_VM1  = 128 + 1,
1156e8d8bef9SDimitry Andric   UNW_VE_VM2  = 128 + 2,
1157e8d8bef9SDimitry Andric   UNW_VE_VM3  = 128 + 3,
1158e8d8bef9SDimitry Andric   UNW_VE_VM4  = 128 + 4,
1159e8d8bef9SDimitry Andric   UNW_VE_VM5  = 128 + 5,
1160e8d8bef9SDimitry Andric   UNW_VE_VM6  = 128 + 6,
1161e8d8bef9SDimitry Andric   UNW_VE_VM7  = 128 + 7,
1162e8d8bef9SDimitry Andric   UNW_VE_VM8  = 128 + 8,
1163e8d8bef9SDimitry Andric   UNW_VE_VM9  = 128 + 9,
1164e8d8bef9SDimitry Andric   UNW_VE_VM10 = 128 + 10,
1165e8d8bef9SDimitry Andric   UNW_VE_VM11 = 128 + 11,
1166e8d8bef9SDimitry Andric   UNW_VE_VM12 = 128 + 12,
1167e8d8bef9SDimitry Andric   UNW_VE_VM13 = 128 + 13,
1168e8d8bef9SDimitry Andric   UNW_VE_VM14 = 128 + 14,
1169e8d8bef9SDimitry Andric   UNW_VE_VM15 = 128 + 15, // = 143
1170e8d8bef9SDimitry Andric 
1171e8d8bef9SDimitry Andric   // Following registers don't have DWARF register numbers.
1172e8d8bef9SDimitry Andric   UNW_VE_VIXR = 144,
1173e8d8bef9SDimitry Andric   UNW_VE_VL   = 145,
1174e8d8bef9SDimitry Andric };
1175e8d8bef9SDimitry Andric 
11760b57cec5SDimitry Andric #endif
1177