musl-ppc.patch 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535
  1. diff -Nur gcc-4.7.3.orig/libgcc/config/rs6000/linux-unwind.h gcc-4.7.3/libgcc/config/rs6000/linux-unwind.h
  2. --- gcc-4.7.3.orig/libgcc/config/rs6000/linux-unwind.h 2011-11-12 18:20:58.000000000 +0100
  3. +++ gcc-4.7.3/libgcc/config/rs6000/linux-unwind.h 2013-09-15 18:29:20.000000000 +0200
  4. @@ -27,7 +27,6 @@
  5. #define R_CR2 70
  6. #define R_VR0 77
  7. #define R_VRSAVE 109
  8. -#define R_VSCR 110
  9. struct gcc_vregs
  10. {
  11. @@ -176,38 +175,6 @@
  12. }
  13. #endif
  14. -/* Find an entry in the process auxiliary vector. The canonical way to
  15. - test for VMX is to look at AT_HWCAP. */
  16. -
  17. -static long
  18. -ppc_linux_aux_vector (long which)
  19. -{
  20. - /* __libc_stack_end holds the original stack passed to a process. */
  21. - extern long *__libc_stack_end;
  22. - long argc;
  23. - char **argv;
  24. - char **envp;
  25. - struct auxv
  26. - {
  27. - long a_type;
  28. - long a_val;
  29. - } *auxp;
  30. -
  31. - /* The Linux kernel puts argc first on the stack. */
  32. - argc = __libc_stack_end[0];
  33. - /* Followed by argv, NULL terminated. */
  34. - argv = (char **) __libc_stack_end + 1;
  35. - /* Followed by environment string pointers, NULL terminated. */
  36. - envp = argv + argc + 1;
  37. - while (*envp++)
  38. - continue;
  39. - /* Followed by the aux vector, zero terminated. */
  40. - for (auxp = (struct auxv *) envp; auxp->a_type != 0; ++auxp)
  41. - if (auxp->a_type == which)
  42. - return auxp->a_val;
  43. - return 0;
  44. -}
  45. -
  46. /* Do code reading to identify a signal frame, and set the frame
  47. state data appropriately. See unwind-dw2.c for the structs. */
  48. @@ -217,8 +184,8 @@
  49. ppc_fallback_frame_state (struct _Unwind_Context *context,
  50. _Unwind_FrameState *fs)
  51. {
  52. - static long hwcap = 0;
  53. struct gcc_regs *regs = get_regs (context);
  54. + struct gcc_vregs *vregs;
  55. long new_cfa;
  56. int i;
  57. @@ -230,12 +197,15 @@
  58. fs->regs.cfa_reg = STACK_POINTER_REGNUM;
  59. fs->regs.cfa_offset = new_cfa - (long) context->cfa;
  60. - for (i = 0; i < 32; i++)
  61. - if (i != STACK_POINTER_REGNUM)
  62. - {
  63. - fs->regs.reg[i].how = REG_SAVED_OFFSET;
  64. - fs->regs.reg[i].loc.offset = (long) &regs->gpr[i] - new_cfa;
  65. - }
  66. +#ifdef __powerpc64__
  67. + fs->regs.reg[2].how = REG_SAVED_OFFSET;
  68. + fs->regs.reg[2].loc.offset = (long) &regs->gpr[2] - new_cfa;
  69. +#endif
  70. + for (i = 14; i < 32; i++)
  71. + {
  72. + fs->regs.reg[i].how = REG_SAVED_OFFSET;
  73. + fs->regs.reg[i].loc.offset = (long) &regs->gpr[i] - new_cfa;
  74. + }
  75. fs->regs.reg[R_CR2].how = REG_SAVED_OFFSET;
  76. /* CR? regs are always 32-bit and PPC is big-endian, so in 64-bit
  77. @@ -251,57 +221,35 @@
  78. fs->retaddr_column = ARG_POINTER_REGNUM;
  79. fs->signal_frame = 1;
  80. - if (hwcap == 0)
  81. + /* If we have a FPU... */
  82. + for (i = 14; i < 32; i++)
  83. {
  84. - hwcap = ppc_linux_aux_vector (16);
  85. - /* These will already be set if we found AT_HWCAP. A nonzero
  86. - value stops us looking again if for some reason we couldn't
  87. - find AT_HWCAP. */
  88. -#ifdef __powerpc64__
  89. - hwcap |= 0xc0000000;
  90. -#else
  91. - hwcap |= 0x80000000;
  92. -#endif
  93. + fs->regs.reg[i + 32].how = REG_SAVED_OFFSET;
  94. + fs->regs.reg[i + 32].loc.offset = (long) &regs->fpr[i] - new_cfa;
  95. }
  96. - /* If we have a FPU... */
  97. - if (hwcap & 0x08000000)
  98. - for (i = 0; i < 32; i++)
  99. - {
  100. - fs->regs.reg[i + 32].how = REG_SAVED_OFFSET;
  101. - fs->regs.reg[i + 32].loc.offset = (long) &regs->fpr[i] - new_cfa;
  102. - }
  103. -
  104. /* If we have a VMX unit... */
  105. - if (hwcap & 0x10000000)
  106. - {
  107. - struct gcc_vregs *vregs;
  108. #ifdef __powerpc64__
  109. - vregs = regs->vp;
  110. + vregs = regs->vp;
  111. #else
  112. - vregs = &regs->vregs;
  113. + vregs = &regs->vregs;
  114. #endif
  115. - if (regs->msr & (1 << 25))
  116. + if (regs->msr & (1 << 25))
  117. + {
  118. + for (i = 20; i < 32; i++)
  119. {
  120. - for (i = 0; i < 32; i++)
  121. - {
  122. - fs->regs.reg[i + R_VR0].how = REG_SAVED_OFFSET;
  123. - fs->regs.reg[i + R_VR0].loc.offset
  124. - = (long) &vregs->vr[i] - new_cfa;
  125. - }
  126. -
  127. - fs->regs.reg[R_VSCR].how = REG_SAVED_OFFSET;
  128. - fs->regs.reg[R_VSCR].loc.offset = (long) &vregs->vscr - new_cfa;
  129. + fs->regs.reg[i + R_VR0].how = REG_SAVED_OFFSET;
  130. + fs->regs.reg[i + R_VR0].loc.offset = (long) &vregs->vr[i] - new_cfa;
  131. }
  132. -
  133. - fs->regs.reg[R_VRSAVE].how = REG_SAVED_OFFSET;
  134. - fs->regs.reg[R_VRSAVE].loc.offset = (long) &vregs->vsave - new_cfa;
  135. }
  136. + fs->regs.reg[R_VRSAVE].how = REG_SAVED_OFFSET;
  137. + fs->regs.reg[R_VRSAVE].loc.offset = (long) &vregs->vsave - new_cfa;
  138. +
  139. /* If we have SPE register high-parts... we check at compile-time to
  140. avoid expanding the code for all other PowerPC. */
  141. #ifdef __SPE__
  142. - for (i = 0; i < 32; i++)
  143. + for (i = 14; i < 32; i++)
  144. {
  145. fs->regs.reg[i + FIRST_PSEUDO_REGISTER - 1].how = REG_SAVED_OFFSET;
  146. fs->regs.reg[i + FIRST_PSEUDO_REGISTER - 1].loc.offset
  147. diff -Nur gcc-4.7.3.orig/libgcc/config/rs6000/linux-unwind.h.orig gcc-4.7.3/libgcc/config/rs6000/linux-unwind.h.orig
  148. --- gcc-4.7.3.orig/libgcc/config/rs6000/linux-unwind.h.orig 1970-01-01 01:00:00.000000000 +0100
  149. +++ gcc-4.7.3/libgcc/config/rs6000/linux-unwind.h.orig 2011-11-12 18:20:58.000000000 +0100
  150. @@ -0,0 +1,376 @@
  151. +/* DWARF2 EH unwinding support for PowerPC and PowerPC64 Linux.
  152. + Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011
  153. + Free Software Foundation, Inc.
  154. +
  155. + This file is part of GCC.
  156. +
  157. + GCC is free software; you can redistribute it and/or modify it
  158. + under the terms of the GNU General Public License as published
  159. + by the Free Software Foundation; either version 3, or (at your
  160. + option) any later version.
  161. +
  162. + GCC is distributed in the hope that it will be useful, but WITHOUT
  163. + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  164. + or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
  165. + License for more details.
  166. +
  167. + Under Section 7 of GPL version 3, you are granted additional
  168. + permissions described in the GCC Runtime Library Exception, version
  169. + 3.1, as published by the Free Software Foundation.
  170. +
  171. + You should have received a copy of the GNU General Public License and
  172. + a copy of the GCC Runtime Library Exception along with this program;
  173. + see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
  174. + <http://www.gnu.org/licenses/>. */
  175. +
  176. +#define R_LR 65
  177. +#define R_CR2 70
  178. +#define R_VR0 77
  179. +#define R_VRSAVE 109
  180. +#define R_VSCR 110
  181. +
  182. +struct gcc_vregs
  183. +{
  184. + __attribute__ ((vector_size (16))) int vr[32];
  185. +#ifdef __powerpc64__
  186. + unsigned int pad1[3];
  187. + unsigned int vscr;
  188. + unsigned int vsave;
  189. + unsigned int pad2[3];
  190. +#else
  191. + unsigned int vsave;
  192. + unsigned int pad[2];
  193. + unsigned int vscr;
  194. +#endif
  195. +};
  196. +
  197. +struct gcc_regs
  198. +{
  199. + unsigned long gpr[32];
  200. + unsigned long nip;
  201. + unsigned long msr;
  202. + unsigned long orig_gpr3;
  203. + unsigned long ctr;
  204. + unsigned long link;
  205. + unsigned long xer;
  206. + unsigned long ccr;
  207. + unsigned long softe;
  208. + unsigned long trap;
  209. + unsigned long dar;
  210. + unsigned long dsisr;
  211. + unsigned long result;
  212. + unsigned long pad1[4];
  213. + double fpr[32];
  214. + unsigned int pad2;
  215. + unsigned int fpscr;
  216. +#ifdef __powerpc64__
  217. + struct gcc_vregs *vp;
  218. +#else
  219. + unsigned int pad3[2];
  220. +#endif
  221. + struct gcc_vregs vregs;
  222. +};
  223. +
  224. +struct gcc_ucontext
  225. +{
  226. +#ifdef __powerpc64__
  227. + unsigned long pad[28];
  228. +#else
  229. + unsigned long pad[12];
  230. +#endif
  231. + struct gcc_regs *regs;
  232. + struct gcc_regs rsave;
  233. +};
  234. +
  235. +#ifdef __powerpc64__
  236. +
  237. +enum { SIGNAL_FRAMESIZE = 128 };
  238. +
  239. +/* If PC is at a sigreturn trampoline, return a pointer to the
  240. + regs. Otherwise return NULL. */
  241. +
  242. +static struct gcc_regs *
  243. +get_regs (struct _Unwind_Context *context)
  244. +{
  245. + const unsigned int *pc = context->ra;
  246. +
  247. + /* addi r1, r1, 128; li r0, 0x0077; sc (sigreturn) */
  248. + /* addi r1, r1, 128; li r0, 0x00AC; sc (rt_sigreturn) */
  249. + if (pc[0] != 0x38210000 + SIGNAL_FRAMESIZE || pc[2] != 0x44000002)
  250. + return NULL;
  251. + if (pc[1] == 0x38000077)
  252. + {
  253. + struct sigframe {
  254. + char gap[SIGNAL_FRAMESIZE];
  255. + unsigned long pad[7];
  256. + struct gcc_regs *regs;
  257. + } *frame = (struct sigframe *) context->cfa;
  258. + return frame->regs;
  259. + }
  260. + else if (pc[1] == 0x380000AC)
  261. + {
  262. + /* This works for 2.4 kernels, but not for 2.6 kernels with vdso
  263. + because pc isn't pointing into the stack. Can be removed when
  264. + no one is running 2.4.19 or 2.4.20, the first two ppc64
  265. + kernels released. */
  266. + const struct rt_sigframe_24 {
  267. + int tramp[6];
  268. + void *pinfo;
  269. + struct gcc_ucontext *puc;
  270. + } *frame24 = (const struct rt_sigframe_24 *) context->ra;
  271. +
  272. + /* Test for magic value in *puc of vdso. */
  273. + if ((long) frame24->puc != -21 * 8)
  274. + return frame24->puc->regs;
  275. + else
  276. + {
  277. + /* This works for 2.4.21 and later kernels. */
  278. + struct rt_sigframe {
  279. + char gap[SIGNAL_FRAMESIZE];
  280. + struct gcc_ucontext uc;
  281. + unsigned long pad[2];
  282. + int tramp[6];
  283. + void *pinfo;
  284. + struct gcc_ucontext *puc;
  285. + } *frame = (struct rt_sigframe *) context->cfa;
  286. + return frame->uc.regs;
  287. + }
  288. + }
  289. + return NULL;
  290. +}
  291. +
  292. +#else /* !__powerpc64__ */
  293. +
  294. +enum { SIGNAL_FRAMESIZE = 64 };
  295. +
  296. +static struct gcc_regs *
  297. +get_regs (struct _Unwind_Context *context)
  298. +{
  299. + const unsigned int *pc = context->ra;
  300. +
  301. + /* li r0, 0x7777; sc (sigreturn old) */
  302. + /* li r0, 0x0077; sc (sigreturn new) */
  303. + /* li r0, 0x6666; sc (rt_sigreturn old) */
  304. + /* li r0, 0x00AC; sc (rt_sigreturn new) */
  305. + if (pc[1] != 0x44000002)
  306. + return NULL;
  307. + if (pc[0] == 0x38007777 || pc[0] == 0x38000077)
  308. + {
  309. + struct sigframe {
  310. + char gap[SIGNAL_FRAMESIZE];
  311. + unsigned long pad[7];
  312. + struct gcc_regs *regs;
  313. + } *frame = (struct sigframe *) context->cfa;
  314. + return frame->regs;
  315. + }
  316. + else if (pc[0] == 0x38006666 || pc[0] == 0x380000AC)
  317. + {
  318. + struct rt_sigframe {
  319. + char gap[SIGNAL_FRAMESIZE + 16];
  320. + char siginfo[128];
  321. + struct gcc_ucontext uc;
  322. + } *frame = (struct rt_sigframe *) context->cfa;
  323. + return frame->uc.regs;
  324. + }
  325. + return NULL;
  326. +}
  327. +#endif
  328. +
  329. +/* Find an entry in the process auxiliary vector. The canonical way to
  330. + test for VMX is to look at AT_HWCAP. */
  331. +
  332. +static long
  333. +ppc_linux_aux_vector (long which)
  334. +{
  335. + /* __libc_stack_end holds the original stack passed to a process. */
  336. + extern long *__libc_stack_end;
  337. + long argc;
  338. + char **argv;
  339. + char **envp;
  340. + struct auxv
  341. + {
  342. + long a_type;
  343. + long a_val;
  344. + } *auxp;
  345. +
  346. + /* The Linux kernel puts argc first on the stack. */
  347. + argc = __libc_stack_end[0];
  348. + /* Followed by argv, NULL terminated. */
  349. + argv = (char **) __libc_stack_end + 1;
  350. + /* Followed by environment string pointers, NULL terminated. */
  351. + envp = argv + argc + 1;
  352. + while (*envp++)
  353. + continue;
  354. + /* Followed by the aux vector, zero terminated. */
  355. + for (auxp = (struct auxv *) envp; auxp->a_type != 0; ++auxp)
  356. + if (auxp->a_type == which)
  357. + return auxp->a_val;
  358. + return 0;
  359. +}
  360. +
  361. +/* Do code reading to identify a signal frame, and set the frame
  362. + state data appropriately. See unwind-dw2.c for the structs. */
  363. +
  364. +#define MD_FALLBACK_FRAME_STATE_FOR ppc_fallback_frame_state
  365. +
  366. +static _Unwind_Reason_Code
  367. +ppc_fallback_frame_state (struct _Unwind_Context *context,
  368. + _Unwind_FrameState *fs)
  369. +{
  370. + static long hwcap = 0;
  371. + struct gcc_regs *regs = get_regs (context);
  372. + long new_cfa;
  373. + int i;
  374. +
  375. + if (regs == NULL)
  376. + return _URC_END_OF_STACK;
  377. +
  378. + new_cfa = regs->gpr[STACK_POINTER_REGNUM];
  379. + fs->regs.cfa_how = CFA_REG_OFFSET;
  380. + fs->regs.cfa_reg = STACK_POINTER_REGNUM;
  381. + fs->regs.cfa_offset = new_cfa - (long) context->cfa;
  382. +
  383. + for (i = 0; i < 32; i++)
  384. + if (i != STACK_POINTER_REGNUM)
  385. + {
  386. + fs->regs.reg[i].how = REG_SAVED_OFFSET;
  387. + fs->regs.reg[i].loc.offset = (long) &regs->gpr[i] - new_cfa;
  388. + }
  389. +
  390. + fs->regs.reg[R_CR2].how = REG_SAVED_OFFSET;
  391. + /* CR? regs are always 32-bit and PPC is big-endian, so in 64-bit
  392. + libgcc loc.offset needs to point to the low 32 bits of regs->ccr. */
  393. + fs->regs.reg[R_CR2].loc.offset = (long) &regs->ccr - new_cfa
  394. + + sizeof (long) - 4;
  395. +
  396. + fs->regs.reg[R_LR].how = REG_SAVED_OFFSET;
  397. + fs->regs.reg[R_LR].loc.offset = (long) &regs->link - new_cfa;
  398. +
  399. + fs->regs.reg[ARG_POINTER_REGNUM].how = REG_SAVED_OFFSET;
  400. + fs->regs.reg[ARG_POINTER_REGNUM].loc.offset = (long) &regs->nip - new_cfa;
  401. + fs->retaddr_column = ARG_POINTER_REGNUM;
  402. + fs->signal_frame = 1;
  403. +
  404. + if (hwcap == 0)
  405. + {
  406. + hwcap = ppc_linux_aux_vector (16);
  407. + /* These will already be set if we found AT_HWCAP. A nonzero
  408. + value stops us looking again if for some reason we couldn't
  409. + find AT_HWCAP. */
  410. +#ifdef __powerpc64__
  411. + hwcap |= 0xc0000000;
  412. +#else
  413. + hwcap |= 0x80000000;
  414. +#endif
  415. + }
  416. +
  417. + /* If we have a FPU... */
  418. + if (hwcap & 0x08000000)
  419. + for (i = 0; i < 32; i++)
  420. + {
  421. + fs->regs.reg[i + 32].how = REG_SAVED_OFFSET;
  422. + fs->regs.reg[i + 32].loc.offset = (long) &regs->fpr[i] - new_cfa;
  423. + }
  424. +
  425. + /* If we have a VMX unit... */
  426. + if (hwcap & 0x10000000)
  427. + {
  428. + struct gcc_vregs *vregs;
  429. +#ifdef __powerpc64__
  430. + vregs = regs->vp;
  431. +#else
  432. + vregs = &regs->vregs;
  433. +#endif
  434. + if (regs->msr & (1 << 25))
  435. + {
  436. + for (i = 0; i < 32; i++)
  437. + {
  438. + fs->regs.reg[i + R_VR0].how = REG_SAVED_OFFSET;
  439. + fs->regs.reg[i + R_VR0].loc.offset
  440. + = (long) &vregs->vr[i] - new_cfa;
  441. + }
  442. +
  443. + fs->regs.reg[R_VSCR].how = REG_SAVED_OFFSET;
  444. + fs->regs.reg[R_VSCR].loc.offset = (long) &vregs->vscr - new_cfa;
  445. + }
  446. +
  447. + fs->regs.reg[R_VRSAVE].how = REG_SAVED_OFFSET;
  448. + fs->regs.reg[R_VRSAVE].loc.offset = (long) &vregs->vsave - new_cfa;
  449. + }
  450. +
  451. + /* If we have SPE register high-parts... we check at compile-time to
  452. + avoid expanding the code for all other PowerPC. */
  453. +#ifdef __SPE__
  454. + for (i = 0; i < 32; i++)
  455. + {
  456. + fs->regs.reg[i + FIRST_PSEUDO_REGISTER - 1].how = REG_SAVED_OFFSET;
  457. + fs->regs.reg[i + FIRST_PSEUDO_REGISTER - 1].loc.offset
  458. + = (long) &regs->vregs - new_cfa + 4 * i;
  459. + }
  460. +#endif
  461. +
  462. + return _URC_NO_REASON;
  463. +}
  464. +
  465. +#define MD_FROB_UPDATE_CONTEXT frob_update_context
  466. +
  467. +static void
  468. +frob_update_context (struct _Unwind_Context *context, _Unwind_FrameState *fs ATTRIBUTE_UNUSED)
  469. +{
  470. + const unsigned int *pc = (const unsigned int *) context->ra;
  471. +
  472. + /* Fix up for 2.6.12 - 2.6.16 Linux kernels that have vDSO, but don't
  473. + have S flag in it. */
  474. +#ifdef __powerpc64__
  475. + /* addi r1, r1, 128; li r0, 0x0077; sc (sigreturn) */
  476. + /* addi r1, r1, 128; li r0, 0x00AC; sc (rt_sigreturn) */
  477. + if (pc[0] == 0x38210000 + SIGNAL_FRAMESIZE
  478. + && (pc[1] == 0x38000077 || pc[1] == 0x380000AC)
  479. + && pc[2] == 0x44000002)
  480. + _Unwind_SetSignalFrame (context, 1);
  481. +#else
  482. + /* li r0, 0x7777; sc (sigreturn old) */
  483. + /* li r0, 0x0077; sc (sigreturn new) */
  484. + /* li r0, 0x6666; sc (rt_sigreturn old) */
  485. + /* li r0, 0x00AC; sc (rt_sigreturn new) */
  486. + if ((pc[0] == 0x38007777 || pc[0] == 0x38000077
  487. + || pc[0] == 0x38006666 || pc[0] == 0x380000AC)
  488. + && pc[1] == 0x44000002)
  489. + _Unwind_SetSignalFrame (context, 1);
  490. +#endif
  491. +
  492. +#ifdef __powerpc64__
  493. + if (fs->regs.reg[2].how == REG_UNSAVED)
  494. + {
  495. + /* If the current unwind info (FS) does not contain explicit info
  496. + saving R2, then we have to do a minor amount of code reading to
  497. + figure out if it was saved. The big problem here is that the
  498. + code that does the save/restore is generated by the linker, so
  499. + we have no good way to determine at compile time what to do. */
  500. + if (pc[0] == 0xF8410028
  501. + || ((pc[0] & 0xFFFF0000) == 0x3D820000
  502. + && pc[1] == 0xF8410028))
  503. + {
  504. + /* We are in a plt call stub or r2 adjusting long branch stub,
  505. + before r2 has been saved. Keep REG_UNSAVED. */
  506. + }
  507. + else
  508. + {
  509. + unsigned int *insn
  510. + = (unsigned int *) _Unwind_GetGR (context, R_LR);
  511. + if (insn && *insn == 0xE8410028)
  512. + _Unwind_SetGRPtr (context, 2, context->cfa + 40);
  513. + else if (pc[0] == 0x4E800421
  514. + && pc[1] == 0xE8410028)
  515. + {
  516. + /* We are at the bctrl instruction in a call via function
  517. + pointer. gcc always emits the load of the new R2 just
  518. + before the bctrl so this is the first and only place
  519. + we need to use the stored R2. */
  520. + _Unwind_Word sp = _Unwind_GetGR (context, 1);
  521. + _Unwind_SetGRPtr (context, 2, (void *)(sp + 40));
  522. + }
  523. + }
  524. + }
  525. +#endif
  526. +}