1 //===------------------------ UnwindRegistersSave.S -----------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
14 #if !defined(__USING_SJLJ_EXCEPTIONS__)
19 # extern int unw_getcontext(unw_context_t* thread_state)
23 # +-----------------------+
24 # + thread_state pointer +
25 # +-----------------------+
27 # +-----------------------+ <-- SP
30 DEFINE_LIBUNWIND_FUNCTION(unw_getcontext)
41 movl %edx, 28(%eax) # store what sp was at call site as esp
45 movl %edx, 40(%eax) # store return address as eip
52 movl %edx, (%eax) # store original eax
54 xorl %eax, %eax # return UNW_ESUCCESS
57 #elif defined(__x86_64__)
60 # extern int unw_getcontext(unw_context_t* thread_state)
63 # thread_state pointer is in rdi
65 DEFINE_LIBUNWIND_FUNCTION(unw_getcontext)
92 movq TMP,128(PTR) # store return address as rip
100 movdqu %xmm1,192(PTR)
101 movdqu %xmm2,208(PTR)
102 movdqu %xmm3,224(PTR)
103 movdqu %xmm4,240(PTR)
104 movdqu %xmm5,256(PTR)
105 movdqu %xmm6,272(PTR)
106 movdqu %xmm7,288(PTR)
107 movdqu %xmm8,304(PTR)
108 movdqu %xmm9,320(PTR)
109 movdqu %xmm10,336(PTR)
110 movdqu %xmm11,352(PTR)
111 movdqu %xmm12,368(PTR)
112 movdqu %xmm13,384(PTR)
113 movdqu %xmm14,400(PTR)
114 movdqu %xmm15,416(PTR)
116 xorl %eax, %eax # return UNW_ESUCCESS
119 #elif defined(__mips__) && defined(_ABIO32) && _MIPS_SIM == _ABIO32
122 # extern int unw_getcontext(unw_context_t* thread_state)
125 # thread_state pointer is in a0 ($4)
127 DEFINE_LIBUNWIND_FUNCTION(unw_getcontext)
163 # Store return address to pc
170 #ifdef __mips_hard_float
172 sdc1 $f0, (4 * 36 + 8 * 0)($4)
173 sdc1 $f2, (4 * 36 + 8 * 2)($4)
174 sdc1 $f4, (4 * 36 + 8 * 4)($4)
175 sdc1 $f6, (4 * 36 + 8 * 6)($4)
176 sdc1 $f8, (4 * 36 + 8 * 8)($4)
177 sdc1 $f10, (4 * 36 + 8 * 10)($4)
178 sdc1 $f12, (4 * 36 + 8 * 12)($4)
179 sdc1 $f14, (4 * 36 + 8 * 14)($4)
180 sdc1 $f16, (4 * 36 + 8 * 16)($4)
181 sdc1 $f18, (4 * 36 + 8 * 18)($4)
182 sdc1 $f20, (4 * 36 + 8 * 20)($4)
183 sdc1 $f22, (4 * 36 + 8 * 22)($4)
184 sdc1 $f24, (4 * 36 + 8 * 24)($4)
185 sdc1 $f26, (4 * 36 + 8 * 26)($4)
186 sdc1 $f28, (4 * 36 + 8 * 28)($4)
187 sdc1 $f30, (4 * 36 + 8 * 30)($4)
189 sdc1 $f0, (4 * 36 + 8 * 0)($4)
190 sdc1 $f1, (4 * 36 + 8 * 1)($4)
191 sdc1 $f2, (4 * 36 + 8 * 2)($4)
192 sdc1 $f3, (4 * 36 + 8 * 3)($4)
193 sdc1 $f4, (4 * 36 + 8 * 4)($4)
194 sdc1 $f5, (4 * 36 + 8 * 5)($4)
195 sdc1 $f6, (4 * 36 + 8 * 6)($4)
196 sdc1 $f7, (4 * 36 + 8 * 7)($4)
197 sdc1 $f8, (4 * 36 + 8 * 8)($4)
198 sdc1 $f9, (4 * 36 + 8 * 9)($4)
199 sdc1 $f10, (4 * 36 + 8 * 10)($4)
200 sdc1 $f11, (4 * 36 + 8 * 11)($4)
201 sdc1 $f12, (4 * 36 + 8 * 12)($4)
202 sdc1 $f13, (4 * 36 + 8 * 13)($4)
203 sdc1 $f14, (4 * 36 + 8 * 14)($4)
204 sdc1 $f15, (4 * 36 + 8 * 15)($4)
205 sdc1 $f16, (4 * 36 + 8 * 16)($4)
206 sdc1 $f17, (4 * 36 + 8 * 17)($4)
207 sdc1 $f18, (4 * 36 + 8 * 18)($4)
208 sdc1 $f19, (4 * 36 + 8 * 19)($4)
209 sdc1 $f20, (4 * 36 + 8 * 20)($4)
210 sdc1 $f21, (4 * 36 + 8 * 21)($4)
211 sdc1 $f22, (4 * 36 + 8 * 22)($4)
212 sdc1 $f23, (4 * 36 + 8 * 23)($4)
213 sdc1 $f24, (4 * 36 + 8 * 24)($4)
214 sdc1 $f25, (4 * 36 + 8 * 25)($4)
215 sdc1 $f26, (4 * 36 + 8 * 26)($4)
216 sdc1 $f27, (4 * 36 + 8 * 27)($4)
217 sdc1 $f28, (4 * 36 + 8 * 28)($4)
218 sdc1 $f29, (4 * 36 + 8 * 29)($4)
219 sdc1 $f30, (4 * 36 + 8 * 30)($4)
220 sdc1 $f31, (4 * 36 + 8 * 31)($4)
224 # return UNW_ESUCCESS
228 #elif defined(__mips64)
231 # extern int unw_getcontext(unw_context_t* thread_state)
234 # thread_state pointer is in a0 ($4)
236 DEFINE_LIBUNWIND_FUNCTION(unw_getcontext)
272 # Store return address to pc
279 #ifdef __mips_hard_float
280 sdc1 $f0, (8 * 35)($4)
281 sdc1 $f1, (8 * 36)($4)
282 sdc1 $f2, (8 * 37)($4)
283 sdc1 $f3, (8 * 38)($4)
284 sdc1 $f4, (8 * 39)($4)
285 sdc1 $f5, (8 * 40)($4)
286 sdc1 $f6, (8 * 41)($4)
287 sdc1 $f7, (8 * 42)($4)
288 sdc1 $f8, (8 * 43)($4)
289 sdc1 $f9, (8 * 44)($4)
290 sdc1 $f10, (8 * 45)($4)
291 sdc1 $f11, (8 * 46)($4)
292 sdc1 $f12, (8 * 47)($4)
293 sdc1 $f13, (8 * 48)($4)
294 sdc1 $f14, (8 * 49)($4)
295 sdc1 $f15, (8 * 50)($4)
296 sdc1 $f16, (8 * 51)($4)
297 sdc1 $f17, (8 * 52)($4)
298 sdc1 $f18, (8 * 53)($4)
299 sdc1 $f19, (8 * 54)($4)
300 sdc1 $f20, (8 * 55)($4)
301 sdc1 $f21, (8 * 56)($4)
302 sdc1 $f22, (8 * 57)($4)
303 sdc1 $f23, (8 * 58)($4)
304 sdc1 $f24, (8 * 59)($4)
305 sdc1 $f25, (8 * 60)($4)
306 sdc1 $f26, (8 * 61)($4)
307 sdc1 $f27, (8 * 62)($4)
308 sdc1 $f28, (8 * 63)($4)
309 sdc1 $f29, (8 * 64)($4)
310 sdc1 $f30, (8 * 65)($4)
311 sdc1 $f31, (8 * 66)($4)
314 # return UNW_ESUCCESS
318 # elif defined(__mips__)
321 # extern int unw_getcontext(unw_context_t* thread_state)
323 # Just trap for the time being.
324 DEFINE_LIBUNWIND_FUNCTION(unw_getcontext)
327 #elif defined(__powerpc64__)
330 // extern int unw_getcontext(unw_context_t* thread_state)
333 // thread_state pointer is in r3
335 DEFINE_LIBUNWIND_FUNCTION(unw_getcontext)
337 // store register (GPR)
338 #define PPC64_STR(n) \
339 std %r##n, (8 * (n + 2))(%r3)
344 std %r0, PPC64_OFFS_SRR0(%r3) // store lr as ssr0
378 std %r0, PPC64_OFFS_CR(%r3)
380 std %r0, PPC64_OFFS_XER(%r3)
382 std %r0, PPC64_OFFS_LR(%r3)
384 std %r0, PPC64_OFFS_CTR(%r3)
386 std %r0, PPC64_OFFS_VRSAVE(%r3)
390 // (note that this also saves floating point registers and V registers,
391 // because part of VS is mapped to these registers)
393 addi %r4, %r3, PPC64_OFFS_FP
396 #define PPC64_STVS(n) \
397 stxvd2x %vs##n, 0, %r4 ;\
468 #define PPC64_STF(n) \
469 stfd %f##n, (PPC64_OFFS_FP + n * 16)(%r3)
471 // save float registers
505 // save vector registers
507 // Use 16-bytes below the stack pointer as an
508 // aligned buffer to save each vector register.
509 // Note that the stack pointer is always 16-byte aligned.
512 #define PPC64_STV_UNALIGNED(n) \
513 stvx %v##n, 0, %r4 ;\
515 std %r5, (PPC64_OFFS_V + n * 16)(%r3) ;\
517 std %r5, (PPC64_OFFS_V + n * 16 + 8)(%r3)
519 PPC64_STV_UNALIGNED(0)
520 PPC64_STV_UNALIGNED(1)
521 PPC64_STV_UNALIGNED(2)
522 PPC64_STV_UNALIGNED(3)
523 PPC64_STV_UNALIGNED(4)
524 PPC64_STV_UNALIGNED(5)
525 PPC64_STV_UNALIGNED(6)
526 PPC64_STV_UNALIGNED(7)
527 PPC64_STV_UNALIGNED(8)
528 PPC64_STV_UNALIGNED(9)
529 PPC64_STV_UNALIGNED(10)
530 PPC64_STV_UNALIGNED(11)
531 PPC64_STV_UNALIGNED(12)
532 PPC64_STV_UNALIGNED(13)
533 PPC64_STV_UNALIGNED(14)
534 PPC64_STV_UNALIGNED(15)
535 PPC64_STV_UNALIGNED(16)
536 PPC64_STV_UNALIGNED(17)
537 PPC64_STV_UNALIGNED(18)
538 PPC64_STV_UNALIGNED(19)
539 PPC64_STV_UNALIGNED(20)
540 PPC64_STV_UNALIGNED(21)
541 PPC64_STV_UNALIGNED(22)
542 PPC64_STV_UNALIGNED(23)
543 PPC64_STV_UNALIGNED(24)
544 PPC64_STV_UNALIGNED(25)
545 PPC64_STV_UNALIGNED(26)
546 PPC64_STV_UNALIGNED(27)
547 PPC64_STV_UNALIGNED(28)
548 PPC64_STV_UNALIGNED(29)
549 PPC64_STV_UNALIGNED(30)
550 PPC64_STV_UNALIGNED(31)
554 li %r3, 0 // return UNW_ESUCCESS
558 #elif defined(__ppc__)
561 ; extern int unw_getcontext(unw_context_t* thread_state)
564 ; thread_state pointer is in r3
566 DEFINE_LIBUNWIND_FUNCTION(unw_getcontext)
569 stw r0, 0(r3) ; store lr as ssr0
602 ; save VRSave register
612 ; save float registers
647 ; save vector registers
650 rlwinm r4,r4,0,0,27 ; mask low 4-bits
651 ; r4 is now a 16-byte aligned pointer into the red zone
653 #define SAVE_VECTOR_UNALIGNED(_vec, _offset) \
656 stw r5, _offset(r3) @\
658 stw r5, _offset+4(r3) @\
660 stw r5, _offset+8(r3) @\
662 stw r5, _offset+12(r3)
664 SAVE_VECTOR_UNALIGNED( v0, 424+0x000)
665 SAVE_VECTOR_UNALIGNED( v1, 424+0x010)
666 SAVE_VECTOR_UNALIGNED( v2, 424+0x020)
667 SAVE_VECTOR_UNALIGNED( v3, 424+0x030)
668 SAVE_VECTOR_UNALIGNED( v4, 424+0x040)
669 SAVE_VECTOR_UNALIGNED( v5, 424+0x050)
670 SAVE_VECTOR_UNALIGNED( v6, 424+0x060)
671 SAVE_VECTOR_UNALIGNED( v7, 424+0x070)
672 SAVE_VECTOR_UNALIGNED( v8, 424+0x080)
673 SAVE_VECTOR_UNALIGNED( v9, 424+0x090)
674 SAVE_VECTOR_UNALIGNED(v10, 424+0x0A0)
675 SAVE_VECTOR_UNALIGNED(v11, 424+0x0B0)
676 SAVE_VECTOR_UNALIGNED(v12, 424+0x0C0)
677 SAVE_VECTOR_UNALIGNED(v13, 424+0x0D0)
678 SAVE_VECTOR_UNALIGNED(v14, 424+0x0E0)
679 SAVE_VECTOR_UNALIGNED(v15, 424+0x0F0)
680 SAVE_VECTOR_UNALIGNED(v16, 424+0x100)
681 SAVE_VECTOR_UNALIGNED(v17, 424+0x110)
682 SAVE_VECTOR_UNALIGNED(v18, 424+0x120)
683 SAVE_VECTOR_UNALIGNED(v19, 424+0x130)
684 SAVE_VECTOR_UNALIGNED(v20, 424+0x140)
685 SAVE_VECTOR_UNALIGNED(v21, 424+0x150)
686 SAVE_VECTOR_UNALIGNED(v22, 424+0x160)
687 SAVE_VECTOR_UNALIGNED(v23, 424+0x170)
688 SAVE_VECTOR_UNALIGNED(v24, 424+0x180)
689 SAVE_VECTOR_UNALIGNED(v25, 424+0x190)
690 SAVE_VECTOR_UNALIGNED(v26, 424+0x1A0)
691 SAVE_VECTOR_UNALIGNED(v27, 424+0x1B0)
692 SAVE_VECTOR_UNALIGNED(v28, 424+0x1C0)
693 SAVE_VECTOR_UNALIGNED(v29, 424+0x1D0)
694 SAVE_VECTOR_UNALIGNED(v30, 424+0x1E0)
695 SAVE_VECTOR_UNALIGNED(v31, 424+0x1F0)
697 li r3, 0 ; return UNW_ESUCCESS
701 #elif defined(__arm64__) || defined(__aarch64__)
704 // extern int unw_getcontext(unw_context_t* thread_state)
707 // thread_state pointer is in x0
710 DEFINE_LIBUNWIND_FUNCTION(unw_getcontext)
711 stp x0, x1, [x0, #0x000]
712 stp x2, x3, [x0, #0x010]
713 stp x4, x5, [x0, #0x020]
714 stp x6, x7, [x0, #0x030]
715 stp x8, x9, [x0, #0x040]
716 stp x10,x11, [x0, #0x050]
717 stp x12,x13, [x0, #0x060]
718 stp x14,x15, [x0, #0x070]
719 stp x16,x17, [x0, #0x080]
720 stp x18,x19, [x0, #0x090]
721 stp x20,x21, [x0, #0x0A0]
722 stp x22,x23, [x0, #0x0B0]
723 stp x24,x25, [x0, #0x0C0]
724 stp x26,x27, [x0, #0x0D0]
725 stp x28,x29, [x0, #0x0E0]
726 str x30, [x0, #0x0F0]
729 str x30, [x0, #0x100] // store return address as pc
731 stp d0, d1, [x0, #0x110]
732 stp d2, d3, [x0, #0x120]
733 stp d4, d5, [x0, #0x130]
734 stp d6, d7, [x0, #0x140]
735 stp d8, d9, [x0, #0x150]
736 stp d10,d11, [x0, #0x160]
737 stp d12,d13, [x0, #0x170]
738 stp d14,d15, [x0, #0x180]
739 stp d16,d17, [x0, #0x190]
740 stp d18,d19, [x0, #0x1A0]
741 stp d20,d21, [x0, #0x1B0]
742 stp d22,d23, [x0, #0x1C0]
743 stp d24,d25, [x0, #0x1D0]
744 stp d26,d27, [x0, #0x1E0]
745 stp d28,d29, [x0, #0x1F0]
746 str d30, [x0, #0x200]
747 str d31, [x0, #0x208]
748 mov x0, #0 // return UNW_ESUCCESS
751 #elif defined(__arm__) && !defined(__APPLE__)
753 #if !defined(__ARM_ARCH_ISA_ARM)
758 @ extern int unw_getcontext(unw_context_t* thread_state)
761 @ thread_state pointer is in r0
763 @ Per EHABI #4.7 this only saves the core integer registers.
764 @ EHABI #7.4.5 notes that in general all VRS registers should be restored
765 @ however this is very hard to do for VFP registers because it is unknown
766 @ to the library how many registers are implemented by the architecture.
767 @ Instead, VFP registers are demand saved by logic external to unw_getcontext.
770 DEFINE_LIBUNWIND_FUNCTION(unw_getcontext)
771 #if !defined(__ARM_ARCH_ISA_ARM) && __ARM_ARCH_ISA_THUMB == 1
780 str r1, [r0, #0] @ r11
781 @ r12 does not need storing, it it the intra-procedure-call scratch register
782 str r2, [r0, #8] @ sp
783 str r3, [r0, #12] @ lr
784 str r3, [r0, #16] @ store return address as pc
785 @ T1 does not have a non-cpsr-clobbering register-zeroing instruction.
786 @ It is safe to use here though because we are about to return, and cpsr is
787 @ not expected to be preserved.
788 movs r0, #0 @ return UNW_ESUCCESS
790 @ 32bit thumb-2 restrictions for stm:
791 @ . the sp (r13) cannot be in the list
792 @ . the pc (r15) cannot be in the list in an STM instruction
796 str lr, [r0, #60] @ store return address as pc
797 mov r0, #0 @ return UNW_ESUCCESS
802 @ static void libunwind::Registers_arm::saveVFPWithFSTMD(unw_fpreg_t* values)
805 @ values pointer is in r0
811 DEFINE_LIBUNWIND_PRIVATE_FUNCTION(_ZN9libunwind13Registers_arm16saveVFPWithFSTMDEPy)
816 @ static void libunwind::Registers_arm::saveVFPWithFSTMX(unw_fpreg_t* values)
819 @ values pointer is in r0
825 DEFINE_LIBUNWIND_PRIVATE_FUNCTION(_ZN9libunwind13Registers_arm16saveVFPWithFSTMXEPy)
826 vstmia r0, {d0-d15} @ fstmiax is deprecated in ARMv7+ and now behaves like vstmia
830 @ static void libunwind::Registers_arm::saveVFPv3(unw_fpreg_t* values)
833 @ values pointer is in r0
839 DEFINE_LIBUNWIND_PRIVATE_FUNCTION(_ZN9libunwind13Registers_arm9saveVFPv3EPy)
840 @ VFP and iwMMX instructions are only available when compiling with the flags
841 @ that enable them. We do not want to do that in the library (because we do not
842 @ want the compiler to generate instructions that access those) but this is
843 @ only accessed if the personality routine needs these registers. Use of
844 @ these registers implies they are, actually, available on the target, so
845 @ it's ok to execute.
846 @ So, generate the instructions using the corresponding coprocessor mnemonic.
850 #if defined(_LIBUNWIND_ARM_WMMX)
853 @ static void libunwind::Registers_arm::saveiWMMX(unw_fpreg_t* values)
856 @ values pointer is in r0
862 DEFINE_LIBUNWIND_PRIVATE_FUNCTION(_ZN9libunwind13Registers_arm9saveiWMMXEPy)
863 stcl p1, cr0, [r0], #8 @ wstrd wR0, [r0], #8
864 stcl p1, cr1, [r0], #8 @ wstrd wR1, [r0], #8
865 stcl p1, cr2, [r0], #8 @ wstrd wR2, [r0], #8
866 stcl p1, cr3, [r0], #8 @ wstrd wR3, [r0], #8
867 stcl p1, cr4, [r0], #8 @ wstrd wR4, [r0], #8
868 stcl p1, cr5, [r0], #8 @ wstrd wR5, [r0], #8
869 stcl p1, cr6, [r0], #8 @ wstrd wR6, [r0], #8
870 stcl p1, cr7, [r0], #8 @ wstrd wR7, [r0], #8
871 stcl p1, cr8, [r0], #8 @ wstrd wR8, [r0], #8
872 stcl p1, cr9, [r0], #8 @ wstrd wR9, [r0], #8
873 stcl p1, cr10, [r0], #8 @ wstrd wR10, [r0], #8
874 stcl p1, cr11, [r0], #8 @ wstrd wR11, [r0], #8
875 stcl p1, cr12, [r0], #8 @ wstrd wR12, [r0], #8
876 stcl p1, cr13, [r0], #8 @ wstrd wR13, [r0], #8
877 stcl p1, cr14, [r0], #8 @ wstrd wR14, [r0], #8
878 stcl p1, cr15, [r0], #8 @ wstrd wR15, [r0], #8
882 @ static void libunwind::Registers_arm::saveiWMMXControl(unw_uint32_t* values)
885 @ values pointer is in r0
891 DEFINE_LIBUNWIND_PRIVATE_FUNCTION(_ZN9libunwind13Registers_arm16saveiWMMXControlEPj)
892 stc2 p1, cr8, [r0], #4 @ wstrw wCGR0, [r0], #4
893 stc2 p1, cr9, [r0], #4 @ wstrw wCGR1, [r0], #4
894 stc2 p1, cr10, [r0], #4 @ wstrw wCGR2, [r0], #4
895 stc2 p1, cr11, [r0], #4 @ wstrw wCGR3, [r0], #4
900 #elif defined(__or1k__)
903 # extern int unw_getcontext(unw_context_t* thread_state)
906 # thread_state pointer is in r3
908 DEFINE_LIBUNWIND_FUNCTION(unw_getcontext)
946 #elif defined(__riscv)
949 # extern int unw_getcontext(unw_context_t* thread_state)
952 # thread_state pointer is in a0
954 DEFINE_LIBUNWIND_FUNCTION(unw_getcontext)
988 #ifdef __riscv_float_abi_double
989 fsd f0, (8 * 32 + 8 * 0)(a0)
990 fsd f1, (8 * 32 + 8 * 1)(a0)
991 fsd f2, (8 * 32 + 8 * 2)(a0)
992 fsd f3, (8 * 32 + 8 * 3)(a0)
993 fsd f4, (8 * 32 + 8 * 4)(a0)
994 fsd f5, (8 * 32 + 8 * 5)(a0)
995 fsd f6, (8 * 32 + 8 * 6)(a0)
996 fsd f7, (8 * 32 + 8 * 7)(a0)
997 fsd f8, (8 * 32 + 8 * 8)(a0)
998 fsd f9, (8 * 32 + 8 * 9)(a0)
999 fsd f10, (8 * 32 + 8 * 10)(a0)
1000 fsd f11, (8 * 32 + 8 * 11)(a0)
1001 fsd f12, (8 * 32 + 8 * 12)(a0)
1002 fsd f13, (8 * 32 + 8 * 13)(a0)
1003 fsd f14, (8 * 32 + 8 * 14)(a0)
1004 fsd f15, (8 * 32 + 8 * 15)(a0)
1005 fsd f16, (8 * 32 + 8 * 16)(a0)
1006 fsd f17, (8 * 32 + 8 * 17)(a0)
1007 fsd f18, (8 * 32 + 8 * 18)(a0)
1008 fsd f19, (8 * 32 + 8 * 19)(a0)
1009 fsd f20, (8 * 32 + 8 * 20)(a0)
1010 fsd f21, (8 * 32 + 8 * 21)(a0)
1011 fsd f22, (8 * 32 + 8 * 22)(a0)
1012 fsd f23, (8 * 32 + 8 * 23)(a0)
1013 fsd f24, (8 * 32 + 8 * 24)(a0)
1014 fsd f25, (8 * 32 + 8 * 25)(a0)
1015 fsd f26, (8 * 32 + 8 * 26)(a0)
1016 fsd f27, (8 * 32 + 8 * 27)(a0)
1017 fsd f28, (8 * 32 + 8 * 28)(a0)
1018 fsd f29, (8 * 32 + 8 * 29)(a0)
1019 fsd f30, (8 * 32 + 8 * 30)(a0)
1020 fsd f31, (8 * 32 + 8 * 31)(a0)
1023 li a0, 0 // return UNW_ESUCCESS
1026 #elif defined(__sparc__)
1029 # extern int unw_getcontext(unw_context_t* thread_state)
1032 # thread_state pointer is in o0
1034 DEFINE_LIBUNWIND_FUNCTION(unw_getcontext)
1050 std %i2, [%o0 + 104]
1051 std %i4, [%o0 + 112]
1052 std %i6, [%o0 + 120]
1054 clr %o0 // return UNW_ESUCCESS
1056 #endif /* !defined(__USING_SJLJ_EXCEPTIONS__) */
1058 NO_EXEC_STACK_DIRECTIVE