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 5145 2006-07-17 11:48:38Z 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_abstractmethoderror
71 .globl asm_patcher_wrapper
73 .globl asm_replacement_out
74 .globl asm_replacement_in
77 .globl asm_criticalsections
78 .globl asm_getclassvalues_atomic
81 /* asm_vm_call_method **********************************************************
83 * This function calls a Java-method (which possibly needs compilation) *
84 * with up to 4 address parameters. *
86 * This functions calls the JIT-compiler which eventually translates the *
87 * method into machine code. *
90 * javaobject_header *asm_calljavamethod (methodinfo *m, *
91 * void *arg1, void *arg2, void *arg3, void *arg4); *
93 *******************************************************************************/
97 .long 0 /* catch type all */
98 .long 0 /* exception handler pc */
100 .long 0 /* start pc */
101 .long 1 /* extable size */
102 .long 0 /* line number table start */
103 .long 0 /* line number table size */
104 .long 0 /* fltsave */
105 .long 0 /* intsave */
108 .long 0 /* frame size */
109 .long 0 /* codeinfo pointer */
112 asm_vm_call_method_int:
113 asm_vm_call_method_long:
114 asm_vm_call_method_float:
115 asm_vm_call_method_double:
117 stw r0,LA_LR_OFFSET(r1)
120 stw s0,8*4(sp) /* save used callee saved registers */
121 stw a0,9*4(sp) /* save method pointer for compiler */
123 #if defined(__DARWIN__)
124 stw itmp1,10*4(sp) /* register r11 is callee saved */
126 stw pv,11*4(sp) /* save PV register */
128 stw itmp3,12*4(sp) /* registers r14-r31 are callee saved */
129 stfd ftmp1,14*4(sp) /* registers f14-f31 are callee saved */
132 #if defined(__DARWIN__)
148 SAVE_TEMPORARY_REGISTERS(18) /* the offset has to be even */
151 mr itmp2,a1 /* arg count */
152 mr itmp1,a2 /* pointer to arg block */
154 mr t4,itmp2 /* save argument count */
155 mr t5,itmp1 /* save argument block pointer */
157 mr s0,sp /* save current sp to s0 */
159 addi itmp1,itmp1,-sizevmarg /* initialize pointer (smaller code) */
160 addi itmp2,itmp2,1 /* initialize argument count */
161 li t0,0 /* initialize integer argument counter */
162 li t1,0 /* initialize float argument counter */
163 li t6,0 /* initialize integer register counter */
164 #if defined(__DARWIN__)
165 li t7,0 /* initialize stack slot counter */
168 mflr r0 /* save link register (PIC code) */
169 bl L_asm_vm_call_method_get_pc
170 L_asm_vm_call_method_get_pc:
171 mflr t3 /* t3 contains the current pc */
175 addi itmp1,itmp1,sizevmarg /* goto next argument block */
176 addi itmp2,itmp2,-1 /* argument count - 1 */
178 beq L_register_copy_done
180 lwz itmp3,offvmargtype+4(itmp1)
181 andi. r0,itmp3,0x0002 /* is this a float/double type? */
182 bne L_register_handle_float
184 L_register_handle_int:
185 cmpwi t6,INT_ARG_CNT /* are we out of integer argument */
186 beq L_register_copy /* registers? yes, next loop */
188 andi. r0,itmp3,0x0001 /* is this a 2-word type? */
189 bne L_register_handle_long
191 #if defined(__DARWIN__)
192 addis itmp3,t3,ha16(L_jumptable_int - L_asm_vm_call_method_get_pc)
193 la itmp3,lo16(L_jumptable_int - L_asm_vm_call_method_get_pc)(itmp3)
195 lis itmp3,L_jumptable_int@ha
196 addi itmp3,itmp3,L_jumptable_int@l
199 slwi t2,t6,2 /* multiple of 4-bytes */
200 add itmp3,itmp3,t2 /* calculate address of jumptable */
201 lwz itmp3,0(itmp3) /* load function address */
203 addi t0,t0,1 /* integer argument counter */
204 addi t6,t6,1 /* integer argument register counter */
205 #if defined(__DARWIN__)
206 addi t7,t7,1 /* stack slot counter */
210 L_register_handle_long:
211 #if defined(__DARWIN__)
212 addis itmp3,t3,ha16(L_jumptable_long - L_asm_vm_call_method_get_pc)
213 la itmp3,lo16(L_jumptable_long - L_asm_vm_call_method_get_pc)(itmp3)
215 lis itmp3,L_jumptable_long@ha
216 addi itmp3,itmp3,L_jumptable_long@l
218 #if !defined(__DARWIN__)
219 addi t6,t6,1 /* align to even numbers */
223 cmpwi t6,(INT_ARG_CNT - 1) /* are we out of integer argument */
224 blt L_register_handle_long_continue /* registers? */
226 li t6,INT_ARG_CNT /* yes, set integer argument register */
227 b L_register_copy /* count to max and next loop */
229 L_register_handle_long_continue:
230 slwi t2,t6,2 /* multiple of 4-bytes */
231 add itmp3,itmp3,t2 /* calculate address of jumptable */
232 lwz itmp3,0(itmp3) /* load function address */
234 addi t0,t0,1 /* integer argument counter */
235 addi t6,t6,2 /* integer argument register counter */
236 #if defined(__DARWIN__)
237 addi t7,t7,2 /* stack slot counter */
241 L_register_handle_float:
242 cmpwi t1,FLT_ARG_CNT /* are we out of float argument */
243 beq L_register_copy /* registers? yes, next loop */
245 andi. r0,itmp3,0x0001 /* is this a 2-word type? */
246 bne L_register_handle_double
248 #if defined(__DARWIN__)
249 addis itmp3,t3,ha16(L_jumptable_float - L_asm_vm_call_method_get_pc)
250 la itmp3,lo16(L_jumptable_float - L_asm_vm_call_method_get_pc)(itmp3)
252 lis itmp3,L_jumptable_float@ha
253 addi itmp3,itmp3,L_jumptable_float@l
256 slwi t2,t1,2 /* multiple of 4-bytes */
257 add itmp3,itmp3,t2 /* calculate address of jumptable */
258 lwz itmp3,0(itmp3) /* load function address */
260 addi t1,t1,1 /* float argument counter */
261 #if defined(__DARWIN__)
262 addi t7,t7,1 /* stack slot counter */
263 addi t6,t6,1 /* skip 1 integer argument register */
267 L_register_handle_double:
268 #if defined(__DARWIN__)
269 addis itmp3,t3,ha16(L_jumptable_double - L_asm_vm_call_method_get_pc)
270 la itmp3,lo16(L_jumptable_double - L_asm_vm_call_method_get_pc)(itmp3)
272 lis itmp3,L_jumptable_double@ha
273 addi itmp3,itmp3,L_jumptable_double@l
276 slwi t2,t1,2 /* multiple of 4-bytes */
277 add itmp3,itmp3,t2 /* calculate address of jumptable */
278 lwz itmp3,0(itmp3) /* load function address */
280 addi t1,t1,1 /* float argument counter */
281 #if defined(__DARWIN__)
282 addi t7,t7,2 /* stack slot counter */
283 addi t6,t6,2 /* skip 2 integer argument registers */
287 L_register_copy_done:
288 /* calculate remaining arguments */
289 sub itmp3,t4,t0 /* - integer arguments in registers */
290 sub itmp3,itmp3,t1 /* - float arguments in registers */
292 beq L_stack_copy_done
294 mr itmp2,t4 /* restore argument count */
295 mr itmp1,t5 /* restore argument block pointer */
297 slwi t4,itmp3,3 /* XXX use 8-bytes slots for now */
298 addi t4,t4,LA_SIZE /* add size of linkage area */
300 #if defined(__DARWIN__)
301 slwi t5,t7,2 /* add stack space for arguments */
307 mr t6,sp /* use t6 as temporary sp */
308 addi t6,t6,LA_SIZE /* skip linkage area */
309 #if defined(__DARWIN__)
310 add t6,t6,t5 /* skip stack space for arguments */
313 addi itmp1,itmp1,-sizevmarg /* initialize pointer (smaller code) */
314 addi itmp2,itmp2,1 /* initialize argument count */
317 addi itmp1,itmp1,sizevmarg /* goto next argument block */
318 addi itmp2,itmp2,-1 /* argument count - 1 */
320 beq L_stack_copy_done
322 lwz itmp3,offvmargtype+4(itmp1)
323 andi. r0,itmp3,0x0002 /* is this a float/double type? */
324 bne L_stack_handle_float
327 addi t0,t0,-1 /* arguments assigned to registers */
329 bge L_stack_copy_loop
331 andi. r0,itmp3,0x0001 /* is this a 2-word type? */
332 bne L_stack_handle_long
334 lwz itmp3,offvmargdata+4(itmp1) /* get integer argument */
335 stw itmp3,0(t6) /* and store it on the stack */
336 addi t6,t6,4 /* increase temporary sp by 1 slot */
340 #if !defined(__DARWIN__)
341 addi t6,t6,4 /* align stack to 8-bytes */
342 rlwinm t6,t6,0,30,28 /* clear lower 4-bits */
345 lwz itmp3,offvmargdata+0(itmp1) /* get long argument */
346 stw itmp3,0(t6) /* and store it on the stack */
347 lwz itmp3,offvmargdata+4(itmp1)
349 addi t6,t6,8 /* increase temporary sp by 2 slots */
352 L_stack_handle_float:
353 addi t1,t1,-1 /* arguments assigned to registers */
355 bge L_stack_copy_loop
357 andi. r0,itmp3,0x0001 /* is this a 2-word type? */
358 bne L_stack_handle_double
360 lfs ftmp3,offvmargdata(itmp1) /* get float argument */
361 stfs ftmp3,0(t6) /* and store it on the stack */
362 addi t6,t6,4 /* increase temporary sp by 1 slot */
365 L_stack_handle_double:
366 #if !defined(__DARWIN__)
367 addi t6,t6,4 /* align stack to 8-bytes */
368 rlwinm t6,t6,0,30,28 /* clear lower 4-bits */
371 lfd ftmp3,offvmargdata(itmp1) /* get double argument */
372 stfd ftmp3,0(t6) /* and store it on the stack */
373 addi t6,t6,8 /* increase temporary sp by 2 slots */
377 lwz itmp1,9*4(s0) /* pass method pointer via tmp1 */
379 #if defined(__DARWIN__)
380 addis mptr,t3,ha16(L_asm_call_jit_compiler - L_asm_vm_call_method_get_pc)
381 la mptr,lo16(L_asm_call_jit_compiler - L_asm_vm_call_method_get_pc)(mptr)
383 lis mptr,L_asm_call_jit_compiler@ha
384 addi mptr,mptr,L_asm_call_jit_compiler@l
394 #if defined(__DARWIN__)
395 addi pv,itmp1,lo16(asm_vm_call_method - 1b)
397 addi pv,itmp1,(asm_vm_call_method - 1b)@l
400 L_asm_vm_call_method_return:
401 mr sp,s0 /* restore the function's sp */
403 lwz s0,8*4(sp) /* restore used callee saved registers */
405 #if defined(__DARWIN__)
406 lwz itmp1,10*4(sp) /* register r11 is callee saved */
408 lwz pv,11*4(sp) /* save PV register */
411 lfd ftmp1,14*4(sp) /* registers f14-f31 are callee saved */
414 #if defined(__DARWIN__)
430 RESTORE_TEMPORARY_REGISTERS(18) /* the offset has to be even */
433 lwz r0,40*4+LA_LR_OFFSET(r1)
438 asm_vm_call_method_exception_handler:
440 bl builtin_throw_exception
441 b L_asm_vm_call_method_return
461 lwz a0,offvmargdata+4(itmp1)
464 lwz a1,offvmargdata+4(itmp1)
467 lwz a2,offvmargdata+4(itmp1)
470 lwz a3,offvmargdata+4(itmp1)
473 lwz a4,offvmargdata+4(itmp1)
476 lwz a5,offvmargdata+4(itmp1)
479 lwz a6,offvmargdata+4(itmp1)
482 lwz a7,offvmargdata+4(itmp1)
490 #if defined(__DARWIN__)
499 /* we have two entries here, so we get the even argument register
500 alignment for linux */
515 lwz a0,offvmargdata+0(itmp1)
516 lwz a1,offvmargdata+4(itmp1)
518 #if defined(__DARWIN__)
520 lwz a1,offvmargdata+0(itmp1)
521 lwz a2,offvmargdata+4(itmp1)
525 lwz a2,offvmargdata+0(itmp1)
526 lwz a3,offvmargdata+4(itmp1)
528 #if defined(__DARWIN__)
530 lwz a3,offvmargdata+0(itmp1)
531 lwz a4,offvmargdata+4(itmp1)
535 lwz a4,offvmargdata+0(itmp1)
536 lwz a5,offvmargdata+4(itmp1)
538 #if defined(__DARWIN__)
540 lwz a5,offvmargdata+0(itmp1)
541 lwz a6,offvmargdata+4(itmp1)
545 lwz a6,offvmargdata+0(itmp1)
546 lwz a7,offvmargdata+4(itmp1)
563 #if defined(__DARWIN__)
575 lfs fa0,offvmargdata(itmp1)
578 lfs fa1,offvmargdata(itmp1)
581 lfs fa2,offvmargdata(itmp1)
584 lfs fa3,offvmargdata(itmp1)
587 lfs fa4,offvmargdata(itmp1)
590 lfs fa5,offvmargdata(itmp1)
593 lfs fa6,offvmargdata(itmp1)
596 lfs fa7,offvmargdata(itmp1)
599 #if defined(__DARWIN__)
601 lfs fa8,offvmargdata(itmp1)
604 lfs fa9,offvmargdata(itmp1)
607 lfs fa10,offvmargdata(itmp1)
610 lfs fa11,offvmargdata(itmp1)
613 lfs fa12,offvmargdata(itmp1)
631 #if defined(__DARWIN__)
643 lfd fa0,offvmargdata(itmp1)
646 lfd fa1,offvmargdata(itmp1)
649 lfd fa2,offvmargdata(itmp1)
652 lfd fa3,offvmargdata(itmp1)
655 lfd fa4,offvmargdata(itmp1)
658 lfd fa5,offvmargdata(itmp1)
661 lfd fa6,offvmargdata(itmp1)
664 lfd fa7,offvmargdata(itmp1)
667 #if defined(__DARWIN__)
669 lfd fa8,offvmargdata(itmp1)
672 lfd fa9,offvmargdata(itmp1)
675 lfd fa10,offvmargdata(itmp1)
678 lfd fa11,offvmargdata(itmp1)
681 lfd fa12,offvmargdata(itmp1)
686 /* asm_call_jit_compiler *******************************************************
688 Invokes the compiler for untranslated JavaVM methods.
690 *******************************************************************************/
692 asm_call_jit_compiler:
693 L_asm_call_jit_compiler: /* required for PIC code */
695 stw r0,LA_LR_OFFSET(r1) /* save return address */
696 stwu r1,-(LA_SIZE + 5*4 + INT_ARG_CNT*4 + FLT_ARG_CNT*8)(r1)
698 #if defined(__DARWIN__)
699 stw a0,(LA_WORD_SIZE+5+0)*4(r1)
700 stw a1,(LA_WORD_SIZE+5+1)*4(r1)
701 stw a2,(LA_WORD_SIZE+5+2)*4(r1)
702 stw a3,(LA_WORD_SIZE+5+3)*4(r1)
703 stw a4,(LA_WORD_SIZE+5+4)*4(r1)
704 stw a5,(LA_WORD_SIZE+5+5)*4(r1)
705 stw a6,(LA_WORD_SIZE+5+6)*4(r1)
706 stw a7,(LA_WORD_SIZE+5+7)*4(r1)
708 stfd fa0,(LA_WORD_SIZE+5+8)*4(r1)
709 stfd fa1,(LA_WORD_SIZE+5+10)*4(r1)
710 stfd fa2,(LA_WORD_SIZE+5+12)*4(r1)
711 stfd fa3,(LA_WORD_SIZE+5+14)*4(r1)
712 stfd fa4,(LA_WORD_SIZE+5+16)*4(r1)
713 stfd fa5,(LA_WORD_SIZE+5+18)*4(r1)
714 stfd fa6,(LA_WORD_SIZE+5+20)*4(r1)
715 stfd fa7,(LA_WORD_SIZE+5+22)*4(r1)
716 stfd fa8,(LA_WORD_SIZE+5+24)*4(r1)
717 stfd fa9,(LA_WORD_SIZE+5+26)*4(r1)
718 stfd fa10,(LA_WORD_SIZE+5+28)*4(r1)
719 stfd fa11,(LA_WORD_SIZE+5+30)*4(r1)
720 stfd fa12,(LA_WORD_SIZE+5+32)*4(r1)
722 SAVE_ARGUMENT_REGISTERS(LA_WORD_SIZE+1)
727 addi a2,sp,(LA_SIZE + 5*4 + INT_ARG_CNT*4 + FLT_ARG_CNT*8)
728 lwz a3,(LA_SIZE + 5*4 + INT_ARG_CNT*4 + FLT_ARG_CNT*8)+LA_LR_OFFSET(sp)
730 mr pv,v0 /* move address to pv register */
732 #if defined(__DARWIN__)
733 lwz a0,(LA_WORD_SIZE+5+0)*4(r1)
734 lwz a1,(LA_WORD_SIZE+5+1)*4(r1)
735 lwz a2,(LA_WORD_SIZE+5+2)*4(r1)
736 lwz a3,(LA_WORD_SIZE+5+3)*4(r1)
737 lwz a4,(LA_WORD_SIZE+5+4)*4(r1)
738 lwz a5,(LA_WORD_SIZE+5+5)*4(r1)
739 lwz a6,(LA_WORD_SIZE+5+6)*4(r1)
740 lwz a7,(LA_WORD_SIZE+5+7)*4(r1)
742 lfd fa0,(LA_WORD_SIZE+5+8)*4(r1)
743 lfd fa1,(LA_WORD_SIZE+5+10)*4(r1)
744 lfd fa2,(LA_WORD_SIZE+5+12)*4(r1)
745 lfd fa3,(LA_WORD_SIZE+5+14)*4(r1)
746 lfd fa4,(LA_WORD_SIZE+5+16)*4(r1)
747 lfd fa5,(LA_WORD_SIZE+5+18)*4(r1)
748 lfd fa6,(LA_WORD_SIZE+5+20)*4(r1)
749 lfd fa7,(LA_WORD_SIZE+5+22)*4(r1)
750 lfd fa8,(LA_WORD_SIZE+5+24)*4(r1)
751 lfd fa9,(LA_WORD_SIZE+5+26)*4(r1)
752 lfd fa10,(LA_WORD_SIZE+5+28)*4(r1)
753 lfd fa11,(LA_WORD_SIZE+5+30)*4(r1)
754 lfd fa12,(LA_WORD_SIZE+5+32)*4(r1)
756 RESTORE_ARGUMENT_REGISTERS(LA_WORD_SIZE+1)
759 lwz itmp1,(LA_SIZE + 5*4 + INT_ARG_CNT*4 + FLT_ARG_CNT*8)+LA_LR_OFFSET(r1)
762 addi sp,sp,(LA_SIZE + 5*4 + INT_ARG_CNT*4 + FLT_ARG_CNT*8)
764 mr. pv,pv /* test for exception */
765 beq L_asm_call_jit_compiler_exception
767 mtctr pv /* move method address to control reg */
768 bctr /* and call the Java method */
770 L_asm_call_jit_compiler_exception:
772 stw r0,LA_LR_OFFSET(sp)
773 stwu sp,-LA_SIZE_ALIGNED(sp) /* preserve linkage area */
774 bl exceptions_get_and_clear_exception
775 lwz xpc,LA_SIZE_ALIGNED+LA_LR_OFFSET(sp)
777 addi sp,sp,LA_SIZE_ALIGNED
779 mr xptr,v0 /* get exception */
780 addi xpc,xpc,-4 /* exception address is ra - 4 */
781 b L_asm_handle_nat_exception
784 /********************* function asm_handle_exception ***************************
786 * This function handles an exception. It does not use the usual calling *
787 * conventions. The exception pointer is passed in REG_ITMP1 and the *
788 * pc from the exception raising position is passed in REG_ITMP2. It searches *
789 * the local exception table for a handler. If no one is found, it unwinds *
790 * stacks and continues searching the callers. *
792 * void asm_handle_exception (exceptionptr, exceptionpc); *
794 *******************************************************************************/
796 asm_handle_nat_exception:
797 L_asm_handle_nat_exception: /* required for PIC code */
805 bne L_asm_handle_exception
810 asm_handle_exception:
811 L_asm_handle_exception: /* required for PIC code */
812 addi sp,sp,-(ARG_CNT+TMP_CNT)*8 /* create maybe-leaf stackframe */
814 #if defined(__DARWIN__)
816 SAVE_ARGUMENT_REGISTERS(0) /* we save arg and temp registers in */
817 SAVE_TEMPORARY_REGISTERS(ARG_CNT) /* case this is a leaf method */
820 li a3,(ARG_CNT+TMP_CNT)*8 /* prepare a3 for handle_exception */
821 li a4,1 /* set maybe-leaf flag */
823 L_asm_handle_exception_stack_loop:
824 addi sp,sp,-(LA_WORD_SIZE+4+5)*4 /* allocate stack */
825 stw xptr,LA_SIZE+4*4(sp) /* save exception pointer */
826 stw xpc,LA_SIZE+5*4(sp) /* save exception pc */
827 stw pv,LA_SIZE+6*4(sp) /* save data segment pointer */
828 mflr r0 /* save return address */
829 stw r0,LA_SIZE+5*4(sp)
830 add a3,a3,sp /* calculate Java sp into a3... */
831 addi a3,a3,(LA_WORD_SIZE+4+5)*4
832 stw a4,LA_SIZE+8*4(sp) /* save maybe-leaf flag */
834 mr a0,xptr /* pass exception pointer */
835 mr a1,xpc /* pass exception pc */
836 mr a2,pv /* pass data segment pointer */
837 /* a3 is still set */
838 bl exceptions_handle_exception
841 beq L_asm_handle_exception_not_catched
843 mr xpc,v0 /* move handlerpc into xpc */
844 lwz xptr,LA_SIZE+4*4(sp) /* restore exception pointer */
845 lwz pv,LA_SIZE+6*4(sp) /* restore data segment pointer */
846 lwz r0,LA_SIZE+5*4(sp) /* restore return address */
848 lwz a4,LA_SIZE+8*4(sp) /* get maybe-leaf flag */
849 addi sp,sp,(LA_WORD_SIZE+4+5)*4 /* free stack frame */
852 beq L_asm_handle_exception_no_leaf
854 #if defined(__DARWIN__)
856 RESTORE_ARGUMENT_REGISTERS(0) /* if this is a leaf method, we have */
857 RESTORE_TEMPORARY_REGISTERS(ARG_CNT)/* to restore arg and temp registers */
860 addi sp,sp,(ARG_CNT+TMP_CNT)*8 /* remove maybe-leaf stackframe */
862 L_asm_handle_exception_no_leaf:
863 mtctr xpc /* jump to the handler */
866 L_asm_handle_exception_not_catched:
867 lwz xptr,LA_SIZE+4*4(sp) /* restore exception pointer */
868 lwz pv,LA_SIZE+6*4(sp) /* restore data segment pointer */
869 lwz r0,LA_SIZE+5*4(sp) /* restore return address */
871 lwz a4,LA_SIZE+8*4(sp) /* get maybe-leaf flag */
872 addi sp,sp,(LA_WORD_SIZE+4+5)*4 /* free stack frame */
875 beq L_asm_handle_exception_no_leaf_stack
877 addi sp,sp,(ARG_CNT+TMP_CNT)*8 /* remove maybe-leaf stackframe */
878 li a4,0 /* clear the maybe-leaf flag */
880 L_asm_handle_exception_no_leaf_stack:
881 lwz t0,FrameSize(pv) /* get frame size */
882 add t0,sp,t0 /* pointer to save area */
884 lwz t1,IsLeaf(pv) /* is leaf procedure */
886 bne L_asm_handle_exception_no_ra_restore
888 lwz r0,LA_LR_OFFSET(t0) /* restore ra */
891 L_asm_handle_exception_no_ra_restore:
892 mflr xpc /* the new xpc is ra */
893 lwz t1,IntSave(pv) /* t1 = saved int register count */
896 mflr t2 /* t2 = current pc */
897 #if defined(__DARWIN__)
898 addi t2,t2,lo16(ex_int2-ex_int1)
900 addi t2,t2,(ex_int2-ex_int1)@l
902 slwi t1,t1,2 /* t1 = register count * 4 */
903 subf t2,t1,t2 /* t2 = IntSave - t1 */
919 subf t0,t1,t0 /* t0 = t0 - register count * 4 */
925 #if defined(__DARWIN__)
926 addi t2,t2,lo16(ex_flt2-ex_flt1)
928 addi t2,t2,(ex_flt2-ex_flt1)@l
930 slwi t1,t1,2 /* t1 = register count * 4 */
931 subf t2,t1,t2 /* t2 = FltSave - t1 */
947 lwz t0,FrameSize(pv) /* get frame size */
948 add sp,sp,t0 /* unwind stack */
949 li a3,0 /* prepare a3 for handle_exception */
958 bne L_asm_handle_exception_stack_loop
963 b L_asm_handle_exception_stack_loop
966 /* asm_abstractmethoderror *****************************************************
968 Creates and throws an AbstractMethodError.
970 *******************************************************************************/
972 asm_abstractmethoderror:
974 stw r0,LA_LR_OFFSET(sp)
975 stwu sp,-LA_SIZE_ALIGNED(sp) /* preserve linkage area */
976 addi a0,sp,LA_SIZE_ALIGNED /* pass java sp */
977 mr a1,r0 /* pass exception address */
978 bl exceptions_asm_new_abstractmethoderror
979 lwz r0,LA_SIZE_ALIGNED+LA_LR_OFFSET(sp)
980 mtlr r0 /* restore return address */
981 addi sp,sp,LA_SIZE_ALIGNED
983 mr xptr,v0 /* get exception pointer */
984 mr xpc,r0 /* we can't use r0 directly in addi */
985 addi xpc,xpc,-4 /* exception address is ra - 4 */
986 b L_asm_handle_nat_exception
989 /* asm_patcher_wrapper *********************************************************
994 20 return address into JIT code (patch position)
995 16 pointer to virtual java_objectheader
996 12 machine code (which is patched back later)
997 8 unresolved class/method/field reference
998 4 data segment displacement from load instructions
999 0 patcher function pointer to call (pv is saved here afterwards)
1001 *******************************************************************************/
1003 asm_patcher_wrapper:
1004 mflr r0 /* get Java return address (leaf) */
1005 stw r0,6*4(sp) /* store it in the stub stackframe */
1006 /* keep stack 16-bytes aligned: 6+1+37 = 44 */
1007 stwu sp,-(LA_SIZE+(5+58)*4)(sp)
1009 #if defined(__DARWIN__)
1010 stw a0,LA_SIZE+(5+0)*4(r1) /* save argument registers */
1011 stw a1,LA_SIZE+(5+1)*4(r1) /* preserve linkage area (24 bytes) */
1012 stw a2,LA_SIZE+(5+2)*4(r1) /* and 4 bytes for 4 argument */
1013 stw a3,LA_SIZE+(5+3)*4(r1)
1014 stw a4,LA_SIZE+(5+4)*4(r1)
1015 stw a5,LA_SIZE+(5+5)*4(r1)
1016 stw a6,LA_SIZE+(5+6)*4(r1)
1017 stw a7,LA_SIZE+(5+7)*4(r1)
1019 stfd fa0,LA_SIZE+(5+8)*4(sp)
1020 stfd fa1,LA_SIZE+(5+10)*4(sp)
1021 stfd fa2,LA_SIZE+(5+12)*4(sp)
1022 stfd fa3,LA_SIZE+(5+14)*4(sp)
1023 stfd fa4,LA_SIZE+(5+16)*4(sp)
1024 stfd fa5,LA_SIZE+(5+18)*4(sp)
1025 stfd fa6,LA_SIZE+(5+20)*4(sp)
1026 stfd fa7,LA_SIZE+(5+22)*4(sp)
1027 stfd fa8,LA_SIZE+(5+24)*4(sp)
1028 stfd fa9,LA_SIZE+(5+26)*4(sp)
1029 stfd fa10,LA_SIZE+(5+28)*4(sp)
1030 stfd fa11,LA_SIZE+(5+30)*4(sp)
1031 stfd fa12,LA_SIZE+(5+32)*4(sp)
1033 stw t0,(LA_WORD_SIZE+5+33)*4(r1)
1034 stw t1,(LA_WORD_SIZE+5+34)*4(r1)
1035 stw t2,(LA_WORD_SIZE+5+35)*4(r1)
1036 stw t3,(LA_WORD_SIZE+5+36)*4(r1)
1037 stw t4,(LA_WORD_SIZE+5+37)*4(r1)
1038 stw t5,(LA_WORD_SIZE+5+38)*4(r1)
1039 stw t6,(LA_WORD_SIZE+5+39)*4(r1)
1040 stw t7,(LA_WORD_SIZE+5+40)*4(r1)
1042 stfd ft0,(LA_WORD_SIZE+5+42)*4(r1)
1043 stfd ft1,(LA_WORD_SIZE+5+44)*4(r1)
1044 stfd ft2,(LA_WORD_SIZE+5+46)*4(r1)
1045 stfd ft3,(LA_WORD_SIZE+5+48)*4(r1)
1046 stfd ft4,(LA_WORD_SIZE+5+50)*4(r1)
1047 stfd ft5,(LA_WORD_SIZE+5+52)*4(r1)
1049 SAVE_ARGUMENT_REGISTERS(LA_WORD_SIZE+1) /* save 8 int/8 float arguments */
1050 SAVE_TEMPORARY_REGISTERS(LA_WORD_SIZE+1+24)
1053 stw itmp1,LA_SIZE+(5+54)*4(sp)
1054 stw itmp2,LA_SIZE+(5+55)*4(sp)
1055 stw pv,LA_SIZE+(5+56)*4(sp)
1057 addi a0,sp,LA_SIZE+(5+58)*4 /* pass SP of patcher stub */
1058 mr a1,pv /* pass PV */
1059 mr a2,r0 /* pass RA (correct for leafs) */
1061 stw v0,LA_SIZE+(5+57)*4(sp) /* save return value */
1063 #if defined(__DARWIN__)
1064 lwz a0,LA_SIZE+(5+0)*4(r1)
1065 lwz a1,LA_SIZE+(5+1)*4(r1)
1066 lwz a2,LA_SIZE+(5+2)*4(r1)
1067 lwz a3,LA_SIZE+(5+3)*4(r1)
1068 lwz a4,LA_SIZE+(5+4)*4(r1)
1069 lwz a5,LA_SIZE+(5+5)*4(r1)
1070 lwz a6,LA_SIZE+(5+6)*4(r1)
1071 lwz a7,LA_SIZE+(5+7)*4(r1)
1073 lfd fa0,LA_SIZE+(5+8)*4(sp)
1074 lfd fa1,LA_SIZE+(5+10)*4(sp)
1075 lfd fa2,LA_SIZE+(5+12)*4(sp)
1076 lfd fa3,LA_SIZE+(5+14)*4(sp)
1077 lfd fa4,LA_SIZE+(5+16)*4(sp)
1078 lfd fa5,LA_SIZE+(5+18)*4(sp)
1079 lfd fa6,LA_SIZE+(5+20)*4(sp)
1080 lfd fa7,LA_SIZE+(5+22)*4(sp)
1081 lfd fa8,LA_SIZE+(5+24)*4(sp)
1082 lfd fa9,LA_SIZE+(5+26)*4(sp)
1083 lfd fa10,LA_SIZE+(5+28)*4(sp)
1084 lfd fa11,LA_SIZE+(5+30)*4(sp)
1085 lfd fa12,LA_SIZE+(5+32)*4(sp)
1087 lwz t0,(LA_WORD_SIZE+5+33)*4(r1)
1088 lwz t1,(LA_WORD_SIZE+5+34)*4(r1)
1089 lwz t2,(LA_WORD_SIZE+5+35)*4(r1)
1090 lwz t3,(LA_WORD_SIZE+5+36)*4(r1)
1091 lwz t4,(LA_WORD_SIZE+5+37)*4(r1)
1092 lwz t5,(LA_WORD_SIZE+5+38)*4(r1)
1093 lwz t6,(LA_WORD_SIZE+5+39)*4(r1)
1094 lwz t7,(LA_WORD_SIZE+5+40)*4(r1)
1096 lfd ft0,(LA_WORD_SIZE+5+42)*4(r1)
1097 lfd ft1,(LA_WORD_SIZE+5+44)*4(r1)
1098 lfd ft2,(LA_WORD_SIZE+5+46)*4(r1)
1099 lfd ft3,(LA_WORD_SIZE+5+48)*4(r1)
1100 lfd ft4,(LA_WORD_SIZE+5+50)*4(r1)
1101 lfd ft5,(LA_WORD_SIZE+5+52)*4(r1)
1103 RESTORE_ARGUMENT_REGISTERS(LA_WORD_SIZE+1) /* restore 8 int/8 float args */
1104 RESTORE_TEMPORARY_REGISTERS(LA_WORD_SIZE+1+24)
1107 lwz itmp1,LA_SIZE+(5+54)*4(sp)
1108 lwz itmp2,LA_SIZE+(5+55)*4(sp)
1109 lwz pv,LA_SIZE+(5+56)*4(sp)
1110 lwz itmp3,LA_SIZE+(5+57)*4(sp) /* restore return value into temp reg.*/
1112 lwz r0,(6+LA_WORD_SIZE+5+58)*4(sp) /* restore RA */
1115 mr. itmp3,itmp3 /* check for an exception */
1116 bne L_asm_patcher_wrapper_exception
1118 /* get return address (into JIT code) */
1119 lwz itmp3,(5+LA_WORD_SIZE+5+58)*4(sp)
1121 /* remove stack frame + patcher stub stack */
1122 addi sp,sp,(8+LA_WORD_SIZE+5+58)*4
1125 bctr /* jump to new patched code */
1127 L_asm_patcher_wrapper_exception:
1128 mr xptr,itmp3 /* get exception */
1129 lwz xpc,(5+LA_WORD_SIZE+5+58)*4(sp)
1130 addi sp,sp,(8+LA_WORD_SIZE+5+58)*4
1131 b L_asm_handle_exception
1134 /* asm_replacement_out *********************************************************
1136 This code is jumped to from the replacement-out stubs that are executed
1137 when a thread reaches an activated replacement point.
1139 The purpose of asm_replacement_out is to read out the parts of the
1140 execution state that cannot be accessed from C code, store this state,
1141 and then call the C function replace_me.
1144 16 start of stack inside method to replace
1145 0 rplpoint * info on the replacement point that was reached
1147 NOTE: itmp3 has been clobbered by the replacement-out stub!
1149 *******************************************************************************/
1151 /* some room to accomodate changes of the stack frame size during replacement */
1152 /* XXX we should find a cleaner solution here */
1153 #define REPLACEMENT_ROOM 512
1155 asm_replacement_out:
1156 /* create stack frame */
1157 addi sp,sp,-(sizeexecutionstate + REPLACEMENT_ROOM) /* XXX align */
1159 /* save link register */
1162 /* save registers in execution state */
1163 stw r0 ,( 0*8+offes_intregs)(sp)
1164 stw r1 ,( 1*8+offes_intregs)(sp)
1165 stw r2 ,( 2*8+offes_intregs)(sp)
1166 stw r3 ,( 3*8+offes_intregs)(sp)
1167 stw r4 ,( 4*8+offes_intregs)(sp)
1168 stw r5 ,( 5*8+offes_intregs)(sp)
1169 stw r6 ,( 6*8+offes_intregs)(sp)
1170 stw r7 ,( 7*8+offes_intregs)(sp)
1171 stw r8 ,( 8*8+offes_intregs)(sp)
1172 stw r9 ,( 9*8+offes_intregs)(sp)
1173 stw r10,(10*8+offes_intregs)(sp)
1174 stw r11,(11*8+offes_intregs)(sp)
1175 stw r12,(12*8+offes_intregs)(sp)
1176 stw r13,(13*8+offes_intregs)(sp)
1177 stw r14,(14*8+offes_intregs)(sp)
1178 stw r15,(15*8+offes_intregs)(sp)
1179 stw r16,(16*8+offes_intregs)(sp) /* link register */
1180 stw r17,(17*8+offes_intregs)(sp)
1181 stw r18,(18*8+offes_intregs)(sp)
1182 stw r19,(19*8+offes_intregs)(sp)
1183 stw r20,(20*8+offes_intregs)(sp)
1184 stw r21,(21*8+offes_intregs)(sp)
1185 stw r22,(22*8+offes_intregs)(sp)
1186 stw r23,(23*8+offes_intregs)(sp)
1187 stw r24,(24*8+offes_intregs)(sp)
1188 stw r25,(25*8+offes_intregs)(sp)
1189 stw r26,(26*8+offes_intregs)(sp)
1190 stw r27,(27*8+offes_intregs)(sp)
1191 stw r28,(28*8+offes_intregs)(sp)
1192 stw r29,(29*8+offes_intregs)(sp)
1193 stw r30,(30*8+offes_intregs)(sp)
1194 stw r31,(31*8+offes_intregs)(sp)
1196 stfd fr0 ,( 0*8+offes_fltregs)(sp)
1197 stfd fr1 ,( 1*8+offes_fltregs)(sp)
1198 stfd fr2 ,( 2*8+offes_fltregs)(sp)
1199 stfd fr3 ,( 3*8+offes_fltregs)(sp)
1200 stfd fr4 ,( 4*8+offes_fltregs)(sp)
1201 stfd fr5 ,( 5*8+offes_fltregs)(sp)
1202 stfd fr6 ,( 6*8+offes_fltregs)(sp)
1203 stfd fr7 ,( 7*8+offes_fltregs)(sp)
1204 stfd fr8 ,( 8*8+offes_fltregs)(sp)
1205 stfd fr9 ,( 9*8+offes_fltregs)(sp)
1206 stfd fr10,(10*8+offes_fltregs)(sp)
1207 stfd fr11,(11*8+offes_fltregs)(sp)
1208 stfd fr12,(12*8+offes_fltregs)(sp)
1209 stfd fr13,(13*8+offes_fltregs)(sp)
1210 stfd fr14,(14*8+offes_fltregs)(sp)
1211 stfd fr15,(15*8+offes_fltregs)(sp)
1212 stfd fr16,(16*8+offes_fltregs)(sp)
1213 stfd fr17,(17*8+offes_fltregs)(sp)
1214 stfd fr18,(18*8+offes_fltregs)(sp)
1215 stfd fr19,(19*8+offes_fltregs)(sp)
1216 stfd fr20,(20*8+offes_fltregs)(sp)
1217 stfd fr21,(21*8+offes_fltregs)(sp)
1218 stfd fr22,(22*8+offes_fltregs)(sp)
1219 stfd fr23,(23*8+offes_fltregs)(sp)
1220 stfd fr24,(24*8+offes_fltregs)(sp)
1221 stfd fr25,(25*8+offes_fltregs)(sp)
1222 stfd fr26,(26*8+offes_fltregs)(sp)
1223 stfd fr27,(27*8+offes_fltregs)(sp)
1224 stfd fr28,(28*8+offes_fltregs)(sp)
1225 stfd fr29,(29*8+offes_fltregs)(sp)
1226 stfd fr30,(30*8+offes_fltregs)(sp)
1227 stfd fr31,(31*8+offes_fltregs)(sp)
1229 /* calculate sp of method */
1230 addi itmp1,sp,(sizeexecutionstate + REPLACEMENT_ROOM + 4*4)
1231 stw itmp1,(offes_sp)(sp)
1234 stw pv,(offes_pv)(sp)
1236 /* call replace_me */
1237 lwz a0,-(4*4)(itmp1) /* arg0: rplpoint * */
1238 mr a1,sp /* arg1: execution state */
1239 addi sp,sp,-(LA_SIZE_ALIGNED)
1240 b replace_me /* call C function replace_me */
1242 /* asm_replacement_in **********************************************************
1244 This code writes the given execution state and jumps to the replacement
1247 This function never returns!
1249 NOTE: itmp3 is not restored!
1252 void asm_replacement_in(executionstate *es);
1254 *******************************************************************************/
1257 /* a0 == executionstate *es */
1259 /* set new sp and pv */
1260 lwz sp,(offes_sp)(a0)
1261 lwz pv,(offes_pv)(a0)
1263 /* copy registers from execution state */
1264 lwz r0 ,( 0*8+offes_intregs)(a0)
1266 /* r2 is reserved */
1267 /* a0 is loaded below */
1268 lwz r4 ,( 4*8+offes_intregs)(a0)
1269 lwz r5 ,( 5*8+offes_intregs)(a0)
1270 lwz r6 ,( 6*8+offes_intregs)(a0)
1271 lwz r7 ,( 7*8+offes_intregs)(a0)
1272 lwz r8 ,( 8*8+offes_intregs)(a0)
1273 lwz r9 ,( 9*8+offes_intregs)(a0)
1274 lwz r10,(10*8+offes_intregs)(a0)
1275 lwz r11,(11*8+offes_intregs)(a0)
1276 lwz r12,(12*8+offes_intregs)(a0)
1278 lwz r14,(14*8+offes_intregs)(a0)
1279 lwz r15,(15*8+offes_intregs)(a0)
1280 lwz r16,(16*8+offes_intregs)(a0) /* link register */
1281 lwz r17,(17*8+offes_intregs)(a0)
1282 lwz r18,(18*8+offes_intregs)(a0)
1283 lwz r19,(19*8+offes_intregs)(a0)
1284 lwz r20,(20*8+offes_intregs)(a0)
1285 lwz r21,(21*8+offes_intregs)(a0)
1286 lwz r22,(22*8+offes_intregs)(a0)
1287 lwz r23,(23*8+offes_intregs)(a0)
1288 lwz r24,(24*8+offes_intregs)(a0)
1289 lwz r25,(25*8+offes_intregs)(a0)
1290 lwz r26,(26*8+offes_intregs)(a0)
1291 lwz r27,(27*8+offes_intregs)(a0)
1292 lwz r28,(28*8+offes_intregs)(a0)
1293 lwz r29,(29*8+offes_intregs)(a0)
1294 lwz r30,(30*8+offes_intregs)(a0)
1295 lwz r31,(31*8+offes_intregs)(a0)
1297 lfd fr0 ,( 0*8+offes_fltregs)(a0)
1298 lfd fr1 ,( 1*8+offes_fltregs)(a0)
1299 lfd fr2 ,( 2*8+offes_fltregs)(a0)
1300 lfd fr3 ,( 3*8+offes_fltregs)(a0)
1301 lfd fr4 ,( 4*8+offes_fltregs)(a0)
1302 lfd fr5 ,( 5*8+offes_fltregs)(a0)
1303 lfd fr6 ,( 6*8+offes_fltregs)(a0)
1304 lfd fr7 ,( 7*8+offes_fltregs)(a0)
1305 lfd fr8 ,( 8*8+offes_fltregs)(a0)
1306 lfd fr9 ,( 9*8+offes_fltregs)(a0)
1307 lfd fr10,(10*8+offes_fltregs)(a0)
1308 lfd fr11,(11*8+offes_fltregs)(a0)
1309 lfd fr12,(12*8+offes_fltregs)(a0)
1310 lfd fr13,(13*8+offes_fltregs)(a0)
1311 lfd fr14,(14*8+offes_fltregs)(a0)
1312 lfd fr15,(15*8+offes_fltregs)(a0)
1313 lfd fr16,(16*8+offes_fltregs)(a0)
1314 lfd fr17,(17*8+offes_fltregs)(a0)
1315 lfd fr18,(18*8+offes_fltregs)(a0)
1316 lfd fr19,(19*8+offes_fltregs)(a0)
1317 lfd fr20,(20*8+offes_fltregs)(a0)
1318 lfd fr21,(21*8+offes_fltregs)(a0)
1319 lfd fr22,(22*8+offes_fltregs)(a0)
1320 lfd fr23,(23*8+offes_fltregs)(a0)
1321 lfd fr24,(24*8+offes_fltregs)(a0)
1322 lfd fr25,(25*8+offes_fltregs)(a0)
1323 lfd fr26,(26*8+offes_fltregs)(a0)
1324 lfd fr27,(27*8+offes_fltregs)(a0)
1325 lfd fr28,(28*8+offes_fltregs)(a0)
1326 lfd fr29,(29*8+offes_fltregs)(a0)
1327 lfd fr30,(30*8+offes_fltregs)(a0)
1328 lfd fr31,(31*8+offes_fltregs)(a0)
1330 /* restore link register */
1336 lwz itmp3,offes_pc(a0)
1340 lwz a0,(3*8+offes_intregs)(a0)
1342 /* jump to new code */
1347 /*********************************************************************/
1375 asm_getclassvalues_atomic:
1378 lwz r6,offbaseval(r3)
1379 lwz r7,offdiffval(r3)
1380 lwz r8,offbaseval(r4)
1382 stw r6,offcast_super_baseval(r5)
1383 stw r7,offcast_super_diffval(r5)
1384 stw r8,offcast_sub_baseval(r5)
1389 asm_criticalsections:
1390 #if defined(ENABLE_THREADS)
1398 #if defined(__DARWIN__)
1400 .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32
1402 L_builtin_throw_exception$stub:
1403 .indirect_symbol _builtin_throw_exception
1405 bcl 20,31,L00$_builtin_throw_exception
1406 L00$_builtin_throw_exception:
1408 addis r11,r11,ha16(L_builtin_throw_exception$lazy_ptr - L00$_builtin_throw_exception)
1410 lwzu r12,lo16(L_builtin_throw_exception$lazy_ptr - L00$_builtin_throw_exception)(r11)
1414 .lazy_symbol_pointer
1415 L_builtin_throw_exception$lazy_ptr:
1416 .indirect_symbol _builtin_throw_exception
1417 .long dyld_stub_binding_helper
1420 .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32
1422 L_exceptions_handle_exception$stub:
1423 .indirect_symbol _exceptions_handle_exception
1425 bcl 20,31,L00$_exceptions_handle_exception
1426 L00$_exceptions_handle_exception:
1428 addis r11,r11,ha16(L_exceptions_handle_exception$lazy_ptr - L00$_exceptions_handle_exception)
1430 lwzu r12,lo16(L_exceptions_handle_exception$lazy_ptr - L00$_exceptions_handle_exception)(r11)
1434 .lazy_symbol_pointer
1435 L_exceptions_handle_exception$lazy_ptr:
1436 .indirect_symbol _exceptions_handle_exception
1437 .long dyld_stub_binding_helper
1440 .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32
1442 L_stacktrace_create_extern_stackframeinfo$stub:
1443 .indirect_symbol _stacktrace_create_extern_stackframeinfo
1445 bcl 20,31,L00$_stacktrace_create_extern_stackframeinfo
1446 L00$_stacktrace_create_extern_stackframeinfo:
1448 addis r11,r11,ha16(L_stacktrace_create_extern_stackframeinfo$lazy_ptr - L00$_stacktrace_create_extern_stackframeinfo)
1450 lwzu r12,lo16(L_stacktrace_create_extern_stackframeinfo$lazy_ptr - L00$_stacktrace_create_extern_stackframeinfo)(r11)
1454 .lazy_symbol_pointer
1455 L_stacktrace_create_extern_stackframeinfo$lazy_ptr:
1456 .indirect_symbol _stacktrace_create_extern_stackframeinfo
1457 .long dyld_stub_binding_helper
1460 .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32
1462 L_jit_asm_compile$stub:
1463 .indirect_symbol _jit_asm_compile
1465 bcl 20,31,L00$_jit_asm_compile
1466 L00$_jit_asm_compile:
1468 addis r11,r11,ha16(L_jit_asm_compile$lazy_ptr - L00$_jit_asm_compile)
1470 lwzu r12,lo16(L_jit_asm_compile$lazy_ptr - L00$_jit_asm_compile)(r11)
1474 .lazy_symbol_pointer
1475 L_jit_asm_compile$lazy_ptr:
1476 .indirect_symbol _jit_asm_compile
1477 .long dyld_stub_binding_helper
1480 .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32
1482 L_stacktrace_remove_stackframeinfo$stub:
1483 .indirect_symbol _stacktrace_remove_stackframeinfo
1485 bcl 20,31,L00$_stacktrace_remove_stackframeinfo
1486 L00$_stacktrace_remove_stackframeinfo:
1488 addis r11,r11,ha16(L_stacktrace_remove_stackframeinfo$lazy_ptr - L00$_stacktrace_remove_stackframeinfo)
1490 lwzu r12,lo16(L_stacktrace_remove_stackframeinfo$lazy_ptr - L00$_stacktrace_remove_stackframeinfo)(r11)
1494 .lazy_symbol_pointer
1495 L_stacktrace_remove_stackframeinfo$lazy_ptr:
1496 .indirect_symbol _stacktrace_remove_stackframeinfo
1497 .long dyld_stub_binding_helper
1500 .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32
1502 L_exceptions_get_and_clear_exception$stub:
1503 .indirect_symbol _exceptions_get_and_clear_exception
1505 bcl 20,31,L00$_exceptions_get_and_clear_exception
1506 L00$_exceptions_get_and_clear_exception:
1508 addis r11,r11,ha16(L_exceptions_get_and_clear_exception$lazy_ptr - L00$_exceptions_get_and_clear_exception)
1510 lwzu r12,lo16(L_exceptions_get_and_clear_exception$lazy_ptr - L00$_exceptions_get_and_clear_exception)(r11)
1514 .lazy_symbol_pointer
1515 L_exceptions_get_and_clear_exception$lazy_ptr:
1516 .indirect_symbol _exceptions_get_and_clear_exception
1517 .long dyld_stub_binding_helper
1520 .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32
1522 L_exceptions_asm_new_abstractmethoderror$stub:
1523 .indirect_symbol _exceptions_asm_new_abstractmethoderror
1525 bcl 20,31,L00$_exceptions_asm_new_abstractmethoderror
1526 L00$_exceptions_asm_new_abstractmethoderror:
1528 addis r11,r11,ha16(L_exceptions_asm_new_abstractmethoderror$lazy_ptr - L00$_exceptions_asm_new_abstractmethoderror)
1530 lwzu r12,lo16(L_exceptions_asm_new_abstractmethoderror$lazy_ptr - L00$_exceptions_asm_new_abstractmethoderror)(r11)
1534 .lazy_symbol_pointer
1535 L_exceptions_asm_new_abstractmethoderror$lazy_ptr:
1536 .indirect_symbol _exceptions_asm_new_abstractmethoderror
1537 .long dyld_stub_binding_helper
1540 .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32
1542 L_patcher_wrapper$stub:
1543 .indirect_symbol _patcher_wrapper
1545 bcl 20,31,L00$_patcher_wrapper
1546 L00$_patcher_wrapper:
1548 addis r11,r11,ha16(L_patcher_wrapper$lazy_ptr - L00$_patcher_wrapper)
1550 lwzu r12,lo16(L_patcher_wrapper$lazy_ptr - L00$_patcher_wrapper)(r11)
1554 .lazy_symbol_pointer
1555 L_patcher_wrapper$lazy_ptr:
1556 .indirect_symbol _patcher_wrapper
1557 .long dyld_stub_binding_helper
1560 .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32
1563 .indirect_symbol _replace_me
1565 bcl 20,31,L00$_replace_me
1568 addis r11,r11,ha16(L_replace_me$lazy_ptr - L00$_replace_me)
1570 lwzu r12,lo16(L_replace_me$lazy_ptr - L00$_replace_me)(r11)
1574 .lazy_symbol_pointer
1575 L_replace_me$lazy_ptr:
1576 .indirect_symbol _replace_me
1577 .long dyld_stub_binding_helper
1579 #endif /* defined(__DARWIN__) */
1582 /* Disable exec-stacks, required for Gentoo ***********************************/
1584 #if defined(__GCC__) && defined(__ELF__)
1585 .section .note.GNU-stack,"",@progbits
1590 * These are local overrides for various environment variables in Emacs.
1591 * Please do not remove this and leave it at the end of the file, where
1592 * Emacs will automagically detect them.
1593 * ---------------------------------------------------------------------
1596 * indent-tabs-mode: t
1600 * vim:noexpandtab:sw=4:ts=4: