summaryrefslogblamecommitdiff
path: root/user/qemu/ppc32-musl-support.patch
blob: 4c6ab59eb6a04b418e8e1018e73ab780084e4b3a (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16














                                                                                   
--- qemu-2.12.0/accel/tcg/user-exec.c.old	2018-07-30 03:20:04.910000000 +0000
+++ qemu-2.12.0/accel/tcg/user-exec.c	2018-07-30 03:38:57.350000000 +0000
@@ -304,8 +304,13 @@
 #define CR_sig(context)                        REG_sig(ccr, context)
 
 #else // Musl
+#if defined(_ARCH_PPC64)
 #define REG_sig(reg_num, context)              \
     ((context)->uc_mcontext.gp_regs[reg_num])
+#else
+#define REG_sig(reg_num, context)              \
+    ((context)->uc_mcontext.gregs[reg_num])
+#endif
 /* Gpr Registers access  */
 #define GPR_sig(reg_num, context)              REG_sig(gpr[reg_num], context)
 /* Program counter */