1 /* src/vm/jit/powerpc/asmpart.S - Java-C interface functions for PowerPC
3 Copyright (C) 1996-2005, 2006 R. Grafl, A. Krall, C. Kruegel,
4 C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
5 E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
6 J. Wenninger, Institut f. Computersprachen - TU Wien
8 This file is part of CACAO.
10 This program is free software.text; you can redistribute it and/or
11 modify it under the terms of the GNU General Public License as
12 published by the Free Software Foundation; either version 2, or (at
13 your option) any later version.
15 This program is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY ; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
25 Contact: cacao@cacaojvm.org
27 Authors: Andreas Krall
31 Changes: Christian Thalinger
34 $Id: asmpart.S 4894 2006-05-08 11:05:48Z twisti $
44 #include "vm/jit/abi-asm.h"
45 #include "vm/jit/methodheader.h"
46 #include "vm/jit/powerpc/offsets.h"
54 /* export functions ***********************************************************/
56 .globl asm_vm_call_method
57 .globl asm_vm_call_method_int
58 .globl asm_vm_call_method_long
59 .globl asm_vm_call_method_float
60 .globl asm_vm_call_method_double
62 .globl asm_vm_call_method_exception_handler
64 .globl asm_call_jit_compiler
66 .globl asm_handle_nat_exception
67 .globl asm_handle_exception
69 .globl asm_wrapper_patcher
71 .globl asm_replacement_out
72 .globl asm_replacement_in
75 .globl asm_initialize_thread_stack
76 .globl asm_perform_threadswitch
77 .globl asm_switchstackandcall
78 .globl asm_criticalsections
79 .globl asm_getclassvalues_atomic
82 /* asm_vm_call_method **********************************************************
84 * This function calls a Java-method (which possibly needs compilation) *
85 * with up to 4 address parameters. *
87 * This functions calls the JIT-compiler which eventually translates the *
88 * method into machine code. *
91 * javaobject_header *asm_calljavamethod (methodinfo *m, *
92 * void *arg1, void *arg2, void *arg3, void *arg4); *
94 *******************************************************************************/
98 .long 0 /* catch type all */
99 .long 0 /* exception handler pc */
101 .long 0 /* start pc */
102 .long 1 /* extable size */
103 .long 0 /* line number table start */
104 .long 0 /* line number table size */
105 .long 0 /* fltsave */
106 .long 0 /* intsave */
109 .long 0 /* frame size */
110 .long 0 /* method pointer (pointer to name) */
113 asm_vm_call_method_int:
114 asm_vm_call_method_long:
115 asm_vm_call_method_float:
116 asm_vm_call_method_double:
118 stw r0,LA_LR_OFFSET(r1)
121 stw s0,8*4(sp) /* save used callee saved registers */
122 stw a0,9*4(sp) /* save method pointer for compiler */
124 #if defined(__DARWIN__)
125 stw itmp1,10*4(sp) /* register r11 is callee saved */
127 stw pv,11*4(sp) /* save PV register */
129 stw itmp3,12*4(sp) /* registers r14-r31 are callee saved */
130 stfd ftmp1,14*4(sp) /* registers f14-f31 are callee saved */
133 #if defined(__DARWIN__)
149 SAVE_TEMPORARY_REGISTERS(18) /* the offset has to be even */
152 mr itmp2,a1 /* arg count */
153 mr itmp1,a2 /* pointer to arg block */
155 mr t4,itmp2 /* save argument count */
156 mr t5,itmp1 /* save argument block pointer */
158 mr s0,sp /* save current sp to s0 */
160 addi itmp1,itmp1,-sizevmarg /* initialize pointer (smaller code) */
161 addi itmp2,itmp2,1 /* initialize argument count */
162 li t0,0 /* initialize integer argument counter */
163 li t1,0 /* initialize float argument counter */
164 li t6,0 /* initialize integer register counter */
166 mflr r0 /* save link register (PIC code) */
167 bl L_asm_vm_call_method_get_pc
168 L_asm_vm_call_method_get_pc:
169 mflr t3 /* t3 contains the current pc */
173 addi itmp1,itmp1,sizevmarg /* goto next argument block */
174 addi itmp2,itmp2,-1 /* argument count - 1 */
176 beq L_register_copy_done
178 #if WORDS_BIGENDIAN == 1
179 lwz itmp3,offvmargtype+4(itmp1)
183 andi. r0,itmp3,0x0002 /* is this a float/double type? */
184 bne L_register_handle_float
186 L_register_handle_int:
187 cmpwi t6,INT_ARG_CNT /* are we out of integer argument */
188 beq L_register_copy /* registers? yes, next loop */
190 andi. r0,itmp3,0x0001 /* is this a 2-word type? */
191 bne L_register_handle_long
193 #if defined(__DARWIN__)
194 addis itmp3,t3,ha16(L_jumptable_int - L_asm_vm_call_method_get_pc)
195 la itmp3,lo16(L_jumptable_int - L_asm_vm_call_method_get_pc)(itmp3)
197 lis itmp3,L_jumptable_int@ha
198 addi itmp3,itmp3,L_jumptable_int@l
200 slwi t2,t6,2 /* multiple of 4-bytes */
201 add itmp3,itmp3,t2 /* calculate address of jumptable */
202 lwz itmp3,0(itmp3) /* load function address */
204 addi t0,t0,1 /* integer argument counter */
205 addi t6,t6,1 /* integer argument register counter */
208 L_register_handle_long:
209 #if defined(__DARWIN__)
210 addis itmp3,t3,ha16(L_jumptable_long - L_asm_vm_call_method_get_pc)
211 la itmp3,lo16(L_jumptable_long - L_asm_vm_call_method_get_pc)(itmp3)
213 lis itmp3,L_jumptable_long@ha
214 addi itmp3,itmp3,L_jumptable_long@l
216 addi t6,t6,1 /* align to even numbers */
219 cmpwi t6,(INT_ARG_CNT - 1) /* are we out of integer argument */
220 bge L_register_copy /* registers? yes, next loop */
222 slwi t2,t6,2 /* multiple of 4-bytes */
223 add itmp3,itmp3,t2 /* calculate address of jumptable */
224 lwz itmp3,0(itmp3) /* load function address */
226 addi t0,t0,1 /* integer argument counter */
227 addi t6,t6,2 /* integer argument register counter */
230 L_register_handle_float:
231 cmpwi t1,FLT_ARG_CNT /* are we out of float argument */
232 beq L_register_copy /* registers? yes, next loop */
234 andi. r0,itmp3,0x0001 /* is this a 2-word type? */
235 bne L_register_handle_double
237 #if defined(__DARWIN__)
238 addis itmp3,t3,ha16(L_jumptable_float - L_asm_vm_call_method_get_pc)
239 la itmp3,lo16(L_jumptable_float - L_asm_vm_call_method_get_pc)(itmp3)
241 lis itmp3,L_jumptable_float@ha
242 addi itmp3,itmp3,L_jumptable_float@l
244 slwi t2,t1,2 /* multiple of 4-bytes */
245 add itmp3,itmp3,t2 /* calculate address of jumptable */
246 lwz itmp3,0(itmp3) /* load function address */
248 addi t1,t1,1 /* float argument counter */
251 L_register_handle_double:
252 #if defined(__DARWIN__)
253 addis itmp3,t3,ha16(L_jumptable_double - L_asm_vm_call_method_get_pc)
254 la itmp3,lo16(L_jumptable_double - L_asm_vm_call_method_get_pc)(itmp3)
256 lis itmp3,L_jumptable_double@ha
257 addi itmp3,itmp3,L_jumptable_double@l
259 slwi t2,t1,2 /* multiple of 4-bytes */
260 add itmp3,itmp3,t2 /* calculate address of jumptable */
261 lwz itmp3,0(itmp3) /* load function address */
263 addi t1,t1,1 /* float argument counter */
266 L_register_copy_done:
267 /* calculate remaining arguments */
268 sub t6,t4,t0 /* - integer arguments in registers */
269 sub t6,t6,t1 /* - float arguments in registers */
271 beq L_stack_copy_done
273 mr itmp2,t4 /* restore argument count */
274 mr itmp1,t5 /* restore argument block pointer */
276 slwi t6,t6,3 /* XXX use 8-bytes slots for now */
277 addi t6,t6,LA_SIZE /* add size of linkage area */
280 mr t6,sp /* use t6 as temporary sp */
281 addi t6,t6,LA_SIZE /* skip linkage area */
283 addi itmp1,itmp1,-sizevmarg /* initialize pointer (smaller code) */
284 addi itmp2,itmp2,1 /* initialize argument count */
287 addi itmp1,itmp1,sizevmarg /* goto next argument block */
288 addi itmp2,itmp2,-1 /* argument count - 1 */
290 beq L_stack_copy_done
292 #if WORDS_BIGENDIAN == 1
293 lwz itmp3,offvmargtype+4(itmp1)
297 andi. r0,itmp3,0x0002 /* is this a float/double type? */
298 bne L_stack_handle_float
301 addi t0,t0,-1 /* arguments assigned to registers */
303 bge L_stack_copy_loop
305 andi. r0,itmp3,0x0001 /* is this a 2-word type? */
306 bne L_stack_handle_long
308 lwz itmp3,offvmargdata+4(itmp1) /* get integer argument */
309 stw itmp3,0(t6) /* and store it on the stack */
310 addi t6,t6,4 /* increase temporary sp by 1 slot */
314 addi t6,t6,4 /* align stack to 8-bytes */
315 rlwinm t6,t6,0,30,28 /* clear lower 4-bits */
317 lwz itmp3,offvmargdata+0(itmp1) /* get long argument */
318 stw itmp3,0(t6) /* and store it on the stack */
319 lwz itmp3,offvmargdata+4(itmp1)
321 addi t6,t6,8 /* increase temporary sp by 2 slots */
324 L_stack_handle_float:
325 addi t1,t1,-1 /* arguments assigned to registers */
327 bge L_stack_copy_loop
329 andi. r0,itmp3,0x0001 /* is this a 2-word type? */
330 bne L_stack_handle_double
332 lfs ftmp3,offvmargdata(itmp1) /* get float argument */
333 stfs ftmp3,0(t6) /* and store it on the stack */
334 addi t6,t6,4 /* increase temporary sp by 1 slot */
337 L_stack_handle_double:
338 addi t6,t6,4 /* align stack to 8-bytes */
339 rlwinm t6,t6,0,30,28 /* clear lower 4-bits */
341 lfd ftmp3,offvmargdata(itmp1) /* get double argument */
342 stfd ftmp3,0(t6) /* and store it on the stack */
343 addi t6,t6,8 /* increase temporary sp by 2 slots */
347 lwz itmp1,9*4(s0) /* pass method pointer via tmp1 */
349 #if defined(__DARWIN__)
350 addis mptr,t3,ha16(L_asm_call_jit_compiler - L_asm_vm_call_method_get_pc)
351 la mptr,lo16(L_asm_call_jit_compiler - L_asm_vm_call_method_get_pc)(mptr)
353 lis mptr,L_asm_call_jit_compiler@ha
354 addi mptr,mptr,L_asm_call_jit_compiler@l
364 #if defined(__DARWIN__)
365 addi pv,itmp1,lo16(asm_vm_call_method - 1b)
367 addi pv,itmp1,(asm_vm_call_method - 1b)@l
370 L_asm_vm_call_method_return:
371 mr sp,s0 /* restore the function's sp */
373 lwz s0,8*4(sp) /* restore used callee saved registers */
375 #if defined(__DARWIN__)
376 lwz itmp1,10*4(sp) /* register r11 is callee saved */
378 lwz pv,11*4(sp) /* save PV register */
381 lfd ftmp1,14*4(sp) /* registers f14-f31 are callee saved */
384 #if defined(__DARWIN__)
400 RESTORE_TEMPORARY_REGISTERS(18) /* the offset has to be even */
403 lwz r0,40*4+LA_LR_OFFSET(r1)
408 asm_vm_call_method_exception_handler:
410 bl builtin_throw_exception
411 b L_asm_vm_call_method_return
431 lwz a0,offvmargdata+4(itmp1)
434 lwz a1,offvmargdata+4(itmp1)
437 lwz a2,offvmargdata+4(itmp1)
440 lwz a3,offvmargdata+4(itmp1)
443 lwz a4,offvmargdata+4(itmp1)
446 lwz a5,offvmargdata+4(itmp1)
449 lwz a6,offvmargdata+4(itmp1)
452 lwz a7,offvmargdata+4(itmp1)
460 #if defined(__DARWIN__)
462 /* we have two entries here, so we get the even argument register
463 alignment for linux */
479 lwz a0,offvmargdata+0(itmp1)
480 lwz a1,offvmargdata+4(itmp1)
483 lwz a2,offvmargdata+0(itmp1)
484 lwz a3,offvmargdata+4(itmp1)
487 lwz a4,offvmargdata+0(itmp1)
488 lwz a5,offvmargdata+4(itmp1)
491 lwz a6,offvmargdata+0(itmp1)
492 lwz a7,offvmargdata+4(itmp1)
509 #if defined(__DARWIN__)
521 lfs fa0,offvmargdata(itmp1)
524 lfs fa1,offvmargdata(itmp1)
527 lfs fa2,offvmargdata(itmp1)
530 lfs fa3,offvmargdata(itmp1)
533 lfs fa4,offvmargdata(itmp1)
536 lfs fa5,offvmargdata(itmp1)
539 lfs fa6,offvmargdata(itmp1)
542 lfs fa7,offvmargdata(itmp1)
545 #if defined(__DARWIN__)
547 lfs fa8,offvmargdata(itmp1)
550 lfs fa9,offvmargdata(itmp1)
553 lfs fa10,offvmargdata(itmp1)
556 lfs fa11,offvmargdata(itmp1)
559 lfs fa12,offvmargdata(itmp1)
577 #if defined(__DARWIN__)
589 lfd fa0,offvmargdata(itmp1)
592 lfd fa1,offvmargdata(itmp1)
595 lfd fa2,offvmargdata(itmp1)
598 lfd fa3,offvmargdata(itmp1)
601 lfd fa4,offvmargdata(itmp1)
604 lfd fa5,offvmargdata(itmp1)
607 lfd fa6,offvmargdata(itmp1)
610 lfd fa7,offvmargdata(itmp1)
613 #if defined(__DARWIN__)
615 lfd fa8,offvmargdata(itmp1)
618 lfd fa9,offvmargdata(itmp1)
621 lfd fa10,offvmargdata(itmp1)
624 lfd fa11,offvmargdata(itmp1)
627 lfd fa12,offvmargdata(itmp1)
632 /* asm_call_jit_compiler *******************************************************
634 Invokes the compiler for untranslated JavaVM methods.
636 *******************************************************************************/
638 asm_call_jit_compiler:
639 L_asm_call_jit_compiler: /* required for PIC code */
641 stw r0,LA_LR_OFFSET(r1) /* save return address */
642 stwu r1,-(LA_SIZE + 5*4 + INT_ARG_CNT*4 + FLT_ARG_CNT*8)(r1)
644 #if defined(__DARWIN__)
645 stw a0,(LA_WORD_SIZE+5+0)*4(r1)
646 stw a1,(LA_WORD_SIZE+5+1)*4(r1)
647 stw a2,(LA_WORD_SIZE+5+2)*4(r1)
648 stw a3,(LA_WORD_SIZE+5+3)*4(r1)
649 stw a4,(LA_WORD_SIZE+5+4)*4(r1)
650 stw a5,(LA_WORD_SIZE+5+5)*4(r1)
651 stw a6,(LA_WORD_SIZE+5+6)*4(r1)
652 stw a7,(LA_WORD_SIZE+5+7)*4(r1)
654 stfd fa0,(LA_WORD_SIZE+5+8)*4(r1)
655 stfd fa1,(LA_WORD_SIZE+5+10)*4(r1)
656 stfd fa2,(LA_WORD_SIZE+5+12)*4(r1)
657 stfd fa3,(LA_WORD_SIZE+5+14)*4(r1)
658 stfd fa4,(LA_WORD_SIZE+5+16)*4(r1)
659 stfd fa5,(LA_WORD_SIZE+5+18)*4(r1)
660 stfd fa6,(LA_WORD_SIZE+5+20)*4(r1)
661 stfd fa7,(LA_WORD_SIZE+5+22)*4(r1)
662 stfd fa8,(LA_WORD_SIZE+5+24)*4(r1)
663 stfd fa9,(LA_WORD_SIZE+5+26)*4(r1)
664 stfd fa10,(LA_WORD_SIZE+5+28)*4(r1)
665 stfd fa11,(LA_WORD_SIZE+5+30)*4(r1)
666 stfd fa12,(LA_WORD_SIZE+5+32)*4(r1)
668 SAVE_ARGUMENT_REGISTERS(LA_WORD_SIZE+1)
673 addi a2,sp,(LA_SIZE + 5*4 + INT_ARG_CNT*4 + FLT_ARG_CNT*8)
674 lwz a3,(LA_SIZE + 5*4 + INT_ARG_CNT*4 + FLT_ARG_CNT*8)+LA_LR_OFFSET(sp)
676 mr pv,v0 /* move address to pv register */
678 #if defined(__DARWIN__)
679 lwz a0,(LA_WORD_SIZE+5+0)*4(r1)
680 lwz a1,(LA_WORD_SIZE+5+1)*4(r1)
681 lwz a2,(LA_WORD_SIZE+5+2)*4(r1)
682 lwz a3,(LA_WORD_SIZE+5+3)*4(r1)
683 lwz a4,(LA_WORD_SIZE+5+4)*4(r1)
684 lwz a5,(LA_WORD_SIZE+5+5)*4(r1)
685 lwz a6,(LA_WORD_SIZE+5+6)*4(r1)
686 lwz a7,(LA_WORD_SIZE+5+7)*4(r1)
688 lfd fa0,(LA_WORD_SIZE+5+8)*4(r1)
689 lfd fa1,(LA_WORD_SIZE+5+10)*4(r1)
690 lfd fa2,(LA_WORD_SIZE+5+12)*4(r1)
691 lfd fa3,(LA_WORD_SIZE+5+14)*4(r1)
692 lfd fa4,(LA_WORD_SIZE+5+16)*4(r1)
693 lfd fa5,(LA_WORD_SIZE+5+18)*4(r1)
694 lfd fa6,(LA_WORD_SIZE+5+20)*4(r1)
695 lfd fa7,(LA_WORD_SIZE+5+22)*4(r1)
696 lfd fa8,(LA_WORD_SIZE+5+24)*4(r1)
697 lfd fa9,(LA_WORD_SIZE+5+26)*4(r1)
698 lfd fa10,(LA_WORD_SIZE+5+28)*4(r1)
699 lfd fa11,(LA_WORD_SIZE+5+30)*4(r1)
700 lfd fa12,(LA_WORD_SIZE+5+32)*4(r1)
702 RESTORE_ARGUMENT_REGISTERS(LA_WORD_SIZE+1)
705 lwz itmp1,(LA_SIZE + 5*4 + INT_ARG_CNT*4 + FLT_ARG_CNT*8)+LA_LR_OFFSET(r1)
708 addi sp,sp,(LA_SIZE + 5*4 + INT_ARG_CNT*4 + FLT_ARG_CNT*8)
710 mr. pv,pv /* test for exception */
711 beq L_asm_call_jit_compiler_exception
713 mtctr pv /* move method address to control reg */
714 bctr /* and call the Java method */
716 L_asm_call_jit_compiler_exception:
717 #if defined(USE_THREADS) && defined(NATIVE_THREADS)
719 stw r0,LA_LR_OFFSET(sp)
720 stwu sp,-LA_SIZE_ALIGNED(sp) /* preserve linkage area */
721 bl builtin_asm_get_exceptionptrptr
722 lwz r0,LA_SIZE_ALIGNED+LA_LR_OFFSET(sp)
724 addi sp,sp,LA_SIZE_ALIGNED
726 # if defined(__DARWIN__)
727 lis v0,ha16(_no_threads_exceptionptr)
728 addi v0,v0,lo16(_no_threads_exceptionptr)
730 lis v0,_no_threads_exceptionptr@ha
731 addi v0,v0,_no_threads_exceptionptr@l
734 lwz xptr,0(v0) /* get the exception pointer */
736 stw itmp3,0(v0) /* clear the exception pointer */
740 b L_asm_handle_nat_exception
743 /********************* function asm_handle_exception ***************************
745 * This function handles an exception. It does not use the usual calling *
746 * conventions. The exception pointer is passed in REG_ITMP1 and the *
747 * pc from the exception raising position is passed in REG_ITMP2. It searches *
748 * the local exception table for a handler. If no one is found, it unwinds *
749 * stacks and continues searching the callers. *
751 * void asm_handle_exception (exceptionptr, exceptionpc); *
753 *******************************************************************************/
755 asm_handle_nat_exception:
756 L_asm_handle_nat_exception: /* required for PIC code */
764 bne L_asm_handle_exception
769 asm_handle_exception:
770 L_asm_handle_exception: /* required for PIC code */
771 addi sp,sp,-(ARG_CNT+TMP_CNT)*8 /* create maybe-leaf stackframe */
773 #if defined(__DARWIN__)
775 SAVE_ARGUMENT_REGISTERS(0) /* we save arg and temp registers in */
776 SAVE_TEMPORARY_REGISTERS(ARG_CNT) /* case this is a leaf method */
779 li a3,(ARG_CNT+TMP_CNT)*8 /* prepare a3 for handle_exception */
780 li a4,1 /* set maybe-leaf flag */
782 L_asm_handle_exception_stack_loop:
783 addi sp,sp,-(LA_WORD_SIZE+4+5)*4 /* allocate stack */
784 stw xptr,LA_SIZE+4*4(sp) /* save exception pointer */
785 stw xpc,LA_SIZE+5*4(sp) /* save exception pc */
786 stw pv,LA_SIZE+6*4(sp) /* save data segment pointer */
787 mflr r0 /* save return address */
788 stw r0,LA_SIZE+5*4(sp)
789 add a3,a3,sp /* calculate Java sp into a3... */
790 addi a3,a3,(LA_WORD_SIZE+4+5)*4
791 stw a4,LA_SIZE+8*4(sp) /* save maybe-leaf flag */
793 mr a0,xptr /* pass exception pointer */
794 mr a1,xpc /* pass exception pc */
795 mr a2,pv /* pass data segment pointer */
796 /* a3 is still set */
797 bl exceptions_handle_exception
800 beq L_asm_handle_exception_not_catched
802 mr xpc,v0 /* move handlerpc into xpc */
803 lwz xptr,LA_SIZE+4*4(sp) /* restore exception pointer */
804 lwz pv,LA_SIZE+6*4(sp) /* restore data segment pointer */
805 lwz r0,LA_SIZE+5*4(sp) /* restore return address */
807 lwz a4,LA_SIZE+8*4(sp) /* get maybe-leaf flag */
808 addi sp,sp,(LA_WORD_SIZE+4+5)*4 /* free stack frame */
811 beq L_asm_handle_exception_no_leaf
813 #if defined(__DARWIN__)
815 RESTORE_ARGUMENT_REGISTERS(0) /* if this is a leaf method, we have */
816 RESTORE_TEMPORARY_REGISTERS(ARG_CNT)/* to restore arg and temp registers */
819 addi sp,sp,(ARG_CNT+TMP_CNT)*8 /* remove maybe-leaf stackframe */
821 L_asm_handle_exception_no_leaf:
822 mtctr xpc /* jump to the handler */
825 L_asm_handle_exception_not_catched:
826 lwz xptr,LA_SIZE+4*4(sp) /* restore exception pointer */
827 lwz pv,LA_SIZE+6*4(sp) /* restore data segment pointer */
828 lwz r0,LA_SIZE+5*4(sp) /* restore return address */
830 lwz a4,LA_SIZE+8*4(sp) /* get maybe-leaf flag */
831 addi sp,sp,(LA_WORD_SIZE+4+5)*4 /* free stack frame */
834 beq L_asm_handle_exception_no_leaf_stack
836 addi sp,sp,(ARG_CNT+TMP_CNT)*8 /* remove maybe-leaf stackframe */
837 li a4,0 /* clear the maybe-leaf flag */
839 L_asm_handle_exception_no_leaf_stack:
840 lwz t0,FrameSize(pv) /* get frame size */
841 add t0,sp,t0 /* pointer to save area */
843 lwz t1,IsLeaf(pv) /* is leaf procedure */
845 bne L_asm_handle_exception_no_ra_restore
847 lwz r0,LA_LR_OFFSET(t0) /* restore ra */
850 L_asm_handle_exception_no_ra_restore:
851 mflr xpc /* the new xpc is ra */
852 lwz t1,IntSave(pv) /* t1 = saved int register count */
855 mflr t2 /* t2 = current pc */
856 #if defined(__DARWIN__)
857 addi t2,t2,lo16(ex_int2-ex_int1)
859 addi t2,t2,(ex_int2-ex_int1)@l
861 slwi t1,t1,2 /* t1 = register count * 4 */
862 subf t2,t1,t2 /* t2 = IntSave - t1 */
878 subf t0,t1,t0 /* t0 = t0 - register count * 4 */
884 #if defined(__DARWIN__)
885 addi t2,t2,lo16(ex_flt2-ex_flt1)
887 addi t2,t2,(ex_flt2-ex_flt1)@l
889 slwi t1,t1,2 /* t1 = register count * 4 */
890 subf t2,t1,t2 /* t2 = FltSave - t1 */
906 lwz t0,FrameSize(pv) /* get frame size */
907 add sp,sp,t0 /* unwind stack */
908 li a3,0 /* prepare a3 for handle_exception */
917 bne L_asm_handle_exception_stack_loop
922 b L_asm_handle_exception_stack_loop
925 /* asm_wrapper_patcher *********************************************************
930 20 return address into JIT code (patch position)
931 16 pointer to virtual java_objectheader
932 12 machine code (which is patched back later)
933 8 unresolved class/method/field reference
934 4 data segment displacement from load instructions
935 0 patcher function pointer to call (pv is saved here afterwards)
937 *******************************************************************************/
940 mflr r0 /* get Java return address (leaf) */
941 stw r0,6*4(sp) /* store it in the stub stackframe */
942 /* keep stack 16-bytes aligned: 6+1+37 = 44 */
943 stwu sp,-(LA_SIZE+(5+58)*4+sizestackframeinfo)(sp)
945 #if defined(__DARWIN__)
946 stw a0,LA_SIZE+(5+0)*4(r1) /* save argument registers */
947 stw a1,LA_SIZE+(5+1)*4(r1) /* preserve linkage area (24 bytes) */
948 stw a2,LA_SIZE+(5+2)*4(r1) /* and 4 bytes for 4 argument */
949 stw a3,LA_SIZE+(5+3)*4(r1)
950 stw a4,LA_SIZE+(5+4)*4(r1)
951 stw a5,LA_SIZE+(5+5)*4(r1)
952 stw a6,LA_SIZE+(5+6)*4(r1)
953 stw a7,LA_SIZE+(5+7)*4(r1)
955 stfd fa0,LA_SIZE+(5+8)*4(sp)
956 stfd fa1,LA_SIZE+(5+10)*4(sp)
957 stfd fa2,LA_SIZE+(5+12)*4(sp)
958 stfd fa3,LA_SIZE+(5+14)*4(sp)
959 stfd fa4,LA_SIZE+(5+16)*4(sp)
960 stfd fa5,LA_SIZE+(5+18)*4(sp)
961 stfd fa6,LA_SIZE+(5+20)*4(sp)
962 stfd fa7,LA_SIZE+(5+22)*4(sp)
963 stfd fa8,LA_SIZE+(5+24)*4(sp)
964 stfd fa9,LA_SIZE+(5+26)*4(sp)
965 stfd fa10,LA_SIZE+(5+28)*4(sp)
966 stfd fa11,LA_SIZE+(5+30)*4(sp)
967 stfd fa12,LA_SIZE+(5+32)*4(sp)
969 stw t0,(LA_WORD_SIZE+5+33)*4(r1)
970 stw t1,(LA_WORD_SIZE+5+34)*4(r1)
971 stw t2,(LA_WORD_SIZE+5+35)*4(r1)
972 stw t3,(LA_WORD_SIZE+5+36)*4(r1)
973 stw t4,(LA_WORD_SIZE+5+37)*4(r1)
974 stw t5,(LA_WORD_SIZE+5+38)*4(r1)
975 stw t6,(LA_WORD_SIZE+5+39)*4(r1)
976 stw t7,(LA_WORD_SIZE+5+40)*4(r1)
978 stfd ft0,(LA_WORD_SIZE+5+42)*4(r1)
979 stfd ft1,(LA_WORD_SIZE+5+44)*4(r1)
980 stfd ft2,(LA_WORD_SIZE+5+46)*4(r1)
981 stfd ft3,(LA_WORD_SIZE+5+48)*4(r1)
982 stfd ft4,(LA_WORD_SIZE+5+50)*4(r1)
983 stfd ft5,(LA_WORD_SIZE+5+52)*4(r1)
985 SAVE_ARGUMENT_REGISTERS(LA_WORD_SIZE+1) /* save 8 int/8 float arguments */
986 SAVE_TEMPORARY_REGISTERS(LA_WORD_SIZE+1+24)
989 stw itmp1,LA_SIZE+(5+54)*4(sp)
990 stw itmp2,LA_SIZE+(5+55)*4(sp)
991 stw pv,LA_SIZE+(5+56)*4(sp)
993 addi a0,sp,LA_SIZE+(5+58)*4 /* create stackframe info */
995 addi a2,sp,(8+LA_WORD_SIZE+5+58)*4+sizestackframeinfo
996 mr a3,r0 /* this is correct for leafs */
997 lwz a4,((5+LA_WORD_SIZE+5+58)*4+sizestackframeinfo)(sp) /* pass xpc */
998 bl stacktrace_create_extern_stackframeinfo
1000 addi a0,sp,(0+LA_WORD_SIZE+5+58)*4+sizestackframeinfo /* pass sp */
1001 lwz pv,(0+LA_WORD_SIZE+5+58)*4+sizestackframeinfo(sp) /* get function */
1002 lwz itmp1,LA_SIZE+(5+56)*4(sp) /* move pv to position of fp */
1003 stw itmp1,(0+LA_WORD_SIZE+5+58)*4+sizestackframeinfo(sp)
1004 mtctr pv /* call the patcher function */
1006 stw v0,LA_SIZE+(5+57)*4(sp) /* save return value */
1008 addi a0,sp,LA_SIZE+(5+58)*4
1009 bl stacktrace_remove_stackframeinfo /* remove stackframe info */
1011 #if defined(__DARWIN__)
1012 lwz a0,LA_SIZE+(5+0)*4(r1)
1013 lwz a1,LA_SIZE+(5+1)*4(r1)
1014 lwz a2,LA_SIZE+(5+2)*4(r1)
1015 lwz a3,LA_SIZE+(5+3)*4(r1)
1016 lwz a4,LA_SIZE+(5+4)*4(r1)
1017 lwz a5,LA_SIZE+(5+5)*4(r1)
1018 lwz a6,LA_SIZE+(5+6)*4(r1)
1019 lwz a7,LA_SIZE+(5+7)*4(r1)
1021 lfd fa0,LA_SIZE+(5+8)*4(sp)
1022 lfd fa1,LA_SIZE+(5+10)*4(sp)
1023 lfd fa2,LA_SIZE+(5+12)*4(sp)
1024 lfd fa3,LA_SIZE+(5+14)*4(sp)
1025 lfd fa4,LA_SIZE+(5+16)*4(sp)
1026 lfd fa5,LA_SIZE+(5+18)*4(sp)
1027 lfd fa6,LA_SIZE+(5+20)*4(sp)
1028 lfd fa7,LA_SIZE+(5+22)*4(sp)
1029 lfd fa8,LA_SIZE+(5+24)*4(sp)
1030 lfd fa9,LA_SIZE+(5+26)*4(sp)
1031 lfd fa10,LA_SIZE+(5+28)*4(sp)
1032 lfd fa11,LA_SIZE+(5+30)*4(sp)
1033 lfd fa12,LA_SIZE+(5+32)*4(sp)
1035 lwz t0,(LA_WORD_SIZE+5+33)*4(r1)
1036 lwz t1,(LA_WORD_SIZE+5+34)*4(r1)
1037 lwz t2,(LA_WORD_SIZE+5+35)*4(r1)
1038 lwz t3,(LA_WORD_SIZE+5+36)*4(r1)
1039 lwz t4,(LA_WORD_SIZE+5+37)*4(r1)
1040 lwz t5,(LA_WORD_SIZE+5+38)*4(r1)
1041 lwz t6,(LA_WORD_SIZE+5+39)*4(r1)
1042 lwz t7,(LA_WORD_SIZE+5+40)*4(r1)
1044 lfd ft0,(LA_WORD_SIZE+5+42)*4(r1)
1045 lfd ft1,(LA_WORD_SIZE+5+44)*4(r1)
1046 lfd ft2,(LA_WORD_SIZE+5+46)*4(r1)
1047 lfd ft3,(LA_WORD_SIZE+5+48)*4(r1)
1048 lfd ft4,(LA_WORD_SIZE+5+50)*4(r1)
1049 lfd ft5,(LA_WORD_SIZE+5+52)*4(r1)
1051 RESTORE_ARGUMENT_REGISTERS(LA_WORD_SIZE+1) /* restore 8 int/8 float args */
1052 RESTORE_TEMPORARY_REGISTERS(LA_WORD_SIZE+1+24)
1055 lwz itmp1,LA_SIZE+(5+54)*4(sp)
1056 lwz itmp2,LA_SIZE+(5+55)*4(sp)
1057 lwz pv,LA_SIZE+(5+56)*4(sp)
1058 lwz itmp3,LA_SIZE+(5+57)*4(sp) /* restore return value into temp reg.*/
1060 lwz r0,(6+LA_WORD_SIZE+5+58)*4+sizestackframeinfo(sp) /* restore RA */
1063 mr. itmp3,itmp3 /* check for an exception */
1064 beq L_asm_wrapper_patcher_exception
1066 /* get return address (into JIT code) */
1067 lwz itmp3,(5+LA_WORD_SIZE+5+58)*4+sizestackframeinfo(sp)
1069 /* remove stack frame + patcher stub stack */
1070 addi sp,sp,(8+LA_WORD_SIZE+5+58)*4+sizestackframeinfo
1073 bctr /* jump to new patched code */
1075 L_asm_wrapper_patcher_exception:
1076 lwz xpc,(5+LA_WORD_SIZE+5+58)*4+sizestackframeinfo(sp)
1077 addi sp,sp,(8+LA_WORD_SIZE+5+58)*4+sizestackframeinfo
1079 #if defined(USE_THREADS) && defined(NATIVE_THREADS)
1081 stw r0,LA_LR_OFFSET(sp)
1082 stwu sp,-(LA_SIZE+1*4)(sp) /* preserve linkage area */
1083 stw xpc,LA_SIZE+0*4(sp)
1084 bl builtin_asm_get_exceptionptrptr
1085 lwz xpc,LA_SIZE+0*4(sp)
1086 lwz r0,LA_SIZE+1*4+LA_LR_OFFSET(sp)
1088 addi sp,sp,LA_SIZE+1*4
1090 # if defined(__DARWIN__)
1091 lis v0,ha16(_no_threads_exceptionptr)
1092 addi v0,v0,lo16(_no_threads_exceptionptr)
1094 lis v0,_no_threads_exceptionptr@ha
1095 addi v0,v0,_no_threads_exceptionptr@l
1099 lwz xptr,0(v0) /* get the exception pointer */
1101 stw itmp3,0(v0) /* clear the exception pointer */
1102 b L_asm_handle_exception
1105 /* asm_replacement_out *********************************************************
1107 This code is jumped to from the replacement-out stubs that are executed
1108 when a thread reaches an activated replacement point.
1110 The purpose of asm_replacement_out is to read out the parts of the
1111 execution state that cannot be accessed from C code, store this state,
1112 and then call the C function replace_me.
1115 16 start of stack inside method to replace
1116 0 rplpoint * info on the replacement point that was reached
1118 NOTE: itmp3 has been clobbered by the replacement-out stub!
1120 *******************************************************************************/
1122 /* some room to accomodate changes of the stack frame size during replacement */
1123 /* XXX we should find a cleaner solution here */
1124 #define REPLACEMENT_ROOM 512
1126 asm_replacement_out:
1127 /* create stack frame */
1128 addi sp,sp,-(sizeexecutionstate + REPLACEMENT_ROOM) /* XXX align */
1130 /* save link register */
1133 /* save registers in execution state */
1134 stw r0 ,( 0*8+offes_intregs)(sp)
1135 stw r1 ,( 1*8+offes_intregs)(sp)
1136 stw r2 ,( 2*8+offes_intregs)(sp)
1137 stw r3 ,( 3*8+offes_intregs)(sp)
1138 stw r4 ,( 4*8+offes_intregs)(sp)
1139 stw r5 ,( 5*8+offes_intregs)(sp)
1140 stw r6 ,( 6*8+offes_intregs)(sp)
1141 stw r7 ,( 7*8+offes_intregs)(sp)
1142 stw r8 ,( 8*8+offes_intregs)(sp)
1143 stw r9 ,( 9*8+offes_intregs)(sp)
1144 stw r10,(10*8+offes_intregs)(sp)
1145 stw r11,(11*8+offes_intregs)(sp)
1146 stw r12,(12*8+offes_intregs)(sp)
1147 stw r13,(13*8+offes_intregs)(sp)
1148 stw r14,(14*8+offes_intregs)(sp)
1149 stw r15,(15*8+offes_intregs)(sp)
1150 stw r16,(16*8+offes_intregs)(sp) /* link register */
1151 stw r17,(17*8+offes_intregs)(sp)
1152 stw r18,(18*8+offes_intregs)(sp)
1153 stw r19,(19*8+offes_intregs)(sp)
1154 stw r20,(20*8+offes_intregs)(sp)
1155 stw r21,(21*8+offes_intregs)(sp)
1156 stw r22,(22*8+offes_intregs)(sp)
1157 stw r23,(23*8+offes_intregs)(sp)
1158 stw r24,(24*8+offes_intregs)(sp)
1159 stw r25,(25*8+offes_intregs)(sp)
1160 stw r26,(26*8+offes_intregs)(sp)
1161 stw r27,(27*8+offes_intregs)(sp)
1162 stw r28,(28*8+offes_intregs)(sp)
1163 stw r29,(29*8+offes_intregs)(sp)
1164 stw r30,(30*8+offes_intregs)(sp)
1165 stw r31,(31*8+offes_intregs)(sp)
1167 stfd fr0 ,( 0*8+offes_fltregs)(sp)
1168 stfd fr1 ,( 1*8+offes_fltregs)(sp)
1169 stfd fr2 ,( 2*8+offes_fltregs)(sp)
1170 stfd fr3 ,( 3*8+offes_fltregs)(sp)
1171 stfd fr4 ,( 4*8+offes_fltregs)(sp)
1172 stfd fr5 ,( 5*8+offes_fltregs)(sp)
1173 stfd fr6 ,( 6*8+offes_fltregs)(sp)
1174 stfd fr7 ,( 7*8+offes_fltregs)(sp)
1175 stfd fr8 ,( 8*8+offes_fltregs)(sp)
1176 stfd fr9 ,( 9*8+offes_fltregs)(sp)
1177 stfd fr10,(10*8+offes_fltregs)(sp)
1178 stfd fr11,(11*8+offes_fltregs)(sp)
1179 stfd fr12,(12*8+offes_fltregs)(sp)
1180 stfd fr13,(13*8+offes_fltregs)(sp)
1181 stfd fr14,(14*8+offes_fltregs)(sp)
1182 stfd fr15,(15*8+offes_fltregs)(sp)
1183 stfd fr16,(16*8+offes_fltregs)(sp)
1184 stfd fr17,(17*8+offes_fltregs)(sp)
1185 stfd fr18,(18*8+offes_fltregs)(sp)
1186 stfd fr19,(19*8+offes_fltregs)(sp)
1187 stfd fr20,(20*8+offes_fltregs)(sp)
1188 stfd fr21,(21*8+offes_fltregs)(sp)
1189 stfd fr22,(22*8+offes_fltregs)(sp)
1190 stfd fr23,(23*8+offes_fltregs)(sp)
1191 stfd fr24,(24*8+offes_fltregs)(sp)
1192 stfd fr25,(25*8+offes_fltregs)(sp)
1193 stfd fr26,(26*8+offes_fltregs)(sp)
1194 stfd fr27,(27*8+offes_fltregs)(sp)
1195 stfd fr28,(28*8+offes_fltregs)(sp)
1196 stfd fr29,(29*8+offes_fltregs)(sp)
1197 stfd fr30,(30*8+offes_fltregs)(sp)
1198 stfd fr31,(31*8+offes_fltregs)(sp)
1200 /* calculate sp of method */
1201 addi itmp1,sp,(sizeexecutionstate + REPLACEMENT_ROOM + 4*4)
1202 stw itmp1,(offes_sp)(sp)
1205 stw pv,(offes_pv)(sp)
1207 /* call replace_me */
1208 lwz a0,-(4*4)(itmp1) /* arg0: rplpoint * */
1209 mr a1,sp /* arg1: execution state */
1210 addi sp,sp,-(LA_SIZE_ALIGNED)
1211 b replace_me /* call C function replace_me */
1213 /* asm_replacement_in **********************************************************
1215 This code writes the given execution state and jumps to the replacement
1218 This function never returns!
1220 NOTE: itmp3 is not restored!
1223 void asm_replacement_in(executionstate *es);
1225 *******************************************************************************/
1228 /* a0 == executionstate *es */
1230 /* set new sp and pv */
1231 lwz sp,(offes_sp)(a0)
1232 lwz pv,(offes_pv)(a0)
1234 /* copy registers from execution state */
1235 lwz r0 ,( 0*8+offes_intregs)(a0)
1237 /* r2 is reserved */
1238 /* a0 is loaded below */
1239 lwz r4 ,( 4*8+offes_intregs)(a0)
1240 lwz r5 ,( 5*8+offes_intregs)(a0)
1241 lwz r6 ,( 6*8+offes_intregs)(a0)
1242 lwz r7 ,( 7*8+offes_intregs)(a0)
1243 lwz r8 ,( 8*8+offes_intregs)(a0)
1244 lwz r9 ,( 9*8+offes_intregs)(a0)
1245 lwz r10,(10*8+offes_intregs)(a0)
1246 lwz r11,(11*8+offes_intregs)(a0)
1247 lwz r12,(12*8+offes_intregs)(a0)
1249 lwz r14,(14*8+offes_intregs)(a0)
1250 lwz r15,(15*8+offes_intregs)(a0)
1251 lwz r16,(16*8+offes_intregs)(a0) /* link register */
1252 lwz r17,(17*8+offes_intregs)(a0)
1253 lwz r18,(18*8+offes_intregs)(a0)
1254 lwz r19,(19*8+offes_intregs)(a0)
1255 lwz r20,(20*8+offes_intregs)(a0)
1256 lwz r21,(21*8+offes_intregs)(a0)
1257 lwz r22,(22*8+offes_intregs)(a0)
1258 lwz r23,(23*8+offes_intregs)(a0)
1259 lwz r24,(24*8+offes_intregs)(a0)
1260 lwz r25,(25*8+offes_intregs)(a0)
1261 lwz r26,(26*8+offes_intregs)(a0)
1262 lwz r27,(27*8+offes_intregs)(a0)
1263 lwz r28,(28*8+offes_intregs)(a0)
1264 lwz r29,(29*8+offes_intregs)(a0)
1265 lwz r30,(30*8+offes_intregs)(a0)
1266 lwz r31,(31*8+offes_intregs)(a0)
1268 lfd fr0 ,( 0*8+offes_fltregs)(a0)
1269 lfd fr1 ,( 1*8+offes_fltregs)(a0)
1270 lfd fr2 ,( 2*8+offes_fltregs)(a0)
1271 lfd fr3 ,( 3*8+offes_fltregs)(a0)
1272 lfd fr4 ,( 4*8+offes_fltregs)(a0)
1273 lfd fr5 ,( 5*8+offes_fltregs)(a0)
1274 lfd fr6 ,( 6*8+offes_fltregs)(a0)
1275 lfd fr7 ,( 7*8+offes_fltregs)(a0)
1276 lfd fr8 ,( 8*8+offes_fltregs)(a0)
1277 lfd fr9 ,( 9*8+offes_fltregs)(a0)
1278 lfd fr10,(10*8+offes_fltregs)(a0)
1279 lfd fr11,(11*8+offes_fltregs)(a0)
1280 lfd fr12,(12*8+offes_fltregs)(a0)
1281 lfd fr13,(13*8+offes_fltregs)(a0)
1282 lfd fr14,(14*8+offes_fltregs)(a0)
1283 lfd fr15,(15*8+offes_fltregs)(a0)
1284 lfd fr16,(16*8+offes_fltregs)(a0)
1285 lfd fr17,(17*8+offes_fltregs)(a0)
1286 lfd fr18,(18*8+offes_fltregs)(a0)
1287 lfd fr19,(19*8+offes_fltregs)(a0)
1288 lfd fr20,(20*8+offes_fltregs)(a0)
1289 lfd fr21,(21*8+offes_fltregs)(a0)
1290 lfd fr22,(22*8+offes_fltregs)(a0)
1291 lfd fr23,(23*8+offes_fltregs)(a0)
1292 lfd fr24,(24*8+offes_fltregs)(a0)
1293 lfd fr25,(25*8+offes_fltregs)(a0)
1294 lfd fr26,(26*8+offes_fltregs)(a0)
1295 lfd fr27,(27*8+offes_fltregs)(a0)
1296 lfd fr28,(28*8+offes_fltregs)(a0)
1297 lfd fr29,(29*8+offes_fltregs)(a0)
1298 lfd fr30,(30*8+offes_fltregs)(a0)
1299 lfd fr31,(31*8+offes_fltregs)(a0)
1301 /* restore link register */
1307 lwz itmp3,offes_pc(a0)
1311 lwz a0,(3*8+offes_intregs)(a0)
1313 /* jump to new code */
1318 /*********************************************************************/
1350 asm_initialize_thread_stack:
1380 #if defined(__DARWIN__)
1381 lfd fr0,lo16(doublezero-0b)(r3)
1383 lfd fr0,(doublezero-0b)@l(r3)
1410 asm_perform_threadswitch:
1502 asm_switchstackandcall:
1520 asm_getclassvalues_atomic:
1523 lwz r6,offbaseval(r3)
1524 lwz r7,offdiffval(r3)
1525 lwz r8,offbaseval(r4)
1527 stw r6,offcast_super_baseval(r5)
1528 stw r7,offcast_super_diffval(r5)
1529 stw r8,offcast_sub_baseval(r5)
1534 asm_criticalsections:
1535 #if defined(USE_THREADS) && defined(NATIVE_THREADS)
1543 #if defined(__DARWIN__)
1545 .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32
1547 L_builtin_throw_exception$stub:
1548 .indirect_symbol _builtin_throw_exception
1550 bcl 20,31,L00$_builtin_throw_exception
1551 L00$_builtin_throw_exception:
1553 addis r11,r11,ha16(L_builtin_throw_exception$lazy_ptr - L00$_builtin_throw_exception)
1555 lwzu r12,lo16(L_builtin_throw_exception$lazy_ptr - L00$_builtin_throw_exception)(r11)
1559 .lazy_symbol_pointer
1560 L_builtin_throw_exception$lazy_ptr:
1561 .indirect_symbol _builtin_throw_exception
1562 .long dyld_stub_binding_helper
1565 .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32
1567 L_exceptions_handle_exception$stub:
1568 .indirect_symbol _exceptions_handle_exception
1570 bcl 20,31,L00$_exceptions_handle_exception
1571 L00$_exceptions_handle_exception:
1573 addis r11,r11,ha16(L_exceptions_handle_exception$lazy_ptr - L00$_exceptions_handle_exception)
1575 lwzu r12,lo16(L_exceptions_handle_exception$lazy_ptr - L00$_exceptions_handle_exception)(r11)
1579 .lazy_symbol_pointer
1580 L_exceptions_handle_exception$lazy_ptr:
1581 .indirect_symbol _exceptions_handle_exception
1582 .long dyld_stub_binding_helper
1585 .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32
1587 L_stacktrace_create_extern_stackframeinfo$stub:
1588 .indirect_symbol _stacktrace_create_extern_stackframeinfo
1590 bcl 20,31,L00$_stacktrace_create_extern_stackframeinfo
1591 L00$_stacktrace_create_extern_stackframeinfo:
1593 addis r11,r11,ha16(L_stacktrace_create_extern_stackframeinfo$lazy_ptr - L00$_stacktrace_create_extern_stackframeinfo)
1595 lwzu r12,lo16(L_stacktrace_create_extern_stackframeinfo$lazy_ptr - L00$_stacktrace_create_extern_stackframeinfo)(r11)
1599 .lazy_symbol_pointer
1600 L_stacktrace_create_extern_stackframeinfo$lazy_ptr:
1601 .indirect_symbol _stacktrace_create_extern_stackframeinfo
1602 .long dyld_stub_binding_helper
1605 .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32
1607 L_jit_asm_compile$stub:
1608 .indirect_symbol _jit_asm_compile
1610 bcl 20,31,L00$_jit_asm_compile
1611 L00$_jit_asm_compile:
1613 addis r11,r11,ha16(L_jit_asm_compile$lazy_ptr - L00$_jit_asm_compile)
1615 lwzu r12,lo16(L_jit_asm_compile$lazy_ptr - L00$_jit_asm_compile)(r11)
1619 .lazy_symbol_pointer
1620 L_jit_asm_compile$lazy_ptr:
1621 .indirect_symbol _jit_asm_compile
1622 .long dyld_stub_binding_helper
1625 .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32
1627 L_stacktrace_remove_stackframeinfo$stub:
1628 .indirect_symbol _stacktrace_remove_stackframeinfo
1630 bcl 20,31,L00$_stacktrace_remove_stackframeinfo
1631 L00$_stacktrace_remove_stackframeinfo:
1633 addis r11,r11,ha16(L_stacktrace_remove_stackframeinfo$lazy_ptr - L00$_stacktrace_remove_stackframeinfo)
1635 lwzu r12,lo16(L_stacktrace_remove_stackframeinfo$lazy_ptr - L00$_stacktrace_remove_stackframeinfo)(r11)
1639 .lazy_symbol_pointer
1640 L_stacktrace_remove_stackframeinfo$lazy_ptr:
1641 .indirect_symbol _stacktrace_remove_stackframeinfo
1642 .long dyld_stub_binding_helper
1645 .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32
1647 L_builtin_asm_get_exceptionptrptr$stub:
1648 .indirect_symbol _builtin_asm_get_exceptionptrptr
1650 bcl 20,31,L00$_builtin_asm_get_exceptionptrptr
1651 L00$_builtin_asm_get_exceptionptrptr:
1653 addis r11,r11,ha16(L_builtin_asm_get_exceptionptrptr$lazy_ptr - L00$_builtin_asm_get_exceptionptrptr)
1655 lwzu r12,lo16(L_builtin_asm_get_exceptionptrptr$lazy_ptr - L00$_builtin_asm_get_exceptionptrptr)(r11)
1659 .lazy_symbol_pointer
1660 L_builtin_asm_get_exceptionptrptr$lazy_ptr:
1661 .indirect_symbol _builtin_asm_get_exceptionptrptr
1662 .long dyld_stub_binding_helper
1665 .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32
1668 .indirect_symbol _replace_me
1670 bcl 20,31,L00$_replace_me
1673 addis r11,r11,ha16(L_replace_me$lazy_ptr - L00$_replace_me)
1675 lwzu r12,lo16(L_replace_me$lazy_ptr - L00$_replace_me)(r11)
1679 .lazy_symbol_pointer
1680 L_replace_me$lazy_ptr:
1681 .indirect_symbol _replace_me
1682 .long dyld_stub_binding_helper
1684 #endif /* defined(__DARWIN__) */
1687 /* Disable exec-stacks, required for Gentoo ***********************************/
1689 #if defined(__GCC__) && defined(__ELF__)
1690 .section .note.GNU-stack,"",@progbits
1695 * These are local overrides for various environment variables in Emacs.
1696 * Please do not remove this and leave it at the end of the file, where
1697 * Emacs will automagically detect them.
1698 * ---------------------------------------------------------------------
1701 * indent-tabs-mode: t
1705 * vim:noexpandtab:sw=4:ts=4: