blob: 436057df76e033883429d9d67bd7c622c96ed68b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
diff -Nru a/runtime/signals_osdep.h b/runtime/signals_osdep.h
--- a/runtime/signals_osdep.h 2019-06-14 08:21:51.000000000 -0300
+++ b/runtime/signals_osdep.h 2019-07-16 14:21:56.751434439 -0300
@@ -297,11 +297,19 @@
sigact.sa_flags = 0
typedef unsigned long context_reg;
- #define CONTEXT_PC (context->regs->nip)
- #define CONTEXT_EXCEPTION_POINTER (context->regs->gpr[29])
- #define CONTEXT_YOUNG_LIMIT (context->regs->gpr[30])
- #define CONTEXT_YOUNG_PTR (context->regs->gpr[31])
- #define CONTEXT_SP (context->regs->gpr[1])
+ #ifdef __powerpc64__
+ #define CONTEXT_PC (context->gp_regs[32])
+ #define CONTEXT_EXCEPTION_POINTER (context->gp_regs[29])
+ #define CONTEXT_YOUNG_LIMIT (context->gp_regs[30])
+ #define CONTEXT_YOUNG_PTR (context->gp_regs[31])
+ #define CONTEXT_SP (context->gp_regs[1])
+ #else
+ #define CONTEXT_PC (context->regs->nip)
+ #define CONTEXT_EXCEPTION_POINTER (context->regs->gpr[29])
+ #define CONTEXT_YOUNG_LIMIT (context->regs->gpr[30])
+ #define CONTEXT_YOUNG_PTR (context->regs->gpr[31])
+ #define CONTEXT_SP (context->regs->gpr[1])
+ #endif
/****************** PowerPC, NetBSD */
@@ -354,11 +362,11 @@
sigact.sa_flags = 0
typedef unsigned long context_reg;
- #define CONTEXT_PC (context->sregs->regs.psw.addr)
- #define CONTEXT_EXCEPTION_POINTER (context->sregs->regs.gprs[13])
- #define CONTEXT_YOUNG_LIMIT (context->sregs->regs.gprs[10])
- #define CONTEXT_YOUNG_PTR (context->sregs->regs.gprs[11])
- #define CONTEXT_SP (context->sregs->regs.gprs[15])
+ #define CONTEXT_PC (context->sregs->psw.addr)
+ #define CONTEXT_EXCEPTION_POINTER (context->sregs->gregs[13])
+ #define CONTEXT_YOUNG_LIMIT (context->sregs->gregs[10])
+ #define CONTEXT_YOUNG_PTR (context->sregs->gregs[11])
+ #define CONTEXT_SP (context->sregs->gregs[15])
/******************** Default */
|