summaryrefslogtreecommitdiff
path: root/libunwind/include
diff options
context:
space:
mode:
Diffstat (limited to 'libunwind/include')
-rw-r--r--libunwind/include/__libunwind_config.h8
-rw-r--r--libunwind/include/libunwind.h38
-rw-r--r--libunwind/include/unwind.h21
3 files changed, 54 insertions, 13 deletions
diff --git a/libunwind/include/__libunwind_config.h b/libunwind/include/__libunwind_config.h
index 4d03bd83d8c6..71d77ca65118 100644
--- a/libunwind/include/__libunwind_config.h
+++ b/libunwind/include/__libunwind_config.h
@@ -23,6 +23,7 @@
#define _LIBUNWIND_HIGHEST_DWARF_REGISTER_OR1K 32
#define _LIBUNWIND_HIGHEST_DWARF_REGISTER_MIPS 65
#define _LIBUNWIND_HIGHEST_DWARF_REGISTER_SPARC 31
+#define _LIBUNWIND_HIGHEST_DWARF_REGISTER_HEXAGON 34
#define _LIBUNWIND_HIGHEST_DWARF_REGISTER_RISCV 64
#if defined(_LIBUNWIND_IS_NATIVE_ONLY)
@@ -82,6 +83,12 @@
# define _LIBUNWIND_CONTEXT_SIZE 16
# define _LIBUNWIND_CURSOR_SIZE 24
# define _LIBUNWIND_HIGHEST_DWARF_REGISTER _LIBUNWIND_HIGHEST_DWARF_REGISTER_OR1K
+# elif defined(__hexagon__)
+# define _LIBUNWIND_TARGET_HEXAGON 1
+// Values here change when : Registers.hpp - hexagon_thread_state_t change
+# define _LIBUNWIND_CONTEXT_SIZE 18
+# define _LIBUNWIND_CURSOR_SIZE 24
+# define _LIBUNWIND_HIGHEST_DWARF_REGISTER _LIBUNWIND_HIGHEST_DWARF_REGISTER_HEXAGON
# elif defined(__mips__)
# if defined(_ABIO32) && _MIPS_SIM == _ABIO32
# define _LIBUNWIND_TARGET_MIPS_O32 1
@@ -142,6 +149,7 @@
# define _LIBUNWIND_TARGET_MIPS_O32 1
# define _LIBUNWIND_TARGET_MIPS_NEWABI 1
# define _LIBUNWIND_TARGET_SPARC 1
+# define _LIBUNWIND_TARGET_HEXAGON 1
# define _LIBUNWIND_TARGET_RISCV 1
# define _LIBUNWIND_CONTEXT_SIZE 167
# define _LIBUNWIND_CURSOR_SIZE 179
diff --git a/libunwind/include/libunwind.h b/libunwind/include/libunwind.h
index 1a501b867dda..23ef47f4ac83 100644
--- a/libunwind/include/libunwind.h
+++ b/libunwind/include/libunwind.h
@@ -832,6 +832,44 @@ enum {
UNW_SPARC_I7 = 31,
};
+// Hexagon register numbers
+enum {
+ UNW_HEXAGON_R0,
+ UNW_HEXAGON_R1,
+ UNW_HEXAGON_R2,
+ UNW_HEXAGON_R3,
+ UNW_HEXAGON_R4,
+ UNW_HEXAGON_R5,
+ UNW_HEXAGON_R6,
+ UNW_HEXAGON_R7,
+ UNW_HEXAGON_R8,
+ UNW_HEXAGON_R9,
+ UNW_HEXAGON_R10,
+ UNW_HEXAGON_R11,
+ UNW_HEXAGON_R12,
+ UNW_HEXAGON_R13,
+ UNW_HEXAGON_R14,
+ UNW_HEXAGON_R15,
+ UNW_HEXAGON_R16,
+ UNW_HEXAGON_R17,
+ UNW_HEXAGON_R18,
+ UNW_HEXAGON_R19,
+ UNW_HEXAGON_R20,
+ UNW_HEXAGON_R21,
+ UNW_HEXAGON_R22,
+ UNW_HEXAGON_R23,
+ UNW_HEXAGON_R24,
+ UNW_HEXAGON_R25,
+ UNW_HEXAGON_R26,
+ UNW_HEXAGON_R27,
+ UNW_HEXAGON_R28,
+ UNW_HEXAGON_R29,
+ UNW_HEXAGON_R30,
+ UNW_HEXAGON_R31,
+ UNW_HEXAGON_P3_0,
+ UNW_HEXAGON_PC,
+};
+
// RISC-V registers. These match the DWARF register numbers defined by section
// 4 of the RISC-V ELF psABI specification, which can be found at:
//
diff --git a/libunwind/include/unwind.h b/libunwind/include/unwind.h
index b6cc70498b37..1d3444cd83b4 100644
--- a/libunwind/include/unwind.h
+++ b/libunwind/include/unwind.h
@@ -111,10 +111,9 @@ typedef _Unwind_Reason_Code (*_Unwind_Stop_Fn)
_Unwind_Exception* exceptionObject,
struct _Unwind_Context* context);
-typedef _Unwind_Reason_Code (*__personality_routine)
- (_Unwind_State state,
- _Unwind_Exception* exceptionObject,
- struct _Unwind_Context* context);
+typedef _Unwind_Reason_Code (*_Unwind_Personality_Fn)(
+ _Unwind_State state, _Unwind_Exception *exceptionObject,
+ struct _Unwind_Context *context);
#else
struct _Unwind_Context; // opaque
struct _Unwind_Exception; // forward declaration
@@ -150,12 +149,9 @@ typedef _Unwind_Reason_Code (*_Unwind_Stop_Fn)
struct _Unwind_Context* context,
void* stop_parameter );
-typedef _Unwind_Reason_Code (*__personality_routine)
- (int version,
- _Unwind_Action actions,
- uint64_t exceptionClass,
- _Unwind_Exception* exceptionObject,
- struct _Unwind_Context* context);
+typedef _Unwind_Reason_Code (*_Unwind_Personality_Fn)(
+ int version, _Unwind_Action actions, uint64_t exceptionClass,
+ _Unwind_Exception *exceptionObject, struct _Unwind_Context *context);
#endif
#ifdef __cplusplus
@@ -387,10 +383,9 @@ typedef struct _DISPATCHER_CONTEXT DISPATCHER_CONTEXT;
#endif
// This is the common wrapper for GCC-style personality functions with SEH.
extern EXCEPTION_DISPOSITION _GCC_specific_handler(EXCEPTION_RECORD *exc,
- void *frame,
- CONTEXT *ctx,
+ void *frame, CONTEXT *ctx,
DISPATCHER_CONTEXT *disp,
- __personality_routine pers);
+ _Unwind_Personality_Fn pers);
#endif
#ifdef __cplusplus