Added
Link Here
|
1 |
--- include/libunwind-aarch64.h.orig 2021-12-01 00:46:39 UTC |
2 |
+++ include/libunwind-aarch64.h |
3 |
@@ -226,15 +226,24 @@ typedef struct |
4 |
#else |
5 |
/* On AArch64, we can directly use ucontext_t as the unwind context. */ |
6 |
typedef ucontext_t unw_tdep_context_t; |
7 |
+#if defined(__FreeBSD__) |
8 |
+typedef ucontext_t unw_fpsimd_context_t; |
9 |
#endif |
10 |
+#endif |
11 |
|
12 |
|
13 |
#include "libunwind-common.h" |
14 |
#include "libunwind-dynamic.h" |
15 |
|
16 |
+#if defined(__FreeBSD__) |
17 |
+#define UNW_BASE register uint64_t unw_base __asm__ ("x0") = (uint64_t) unw_ctx->uc_mcontext.mc_gpregs.gp_x[0]; |
18 |
+#else |
19 |
+#define UNW_BASE register uint64_t unw_base __asm__ ("x0") = (uint64_t) unw_ctx->uc_mcontext.regs; |
20 |
+#endif |
21 |
+ |
22 |
#define unw_tdep_getcontext(uc) ({ \ |
23 |
unw_tdep_context_t *unw_ctx = (uc); \ |
24 |
- register uint64_t unw_base __asm__ ("x0") = (uint64_t) unw_ctx->uc_mcontext.regs; \ |
25 |
+ UNW_BASE \ |
26 |
__asm__ __volatile__ ( \ |
27 |
"stp x0, x1, [%[base], #0]\n" \ |
28 |
"stp x2, x3, [%[base], #16]\n" \ |