1 /* src/vm/jit/powerpc64/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 5213 2006-08-07 15:12:20Z tbfg $
44 #include "vm/jit/abi-asm.h"
45 #include "vm/jit/methodheader.h"
46 #include "vm/jit/powerpc64/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
76 .globl .asm_cacheflush /* no function descriptor needed, only called direct */
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 */
115 .quad .asm_vm_call_method,.TOC.@tocbase,0
117 .size asm_vm_call_method, 24
118 .type .asm_vm_call_method,@function
119 .globl .asm_vm_call_method
122 .asm_vm_call_method_int:
123 .asm_vm_call_method_long:
124 .asm_vm_call_method_float:
125 .asm_vm_call_method_double:
127 stw r0,LA_LR_OFFSET(r1)
130 stw s0,8*4(sp) /* save used callee saved registers */
131 stw a0,9*4(sp) /* save method pointer for compiler */
133 #if defined(__DARWIN__)
134 stw itmp1,10*4(sp) /* register r11 is callee saved */
136 stw pv,11*4(sp) /* save PV register */
138 stw itmp3,12*4(sp) /* registers r14-r31 are callee saved */
139 stfd ftmp1,14*4(sp) /* registers f14-f31 are callee saved */
142 #if defined(__DARWIN__)
158 SAVE_TEMPORARY_REGISTERS(18) /* the offset has to be even */
161 mr itmp2,a1 /* arg count */
162 mr itmp1,a2 /* pointer to arg block */
164 mr t4,itmp2 /* save argument count */
165 mr t5,itmp1 /* save argument block pointer */
167 mr s0,sp /* save current sp to s0 */
169 addi itmp1,itmp1,-sizevmarg /* initialize pointer (smaller code) */
170 addi itmp2,itmp2,1 /* initialize argument count */
171 li t0,0 /* initialize integer argument counter */
172 li t1,0 /* initialize float argument counter */
173 li t6,0 /* initialize integer register counter */
174 #if defined(__DARWIN__)
175 li t7,0 /* initialize stack slot counter */
178 mflr r0 /* save link register (PIC code) */
179 bl L_asm_vm_call_method_get_pc
180 L_asm_vm_call_method_get_pc:
181 mflr t3 /* t3 contains the current pc */
185 addi itmp1,itmp1,sizevmarg /* goto next argument block */
186 addi itmp2,itmp2,-1 /* argument count - 1 */
188 beq L_register_copy_done
190 lwz itmp3,offvmargtype+4(itmp1)
191 andi. r0,itmp3,0x0002 /* is this a float/double type? */
192 bne L_register_handle_float
194 L_register_handle_int:
195 cmpwi t6,INT_ARG_CNT /* are we out of integer argument */
196 beq L_register_copy /* registers? yes, next loop */
198 andi. r0,itmp3,0x0001 /* is this a 2-word type? */
199 bne L_register_handle_long
201 #if defined(__DARWIN__)
202 addis itmp3,t3,ha16(L_jumptable_int - L_asm_vm_call_method_get_pc)
203 la itmp3,lo16(L_jumptable_int - L_asm_vm_call_method_get_pc)(itmp3)
205 lis itmp3,L_jumptable_int@ha
206 addi itmp3,itmp3,L_jumptable_int@l
209 slwi t2,t6,2 /* multiple of 4-bytes */
210 add itmp3,itmp3,t2 /* calculate address of jumptable */
211 lwz itmp3,0(itmp3) /* load function address */
213 addi t0,t0,1 /* integer argument counter */
214 addi t6,t6,1 /* integer argument register counter */
215 #if defined(__DARWIN__)
216 addi t7,t7,1 /* stack slot counter */
220 L_register_handle_long:
221 #if defined(__DARWIN__)
222 addis itmp3,t3,ha16(L_jumptable_long - L_asm_vm_call_method_get_pc)
223 la itmp3,lo16(L_jumptable_long - L_asm_vm_call_method_get_pc)(itmp3)
225 lis itmp3,L_jumptable_long@ha
226 addi itmp3,itmp3,L_jumptable_long@l
228 #if !defined(__DARWIN__)
229 addi t6,t6,1 /* align to even numbers */
233 cmpwi t6,(INT_ARG_CNT - 1) /* are we out of integer argument */
234 blt L_register_handle_long_continue /* registers? */
236 li t6,INT_ARG_CNT /* yes, set integer argument register */
237 b L_register_copy /* count to max and next loop */
239 L_register_handle_long_continue:
240 slwi t2,t6,2 /* multiple of 4-bytes */
241 add itmp3,itmp3,t2 /* calculate address of jumptable */
242 lwz itmp3,0(itmp3) /* load function address */
244 addi t0,t0,1 /* integer argument counter */
245 addi t6,t6,2 /* integer argument register counter */
246 #if defined(__DARWIN__)
247 addi t7,t7,2 /* stack slot counter */
251 L_register_handle_float:
252 cmpwi t1,FLT_ARG_CNT /* are we out of float argument */
253 beq L_register_copy /* registers? yes, next loop */
255 andi. r0,itmp3,0x0001 /* is this a 2-word type? */
256 bne L_register_handle_double
258 #if defined(__DARWIN__)
259 addis itmp3,t3,ha16(L_jumptable_float - L_asm_vm_call_method_get_pc)
260 la itmp3,lo16(L_jumptable_float - L_asm_vm_call_method_get_pc)(itmp3)
262 lis itmp3,L_jumptable_float@ha
263 addi itmp3,itmp3,L_jumptable_float@l
266 slwi t2,t1,2 /* multiple of 4-bytes */
267 add itmp3,itmp3,t2 /* calculate address of jumptable */
268 lwz itmp3,0(itmp3) /* load function address */
270 addi t1,t1,1 /* float argument counter */
271 #if defined(__DARWIN__)
272 addi t7,t7,1 /* stack slot counter */
273 addi t6,t6,1 /* skip 1 integer argument register */
277 L_register_handle_double:
278 #if defined(__DARWIN__)
279 addis itmp3,t3,ha16(L_jumptable_double - L_asm_vm_call_method_get_pc)
280 la itmp3,lo16(L_jumptable_double - L_asm_vm_call_method_get_pc)(itmp3)
282 lis itmp3,L_jumptable_double@ha
283 addi itmp3,itmp3,L_jumptable_double@l
286 slwi t2,t1,2 /* multiple of 4-bytes */
287 add itmp3,itmp3,t2 /* calculate address of jumptable */
288 lwz itmp3,0(itmp3) /* load function address */
290 addi t1,t1,1 /* float argument counter */
291 #if defined(__DARWIN__)
292 addi t7,t7,2 /* stack slot counter */
293 addi t6,t6,2 /* skip 2 integer argument registers */
297 L_register_copy_done:
298 /* calculate remaining arguments */
299 sub itmp3,t4,t0 /* - integer arguments in registers */
300 sub itmp3,itmp3,t1 /* - float arguments in registers */
302 beq L_stack_copy_done
304 mr itmp2,t4 /* restore argument count */
305 mr itmp1,t5 /* restore argument block pointer */
307 slwi t4,itmp3,3 /* XXX use 8-bytes slots for now */
308 addi t4,t4,LA_SIZE /* add size of linkage area */
310 #if defined(__DARWIN__)
311 slwi t5,t7,2 /* add stack space for arguments */
317 mr t6,sp /* use t6 as temporary sp */
318 addi t6,t6,LA_SIZE /* skip linkage area */
319 #if defined(__DARWIN__)
320 add t6,t6,t5 /* skip stack space for arguments */
323 addi itmp1,itmp1,-sizevmarg /* initialize pointer (smaller code) */
324 addi itmp2,itmp2,1 /* initialize argument count */
327 addi itmp1,itmp1,sizevmarg /* goto next argument block */
328 addi itmp2,itmp2,-1 /* argument count - 1 */
330 beq L_stack_copy_done
332 lwz itmp3,offvmargtype+4(itmp1)
333 andi. r0,itmp3,0x0002 /* is this a float/double type? */
334 bne L_stack_handle_float
337 addi t0,t0,-1 /* arguments assigned to registers */
339 bge L_stack_copy_loop
341 andi. r0,itmp3,0x0001 /* is this a 2-word type? */
342 bne L_stack_handle_long
344 lwz itmp3,offvmargdata+4(itmp1) /* get integer argument */
345 stw itmp3,0(t6) /* and store it on the stack */
346 addi t6,t6,4 /* increase temporary sp by 1 slot */
350 #if !defined(__DARWIN__)
351 addi t6,t6,4 /* align stack to 8-bytes */
352 rlwinm t6,t6,0,30,28 /* clear lower 4-bits */
355 lwz itmp3,offvmargdata+0(itmp1) /* get long argument */
356 stw itmp3,0(t6) /* and store it on the stack */
357 lwz itmp3,offvmargdata+4(itmp1)
359 addi t6,t6,8 /* increase temporary sp by 2 slots */
362 L_stack_handle_float:
363 addi t1,t1,-1 /* arguments assigned to registers */
365 bge L_stack_copy_loop
367 andi. r0,itmp3,0x0001 /* is this a 2-word type? */
368 bne L_stack_handle_double
370 lfs ftmp3,offvmargdata(itmp1) /* get float argument */
371 stfs ftmp3,0(t6) /* and store it on the stack */
372 addi t6,t6,4 /* increase temporary sp by 1 slot */
375 L_stack_handle_double:
376 #if !defined(__DARWIN__)
377 addi t6,t6,4 /* align stack to 8-bytes */
378 rlwinm t6,t6,0,30,28 /* clear lower 4-bits */
381 lfd ftmp3,offvmargdata(itmp1) /* get double argument */
382 stfd ftmp3,0(t6) /* and store it on the stack */
383 addi t6,t6,8 /* increase temporary sp by 2 slots */
387 lwz itmp1,9*4(s0) /* pass method pointer via tmp1 */
389 #if defined(__DARWIN__)
390 addis mptr,t3,ha16(L_asm_call_jit_compiler - L_asm_vm_call_method_get_pc)
391 la mptr,lo16(L_asm_call_jit_compiler - L_asm_vm_call_method_get_pc)(mptr)
393 lis mptr,L_asm_call_jit_compiler@ha
394 addi mptr,mptr,L_asm_call_jit_compiler@l
404 #if defined(__DARWIN__)
405 addi pv,itmp1,lo16(.asm_vm_call_method - 1b)
407 addi pv,itmp1,(.asm_vm_call_method - 1b)@l
410 L_asm_vm_call_method_return:
411 mr sp,s0 /* restore the function's sp */
413 lwz s0,8*4(sp) /* restore used callee saved registers */
415 #if defined(__DARWIN__)
416 lwz itmp1,10*4(sp) /* register r11 is callee saved */
418 lwz pv,11*4(sp) /* save PV register */
421 lfd ftmp1,14*4(sp) /* registers f14-f31 are callee saved */
424 #if defined(__DARWIN__)
440 RESTORE_TEMPORARY_REGISTERS(18) /* the offset has to be even */
443 lwz r0,40*4+LA_LR_OFFSET(r1)
448 asm_vm_call_method_exception_handler:
450 bl builtin_throw_exception
451 b L_asm_vm_call_method_return
471 lwz a0,offvmargdata+4(itmp1)
474 lwz a1,offvmargdata+4(itmp1)
477 lwz a2,offvmargdata+4(itmp1)
480 lwz a3,offvmargdata+4(itmp1)
483 lwz a4,offvmargdata+4(itmp1)
486 lwz a5,offvmargdata+4(itmp1)
489 lwz a6,offvmargdata+4(itmp1)
492 lwz a7,offvmargdata+4(itmp1)
500 #if defined(__DARWIN__)
509 /* we have two entries here, so we get the even argument register
510 alignment for linux */
525 lwz a0,offvmargdata+0(itmp1)
526 lwz a1,offvmargdata+4(itmp1)
528 #if defined(__DARWIN__)
530 lwz a1,offvmargdata+0(itmp1)
531 lwz a2,offvmargdata+4(itmp1)
535 lwz a2,offvmargdata+0(itmp1)
536 lwz a3,offvmargdata+4(itmp1)
538 #if defined(__DARWIN__)
540 lwz a3,offvmargdata+0(itmp1)
541 lwz a4,offvmargdata+4(itmp1)
545 lwz a4,offvmargdata+0(itmp1)
546 lwz a5,offvmargdata+4(itmp1)
548 #if defined(__DARWIN__)
550 lwz a5,offvmargdata+0(itmp1)
551 lwz a6,offvmargdata+4(itmp1)
555 lwz a6,offvmargdata+0(itmp1)
556 lwz a7,offvmargdata+4(itmp1)
573 #if defined(__DARWIN__)
585 lfs fa0,offvmargdata(itmp1)
588 lfs fa1,offvmargdata(itmp1)
591 lfs fa2,offvmargdata(itmp1)
594 lfs fa3,offvmargdata(itmp1)
597 lfs fa4,offvmargdata(itmp1)
600 lfs fa5,offvmargdata(itmp1)
603 lfs fa6,offvmargdata(itmp1)
606 lfs fa7,offvmargdata(itmp1)
609 #if defined(__DARWIN__)
611 lfs fa8,offvmargdata(itmp1)
614 lfs fa9,offvmargdata(itmp1)
617 lfs fa10,offvmargdata(itmp1)
620 lfs fa11,offvmargdata(itmp1)
623 lfs fa12,offvmargdata(itmp1)
641 #if defined(__DARWIN__)
653 lfd fa0,offvmargdata(itmp1)
656 lfd fa1,offvmargdata(itmp1)
659 lfd fa2,offvmargdata(itmp1)
662 lfd fa3,offvmargdata(itmp1)
665 lfd fa4,offvmargdata(itmp1)
668 lfd fa5,offvmargdata(itmp1)
671 lfd fa6,offvmargdata(itmp1)
674 lfd fa7,offvmargdata(itmp1)
677 #if defined(__DARWIN__)
679 lfd fa8,offvmargdata(itmp1)
682 lfd fa9,offvmargdata(itmp1)
685 lfd fa10,offvmargdata(itmp1)
688 lfd fa11,offvmargdata(itmp1)
691 lfd fa12,offvmargdata(itmp1)
696 /* asm_call_jit_compiler *******************************************************
698 Invokes the compiler for untranslated JavaVM methods.
700 *******************************************************************************/
702 asm_call_jit_compiler:
703 L_asm_call_jit_compiler: /* required for PIC code */
705 stw r0,LA_LR_OFFSET(r1) /* save return address */
706 stwu r1,-(LA_SIZE + 5*4 + INT_ARG_CNT*4 + FLT_ARG_CNT*8)(r1)
708 #if defined(__DARWIN__)
709 stw a0,(LA_WORD_SIZE+5+0)*4(r1)
710 stw a1,(LA_WORD_SIZE+5+1)*4(r1)
711 stw a2,(LA_WORD_SIZE+5+2)*4(r1)
712 stw a3,(LA_WORD_SIZE+5+3)*4(r1)
713 stw a4,(LA_WORD_SIZE+5+4)*4(r1)
714 stw a5,(LA_WORD_SIZE+5+5)*4(r1)
715 stw a6,(LA_WORD_SIZE+5+6)*4(r1)
716 stw a7,(LA_WORD_SIZE+5+7)*4(r1)
718 stfd fa0,(LA_WORD_SIZE+5+8)*4(r1)
719 stfd fa1,(LA_WORD_SIZE+5+10)*4(r1)
720 stfd fa2,(LA_WORD_SIZE+5+12)*4(r1)
721 stfd fa3,(LA_WORD_SIZE+5+14)*4(r1)
722 stfd fa4,(LA_WORD_SIZE+5+16)*4(r1)
723 stfd fa5,(LA_WORD_SIZE+5+18)*4(r1)
724 stfd fa6,(LA_WORD_SIZE+5+20)*4(r1)
725 stfd fa7,(LA_WORD_SIZE+5+22)*4(r1)
726 stfd fa8,(LA_WORD_SIZE+5+24)*4(r1)
727 stfd fa9,(LA_WORD_SIZE+5+26)*4(r1)
728 stfd fa10,(LA_WORD_SIZE+5+28)*4(r1)
729 stfd fa11,(LA_WORD_SIZE+5+30)*4(r1)
730 stfd fa12,(LA_WORD_SIZE+5+32)*4(r1)
732 SAVE_ARGUMENT_REGISTERS(LA_WORD_SIZE+1)
737 addi a2,sp,(LA_SIZE + 5*4 + INT_ARG_CNT*4 + FLT_ARG_CNT*8)
738 lwz a3,(LA_SIZE + 5*4 + INT_ARG_CNT*4 + FLT_ARG_CNT*8)+LA_LR_OFFSET(sp)
740 mr pv,v0 /* move address to pv register */
742 #if defined(__DARWIN__)
743 lwz a0,(LA_WORD_SIZE+5+0)*4(r1)
744 lwz a1,(LA_WORD_SIZE+5+1)*4(r1)
745 lwz a2,(LA_WORD_SIZE+5+2)*4(r1)
746 lwz a3,(LA_WORD_SIZE+5+3)*4(r1)
747 lwz a4,(LA_WORD_SIZE+5+4)*4(r1)
748 lwz a5,(LA_WORD_SIZE+5+5)*4(r1)
749 lwz a6,(LA_WORD_SIZE+5+6)*4(r1)
750 lwz a7,(LA_WORD_SIZE+5+7)*4(r1)
752 lfd fa0,(LA_WORD_SIZE+5+8)*4(r1)
753 lfd fa1,(LA_WORD_SIZE+5+10)*4(r1)
754 lfd fa2,(LA_WORD_SIZE+5+12)*4(r1)
755 lfd fa3,(LA_WORD_SIZE+5+14)*4(r1)
756 lfd fa4,(LA_WORD_SIZE+5+16)*4(r1)
757 lfd fa5,(LA_WORD_SIZE+5+18)*4(r1)
758 lfd fa6,(LA_WORD_SIZE+5+20)*4(r1)
759 lfd fa7,(LA_WORD_SIZE+5+22)*4(r1)
760 lfd fa8,(LA_WORD_SIZE+5+24)*4(r1)
761 lfd fa9,(LA_WORD_SIZE+5+26)*4(r1)
762 lfd fa10,(LA_WORD_SIZE+5+28)*4(r1)
763 lfd fa11,(LA_WORD_SIZE+5+30)*4(r1)
764 lfd fa12,(LA_WORD_SIZE+5+32)*4(r1)
766 RESTORE_ARGUMENT_REGISTERS(LA_WORD_SIZE+1)
769 lwz itmp1,(LA_SIZE + 5*4 + INT_ARG_CNT*4 + FLT_ARG_CNT*8)+LA_LR_OFFSET(r1)
772 addi sp,sp,(LA_SIZE + 5*4 + INT_ARG_CNT*4 + FLT_ARG_CNT*8)
774 mr. pv,pv /* test for exception */
775 beq L_asm_call_jit_compiler_exception
777 mtctr pv /* move method address to control reg */
778 bctr /* and call the Java method */
780 L_asm_call_jit_compiler_exception:
782 stw r0,LA_LR_OFFSET(sp)
783 stwu sp,-LA_SIZE_ALIGNED(sp) /* preserve linkage area */
784 bl exceptions_get_and_clear_exception
785 lwz xpc,LA_SIZE_ALIGNED+LA_LR_OFFSET(sp)
787 addi sp,sp,LA_SIZE_ALIGNED
789 mr xptr,v0 /* get exception */
790 addi xpc,xpc,-4 /* exception address is ra - 4 */
791 b L_asm_handle_nat_exception
794 /********************* function asm_handle_exception ***************************
796 * This function handles an exception. It does not use the usual calling *
797 * conventions. The exception pointer is passed in REG_ITMP1 and the *
798 * pc from the exception raising position is passed in REG_ITMP2. It searches *
799 * the local exception table for a handler. If no one is found, it unwinds *
800 * stacks and continues searching the callers. *
802 * void asm_handle_exception (exceptionptr, exceptionpc); *
804 *******************************************************************************/
806 asm_handle_nat_exception:
807 L_asm_handle_nat_exception: /* required for PIC code */
815 bne L_asm_handle_exception
820 asm_handle_exception:
821 L_asm_handle_exception: /* required for PIC code */
822 addi sp,sp,-(ARG_CNT+TMP_CNT)*8 /* create maybe-leaf stackframe */
824 #if defined(__DARWIN__)
826 SAVE_ARGUMENT_REGISTERS(0) /* we save arg and temp registers in */
827 SAVE_TEMPORARY_REGISTERS(ARG_CNT) /* case this is a leaf method */
830 li a3,(ARG_CNT+TMP_CNT)*8 /* prepare a3 for handle_exception */
831 li a4,1 /* set maybe-leaf flag */
833 L_asm_handle_exception_stack_loop:
834 addi sp,sp,-(LA_WORD_SIZE+4+5)*4 /* allocate stack */
835 stw xptr,LA_SIZE+4*4(sp) /* save exception pointer */
836 stw xpc,LA_SIZE+5*4(sp) /* save exception pc */
837 stw pv,LA_SIZE+6*4(sp) /* save data segment pointer */
838 mflr r0 /* save return address */
839 stw r0,LA_SIZE+5*4(sp)
840 add a3,a3,sp /* calculate Java sp into a3... */
841 addi a3,a3,(LA_WORD_SIZE+4+5)*4
842 stw a4,LA_SIZE+8*4(sp) /* save maybe-leaf flag */
844 mr a0,xptr /* pass exception pointer */
845 mr a1,xpc /* pass exception pc */
846 mr a2,pv /* pass data segment pointer */
847 /* a3 is still set */
848 bl exceptions_handle_exception
851 beq L_asm_handle_exception_not_catched
853 mr xpc,v0 /* move handlerpc into xpc */
854 lwz xptr,LA_SIZE+4*4(sp) /* restore exception pointer */
855 lwz pv,LA_SIZE+6*4(sp) /* restore data segment pointer */
856 lwz r0,LA_SIZE+5*4(sp) /* restore return address */
858 lwz a4,LA_SIZE+8*4(sp) /* get maybe-leaf flag */
859 addi sp,sp,(LA_WORD_SIZE+4+5)*4 /* free stack frame */
862 beq L_asm_handle_exception_no_leaf
864 #if defined(__DARWIN__)
866 RESTORE_ARGUMENT_REGISTERS(0) /* if this is a leaf method, we have */
867 RESTORE_TEMPORARY_REGISTERS(ARG_CNT)/* to restore arg and temp registers */
870 addi sp,sp,(ARG_CNT+TMP_CNT)*8 /* remove maybe-leaf stackframe */
872 L_asm_handle_exception_no_leaf:
873 mtctr xpc /* jump to the handler */
876 L_asm_handle_exception_not_catched:
877 lwz xptr,LA_SIZE+4*4(sp) /* restore exception pointer */
878 lwz pv,LA_SIZE+6*4(sp) /* restore data segment pointer */
879 lwz r0,LA_SIZE+5*4(sp) /* restore return address */
881 lwz a4,LA_SIZE+8*4(sp) /* get maybe-leaf flag */
882 addi sp,sp,(LA_WORD_SIZE+4+5)*4 /* free stack frame */
885 beq L_asm_handle_exception_no_leaf_stack
887 addi sp,sp,(ARG_CNT+TMP_CNT)*8 /* remove maybe-leaf stackframe */
888 li a4,0 /* clear the maybe-leaf flag */
890 L_asm_handle_exception_no_leaf_stack:
891 lwz t0,FrameSize(pv) /* get frame size */
892 add t0,sp,t0 /* pointer to save area */
894 lwz t1,IsLeaf(pv) /* is leaf procedure */
896 bne L_asm_handle_exception_no_ra_restore
898 lwz r0,LA_LR_OFFSET(t0) /* restore ra */
901 L_asm_handle_exception_no_ra_restore:
902 mflr xpc /* the new xpc is ra */
903 lwz t1,IntSave(pv) /* t1 = saved int register count */
906 mflr t2 /* t2 = current pc */
907 #if defined(__DARWIN__)
908 addi t2,t2,lo16(ex_int2-ex_int1)
910 addi t2,t2,(ex_int2-ex_int1)@l
912 slwi t1,t1,2 /* t1 = register count * 4 */
913 subf t2,t1,t2 /* t2 = IntSave - t1 */
929 subf t0,t1,t0 /* t0 = t0 - register count * 4 */
935 #if defined(__DARWIN__)
936 addi t2,t2,lo16(ex_flt2-ex_flt1)
938 addi t2,t2,(ex_flt2-ex_flt1)@l
940 slwi t1,t1,2 /* t1 = register count * 4 */
941 subf t2,t1,t2 /* t2 = FltSave - t1 */
957 lwz t0,FrameSize(pv) /* get frame size */
958 add sp,sp,t0 /* unwind stack */
959 li a3,0 /* prepare a3 for handle_exception */
968 bne L_asm_handle_exception_stack_loop
973 b L_asm_handle_exception_stack_loop
976 /* asm_abstractmethoderror *****************************************************
978 Creates and throws an AbstractMethodError.
980 *******************************************************************************/
982 asm_abstractmethoderror:
984 stw r0,LA_LR_OFFSET(sp)
985 stwu sp,-LA_SIZE_ALIGNED(sp) /* preserve linkage area */
986 addi a0,sp,LA_SIZE_ALIGNED /* pass java sp */
987 mr a1,r0 /* pass exception address */
988 bl exceptions_asm_new_abstractmethoderror
989 lwz r0,LA_SIZE_ALIGNED+LA_LR_OFFSET(sp)
990 mtlr r0 /* restore return address */
991 addi sp,sp,LA_SIZE_ALIGNED
993 mr xptr,v0 /* get exception pointer */
994 mr xpc,r0 /* we can't use r0 directly in addi */
995 addi xpc,xpc,-4 /* exception address is ra - 4 */
996 b L_asm_handle_nat_exception
999 /* asm_patcher_wrapper *********************************************************
1004 20 return address into JIT code (patch position)
1005 16 pointer to virtual java_objectheader
1006 12 machine code (which is patched back later)
1007 8 unresolved class/method/field reference
1008 4 data segment displacement from load instructions
1009 0 patcher function pointer to call (pv is saved here afterwards)
1011 *******************************************************************************/
1013 asm_patcher_wrapper:
1014 mflr r0 /* get Java return address (leaf) */
1015 stw r0,6*4(sp) /* store it in the stub stackframe */
1016 /* keep stack 16-bytes aligned: 6+1+37 = 44 */
1017 stwu sp,-(LA_SIZE+(5+58)*4)(sp)
1019 #if defined(__DARWIN__)
1020 stw a0,LA_SIZE+(5+0)*4(r1) /* save argument registers */
1021 stw a1,LA_SIZE+(5+1)*4(r1) /* preserve linkage area (24 bytes) */
1022 stw a2,LA_SIZE+(5+2)*4(r1) /* and 4 bytes for 4 argument */
1023 stw a3,LA_SIZE+(5+3)*4(r1)
1024 stw a4,LA_SIZE+(5+4)*4(r1)
1025 stw a5,LA_SIZE+(5+5)*4(r1)
1026 stw a6,LA_SIZE+(5+6)*4(r1)
1027 stw a7,LA_SIZE+(5+7)*4(r1)
1029 stfd fa0,LA_SIZE+(5+8)*4(sp)
1030 stfd fa1,LA_SIZE+(5+10)*4(sp)
1031 stfd fa2,LA_SIZE+(5+12)*4(sp)
1032 stfd fa3,LA_SIZE+(5+14)*4(sp)
1033 stfd fa4,LA_SIZE+(5+16)*4(sp)
1034 stfd fa5,LA_SIZE+(5+18)*4(sp)
1035 stfd fa6,LA_SIZE+(5+20)*4(sp)
1036 stfd fa7,LA_SIZE+(5+22)*4(sp)
1037 stfd fa8,LA_SIZE+(5+24)*4(sp)
1038 stfd fa9,LA_SIZE+(5+26)*4(sp)
1039 stfd fa10,LA_SIZE+(5+28)*4(sp)
1040 stfd fa11,LA_SIZE+(5+30)*4(sp)
1041 stfd fa12,LA_SIZE+(5+32)*4(sp)
1043 stw t0,(LA_WORD_SIZE+5+33)*4(r1)
1044 stw t1,(LA_WORD_SIZE+5+34)*4(r1)
1045 stw t2,(LA_WORD_SIZE+5+35)*4(r1)
1046 stw t3,(LA_WORD_SIZE+5+36)*4(r1)
1047 stw t4,(LA_WORD_SIZE+5+37)*4(r1)
1048 stw t5,(LA_WORD_SIZE+5+38)*4(r1)
1049 stw t6,(LA_WORD_SIZE+5+39)*4(r1)
1050 stw t7,(LA_WORD_SIZE+5+40)*4(r1)
1052 stfd ft0,(LA_WORD_SIZE+5+42)*4(r1)
1053 stfd ft1,(LA_WORD_SIZE+5+44)*4(r1)
1054 stfd ft2,(LA_WORD_SIZE+5+46)*4(r1)
1055 stfd ft3,(LA_WORD_SIZE+5+48)*4(r1)
1056 stfd ft4,(LA_WORD_SIZE+5+50)*4(r1)
1057 stfd ft5,(LA_WORD_SIZE+5+52)*4(r1)
1059 SAVE_ARGUMENT_REGISTERS(LA_WORD_SIZE+1) /* save 8 int/8 float arguments */
1060 SAVE_TEMPORARY_REGISTERS(LA_WORD_SIZE+1+24)
1063 stw itmp1,LA_SIZE+(5+54)*4(sp)
1064 stw itmp2,LA_SIZE+(5+55)*4(sp)
1065 stw pv,LA_SIZE+(5+56)*4(sp)
1067 addi a0,sp,LA_SIZE+(5+58)*4 /* pass SP of patcher stub */
1068 mr a1,pv /* pass PV */
1069 mr a2,r0 /* pass RA (correct for leafs) */
1071 stw v0,LA_SIZE+(5+57)*4(sp) /* save return value */
1073 #if defined(__DARWIN__)
1074 lwz a0,LA_SIZE+(5+0)*4(r1)
1075 lwz a1,LA_SIZE+(5+1)*4(r1)
1076 lwz a2,LA_SIZE+(5+2)*4(r1)
1077 lwz a3,LA_SIZE+(5+3)*4(r1)
1078 lwz a4,LA_SIZE+(5+4)*4(r1)
1079 lwz a5,LA_SIZE+(5+5)*4(r1)
1080 lwz a6,LA_SIZE+(5+6)*4(r1)
1081 lwz a7,LA_SIZE+(5+7)*4(r1)
1083 lfd fa0,LA_SIZE+(5+8)*4(sp)
1084 lfd fa1,LA_SIZE+(5+10)*4(sp)
1085 lfd fa2,LA_SIZE+(5+12)*4(sp)
1086 lfd fa3,LA_SIZE+(5+14)*4(sp)
1087 lfd fa4,LA_SIZE+(5+16)*4(sp)
1088 lfd fa5,LA_SIZE+(5+18)*4(sp)
1089 lfd fa6,LA_SIZE+(5+20)*4(sp)
1090 lfd fa7,LA_SIZE+(5+22)*4(sp)
1091 lfd fa8,LA_SIZE+(5+24)*4(sp)
1092 lfd fa9,LA_SIZE+(5+26)*4(sp)
1093 lfd fa10,LA_SIZE+(5+28)*4(sp)
1094 lfd fa11,LA_SIZE+(5+30)*4(sp)
1095 lfd fa12,LA_SIZE+(5+32)*4(sp)
1097 lwz t0,(LA_WORD_SIZE+5+33)*4(r1)
1098 lwz t1,(LA_WORD_SIZE+5+34)*4(r1)
1099 lwz t2,(LA_WORD_SIZE+5+35)*4(r1)
1100 lwz t3,(LA_WORD_SIZE+5+36)*4(r1)
1101 lwz t4,(LA_WORD_SIZE+5+37)*4(r1)
1102 lwz t5,(LA_WORD_SIZE+5+38)*4(r1)
1103 lwz t6,(LA_WORD_SIZE+5+39)*4(r1)
1104 lwz t7,(LA_WORD_SIZE+5+40)*4(r1)
1106 lfd ft0,(LA_WORD_SIZE+5+42)*4(r1)
1107 lfd ft1,(LA_WORD_SIZE+5+44)*4(r1)
1108 lfd ft2,(LA_WORD_SIZE+5+46)*4(r1)
1109 lfd ft3,(LA_WORD_SIZE+5+48)*4(r1)
1110 lfd ft4,(LA_WORD_SIZE+5+50)*4(r1)
1111 lfd ft5,(LA_WORD_SIZE+5+52)*4(r1)
1113 RESTORE_ARGUMENT_REGISTERS(LA_WORD_SIZE+1) /* restore 8 int/8 float args */
1114 RESTORE_TEMPORARY_REGISTERS(LA_WORD_SIZE+1+24)
1117 lwz itmp1,LA_SIZE+(5+54)*4(sp)
1118 lwz itmp2,LA_SIZE+(5+55)*4(sp)
1119 lwz pv,LA_SIZE+(5+56)*4(sp)
1120 lwz itmp3,LA_SIZE+(5+57)*4(sp) /* restore return value into temp reg.*/
1122 lwz r0,(6+LA_WORD_SIZE+5+58)*4(sp) /* restore RA */
1125 mr. itmp3,itmp3 /* check for an exception */
1126 bne L_asm_patcher_wrapper_exception
1128 /* get return address (into JIT code) */
1129 lwz itmp3,(5+LA_WORD_SIZE+5+58)*4(sp)
1131 /* remove stack frame + patcher stub stack */
1132 addi sp,sp,(8+LA_WORD_SIZE+5+58)*4
1135 bctr /* jump to new patched code */
1137 L_asm_patcher_wrapper_exception:
1138 mr xptr,itmp3 /* get exception */
1139 lwz xpc,(5+LA_WORD_SIZE+5+58)*4(sp)
1140 addi sp,sp,(8+LA_WORD_SIZE+5+58)*4
1141 b L_asm_handle_exception
1144 /* asm_replacement_out *********************************************************
1146 This code is jumped to from the replacement-out stubs that are executed
1147 when a thread reaches an activated replacement point.
1149 The purpose of asm_replacement_out is to read out the parts of the
1150 execution state that cannot be accessed from C code, store this state,
1151 and then call the C function replace_me.
1154 16 start of stack inside method to replace
1155 0 rplpoint * info on the replacement point that was reached
1157 NOTE: itmp3 has been clobbered by the replacement-out stub!
1159 *******************************************************************************/
1161 /* some room to accomodate changes of the stack frame size during replacement */
1162 /* XXX we should find a cleaner solution here */
1163 #define REPLACEMENT_ROOM 512
1165 asm_replacement_out:
1166 /* create stack frame */
1167 addi sp,sp,-(sizeexecutionstate + REPLACEMENT_ROOM) /* XXX align */
1169 /* save link register */
1172 /* save registers in execution state */
1173 stw r0 ,( 0*8+offes_intregs)(sp)
1174 stw r1 ,( 1*8+offes_intregs)(sp)
1175 stw r2 ,( 2*8+offes_intregs)(sp)
1176 stw r3 ,( 3*8+offes_intregs)(sp)
1177 stw r4 ,( 4*8+offes_intregs)(sp)
1178 stw r5 ,( 5*8+offes_intregs)(sp)
1179 stw r6 ,( 6*8+offes_intregs)(sp)
1180 stw r7 ,( 7*8+offes_intregs)(sp)
1181 stw r8 ,( 8*8+offes_intregs)(sp)
1182 stw r9 ,( 9*8+offes_intregs)(sp)
1183 stw r10,(10*8+offes_intregs)(sp)
1184 stw r11,(11*8+offes_intregs)(sp)
1185 stw r12,(12*8+offes_intregs)(sp)
1186 stw r13,(13*8+offes_intregs)(sp)
1187 stw r14,(14*8+offes_intregs)(sp)
1188 stw r15,(15*8+offes_intregs)(sp)
1189 stw r16,(16*8+offes_intregs)(sp) /* link register */
1190 stw r17,(17*8+offes_intregs)(sp)
1191 stw r18,(18*8+offes_intregs)(sp)
1192 stw r19,(19*8+offes_intregs)(sp)
1193 stw r20,(20*8+offes_intregs)(sp)
1194 stw r21,(21*8+offes_intregs)(sp)
1195 stw r22,(22*8+offes_intregs)(sp)
1196 stw r23,(23*8+offes_intregs)(sp)
1197 stw r24,(24*8+offes_intregs)(sp)
1198 stw r25,(25*8+offes_intregs)(sp)
1199 stw r26,(26*8+offes_intregs)(sp)
1200 stw r27,(27*8+offes_intregs)(sp)
1201 stw r28,(28*8+offes_intregs)(sp)
1202 stw r29,(29*8+offes_intregs)(sp)
1203 stw r30,(30*8+offes_intregs)(sp)
1204 stw r31,(31*8+offes_intregs)(sp)
1206 stfd fr0 ,( 0*8+offes_fltregs)(sp)
1207 stfd fr1 ,( 1*8+offes_fltregs)(sp)
1208 stfd fr2 ,( 2*8+offes_fltregs)(sp)
1209 stfd fr3 ,( 3*8+offes_fltregs)(sp)
1210 stfd fr4 ,( 4*8+offes_fltregs)(sp)
1211 stfd fr5 ,( 5*8+offes_fltregs)(sp)
1212 stfd fr6 ,( 6*8+offes_fltregs)(sp)
1213 stfd fr7 ,( 7*8+offes_fltregs)(sp)
1214 stfd fr8 ,( 8*8+offes_fltregs)(sp)
1215 stfd fr9 ,( 9*8+offes_fltregs)(sp)
1216 stfd fr10,(10*8+offes_fltregs)(sp)
1217 stfd fr11,(11*8+offes_fltregs)(sp)
1218 stfd fr12,(12*8+offes_fltregs)(sp)
1219 stfd fr13,(13*8+offes_fltregs)(sp)
1220 stfd fr14,(14*8+offes_fltregs)(sp)
1221 stfd fr15,(15*8+offes_fltregs)(sp)
1222 stfd fr16,(16*8+offes_fltregs)(sp)
1223 stfd fr17,(17*8+offes_fltregs)(sp)
1224 stfd fr18,(18*8+offes_fltregs)(sp)
1225 stfd fr19,(19*8+offes_fltregs)(sp)
1226 stfd fr20,(20*8+offes_fltregs)(sp)
1227 stfd fr21,(21*8+offes_fltregs)(sp)
1228 stfd fr22,(22*8+offes_fltregs)(sp)
1229 stfd fr23,(23*8+offes_fltregs)(sp)
1230 stfd fr24,(24*8+offes_fltregs)(sp)
1231 stfd fr25,(25*8+offes_fltregs)(sp)
1232 stfd fr26,(26*8+offes_fltregs)(sp)
1233 stfd fr27,(27*8+offes_fltregs)(sp)
1234 stfd fr28,(28*8+offes_fltregs)(sp)
1235 stfd fr29,(29*8+offes_fltregs)(sp)
1236 stfd fr30,(30*8+offes_fltregs)(sp)
1237 stfd fr31,(31*8+offes_fltregs)(sp)
1239 /* calculate sp of method */
1240 addi itmp1,sp,(sizeexecutionstate + REPLACEMENT_ROOM + 4*4)
1241 stw itmp1,(offes_sp)(sp)
1244 stw pv,(offes_pv)(sp)
1246 /* call replace_me */
1247 lwz a0,-(4*4)(itmp1) /* arg0: rplpoint * */
1248 mr a1,sp /* arg1: execution state */
1249 addi sp,sp,-(LA_SIZE_ALIGNED)
1250 b replace_me /* call C function replace_me */
1252 /* asm_replacement_in **********************************************************
1254 This code writes the given execution state and jumps to the replacement
1257 This function never returns!
1259 NOTE: itmp3 is not restored!
1262 void asm_replacement_in(executionstate *es);
1264 *******************************************************************************/
1266 .asm_replacement_in:
1267 /* a0 == executionstate *es */
1269 /* set new sp and pv */
1270 lwz sp,(offes_sp)(a0)
1271 lwz pv,(offes_pv)(a0)
1273 /* copy registers from execution state */
1274 lwz r0 ,( 0*8+offes_intregs)(a0)
1276 /* r2 is reserved */
1277 /* a0 is loaded below */
1278 lwz r4 ,( 4*8+offes_intregs)(a0)
1279 lwz r5 ,( 5*8+offes_intregs)(a0)
1280 lwz r6 ,( 6*8+offes_intregs)(a0)
1281 lwz r7 ,( 7*8+offes_intregs)(a0)
1282 lwz r8 ,( 8*8+offes_intregs)(a0)
1283 lwz r9 ,( 9*8+offes_intregs)(a0)
1284 lwz r10,(10*8+offes_intregs)(a0)
1285 lwz r11,(11*8+offes_intregs)(a0)
1286 lwz r12,(12*8+offes_intregs)(a0)
1288 lwz r14,(14*8+offes_intregs)(a0)
1289 lwz r15,(15*8+offes_intregs)(a0)
1290 lwz r16,(16*8+offes_intregs)(a0) /* link register */
1291 lwz r17,(17*8+offes_intregs)(a0)
1292 lwz r18,(18*8+offes_intregs)(a0)
1293 lwz r19,(19*8+offes_intregs)(a0)
1294 lwz r20,(20*8+offes_intregs)(a0)
1295 lwz r21,(21*8+offes_intregs)(a0)
1296 lwz r22,(22*8+offes_intregs)(a0)
1297 lwz r23,(23*8+offes_intregs)(a0)
1298 lwz r24,(24*8+offes_intregs)(a0)
1299 lwz r25,(25*8+offes_intregs)(a0)
1300 lwz r26,(26*8+offes_intregs)(a0)
1301 lwz r27,(27*8+offes_intregs)(a0)
1302 lwz r28,(28*8+offes_intregs)(a0)
1303 lwz r29,(29*8+offes_intregs)(a0)
1304 lwz r30,(30*8+offes_intregs)(a0)
1305 lwz r31,(31*8+offes_intregs)(a0)
1307 lfd fr0 ,( 0*8+offes_fltregs)(a0)
1308 lfd fr1 ,( 1*8+offes_fltregs)(a0)
1309 lfd fr2 ,( 2*8+offes_fltregs)(a0)
1310 lfd fr3 ,( 3*8+offes_fltregs)(a0)
1311 lfd fr4 ,( 4*8+offes_fltregs)(a0)
1312 lfd fr5 ,( 5*8+offes_fltregs)(a0)
1313 lfd fr6 ,( 6*8+offes_fltregs)(a0)
1314 lfd fr7 ,( 7*8+offes_fltregs)(a0)
1315 lfd fr8 ,( 8*8+offes_fltregs)(a0)
1316 lfd fr9 ,( 9*8+offes_fltregs)(a0)
1317 lfd fr10,(10*8+offes_fltregs)(a0)
1318 lfd fr11,(11*8+offes_fltregs)(a0)
1319 lfd fr12,(12*8+offes_fltregs)(a0)
1320 lfd fr13,(13*8+offes_fltregs)(a0)
1321 lfd fr14,(14*8+offes_fltregs)(a0)
1322 lfd fr15,(15*8+offes_fltregs)(a0)
1323 lfd fr16,(16*8+offes_fltregs)(a0)
1324 lfd fr17,(17*8+offes_fltregs)(a0)
1325 lfd fr18,(18*8+offes_fltregs)(a0)
1326 lfd fr19,(19*8+offes_fltregs)(a0)
1327 lfd fr20,(20*8+offes_fltregs)(a0)
1328 lfd fr21,(21*8+offes_fltregs)(a0)
1329 lfd fr22,(22*8+offes_fltregs)(a0)
1330 lfd fr23,(23*8+offes_fltregs)(a0)
1331 lfd fr24,(24*8+offes_fltregs)(a0)
1332 lfd fr25,(25*8+offes_fltregs)(a0)
1333 lfd fr26,(26*8+offes_fltregs)(a0)
1334 lfd fr27,(27*8+offes_fltregs)(a0)
1335 lfd fr28,(28*8+offes_fltregs)(a0)
1336 lfd fr29,(29*8+offes_fltregs)(a0)
1337 lfd fr30,(30*8+offes_fltregs)(a0)
1338 lfd fr31,(31*8+offes_fltregs)(a0)
1340 /* restore link register */
1346 lwz itmp3,offes_pc(a0)
1350 lwz a0,(3*8+offes_intregs)(a0)
1352 /* jump to new code */
1357 /*********************************************************************/
1360 .quad .asm_cacheflush,.TOC.@tocbase,0
1362 .size asm_cacheflush,24
1363 .type .asm_cacheflush,@function
1364 .globl .asm_cacheflush
1392 asm_getclassvalues_atomic:
1393 .globl .asm_getclassvalues_atomic
1396 lwz r6,offbaseval(r3)
1397 lwz r7,offdiffval(r3)
1398 lwz r8,offbaseval(r4)
1400 stw r6,offcast_super_baseval(r5)
1401 stw r7,offcast_super_diffval(r5)
1402 stw r8,offcast_sub_baseval(r5)
1407 asm_criticalsections:
1408 #if defined(ENABLE_THREADS)
1416 #if defined(__DARWIN__)
1418 .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32
1420 L_builtin_throw_exception$stub:
1421 .indirect_symbol _builtin_throw_exception
1423 bcl 20,31,L00$_builtin_throw_exception
1424 L00$_builtin_throw_exception:
1426 addis r11,r11,ha16(L_builtin_throw_exception$lazy_ptr - L00$_builtin_throw_exception)
1428 lwzu r12,lo16(L_builtin_throw_exception$lazy_ptr - L00$_builtin_throw_exception)(r11)
1432 .lazy_symbol_pointer
1433 L_builtin_throw_exception$lazy_ptr:
1434 .indirect_symbol _builtin_throw_exception
1435 .long dyld_stub_binding_helper
1438 .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32
1440 L_exceptions_handle_exception$stub:
1441 .indirect_symbol _exceptions_handle_exception
1443 bcl 20,31,L00$_exceptions_handle_exception
1444 L00$_exceptions_handle_exception:
1446 addis r11,r11,ha16(L_exceptions_handle_exception$lazy_ptr - L00$_exceptions_handle_exception)
1448 lwzu r12,lo16(L_exceptions_handle_exception$lazy_ptr - L00$_exceptions_handle_exception)(r11)
1452 .lazy_symbol_pointer
1453 L_exceptions_handle_exception$lazy_ptr:
1454 .indirect_symbol _exceptions_handle_exception
1455 .long dyld_stub_binding_helper
1458 .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32
1460 L_stacktrace_create_extern_stackframeinfo$stub:
1461 .indirect_symbol _stacktrace_create_extern_stackframeinfo
1463 bcl 20,31,L00$_stacktrace_create_extern_stackframeinfo
1464 L00$_stacktrace_create_extern_stackframeinfo:
1466 addis r11,r11,ha16(L_stacktrace_create_extern_stackframeinfo$lazy_ptr - L00$_stacktrace_create_extern_stackframeinfo)
1468 lwzu r12,lo16(L_stacktrace_create_extern_stackframeinfo$lazy_ptr - L00$_stacktrace_create_extern_stackframeinfo)(r11)
1472 .lazy_symbol_pointer
1473 L_stacktrace_create_extern_stackframeinfo$lazy_ptr:
1474 .indirect_symbol _stacktrace_create_extern_stackframeinfo
1475 .long dyld_stub_binding_helper
1478 .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32
1480 L_jit_asm_compile$stub:
1481 .indirect_symbol _jit_asm_compile
1483 bcl 20,31,L00$_jit_asm_compile
1484 L00$_jit_asm_compile:
1486 addis r11,r11,ha16(L_jit_asm_compile$lazy_ptr - L00$_jit_asm_compile)
1488 lwzu r12,lo16(L_jit_asm_compile$lazy_ptr - L00$_jit_asm_compile)(r11)
1492 .lazy_symbol_pointer
1493 L_jit_asm_compile$lazy_ptr:
1494 .indirect_symbol _jit_asm_compile
1495 .long dyld_stub_binding_helper
1498 .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32
1500 L_stacktrace_remove_stackframeinfo$stub:
1501 .indirect_symbol _stacktrace_remove_stackframeinfo
1503 bcl 20,31,L00$_stacktrace_remove_stackframeinfo
1504 L00$_stacktrace_remove_stackframeinfo:
1506 addis r11,r11,ha16(L_stacktrace_remove_stackframeinfo$lazy_ptr - L00$_stacktrace_remove_stackframeinfo)
1508 lwzu r12,lo16(L_stacktrace_remove_stackframeinfo$lazy_ptr - L00$_stacktrace_remove_stackframeinfo)(r11)
1512 .lazy_symbol_pointer
1513 L_stacktrace_remove_stackframeinfo$lazy_ptr:
1514 .indirect_symbol _stacktrace_remove_stackframeinfo
1515 .long dyld_stub_binding_helper
1518 .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32
1520 L_exceptions_get_and_clear_exception$stub:
1521 .indirect_symbol _exceptions_get_and_clear_exception
1523 bcl 20,31,L00$_exceptions_get_and_clear_exception
1524 L00$_exceptions_get_and_clear_exception:
1526 addis r11,r11,ha16(L_exceptions_get_and_clear_exception$lazy_ptr - L00$_exceptions_get_and_clear_exception)
1528 lwzu r12,lo16(L_exceptions_get_and_clear_exception$lazy_ptr - L00$_exceptions_get_and_clear_exception)(r11)
1532 .lazy_symbol_pointer
1533 L_exceptions_get_and_clear_exception$lazy_ptr:
1534 .indirect_symbol _exceptions_get_and_clear_exception
1535 .long dyld_stub_binding_helper
1538 .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32
1540 L_exceptions_asm_new_abstractmethoderror$stub:
1541 .indirect_symbol _exceptions_asm_new_abstractmethoderror
1543 bcl 20,31,L00$_exceptions_asm_new_abstractmethoderror
1544 L00$_exceptions_asm_new_abstractmethoderror:
1546 addis r11,r11,ha16(L_exceptions_asm_new_abstractmethoderror$lazy_ptr - L00$_exceptions_asm_new_abstractmethoderror)
1548 lwzu r12,lo16(L_exceptions_asm_new_abstractmethoderror$lazy_ptr - L00$_exceptions_asm_new_abstractmethoderror)(r11)
1552 .lazy_symbol_pointer
1553 L_exceptions_asm_new_abstractmethoderror$lazy_ptr:
1554 .indirect_symbol _exceptions_asm_new_abstractmethoderror
1555 .long dyld_stub_binding_helper
1558 .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32
1560 L_patcher_wrapper$stub:
1561 .indirect_symbol _patcher_wrapper
1563 bcl 20,31,L00$_patcher_wrapper
1564 L00$_patcher_wrapper:
1566 addis r11,r11,ha16(L_patcher_wrapper$lazy_ptr - L00$_patcher_wrapper)
1568 lwzu r12,lo16(L_patcher_wrapper$lazy_ptr - L00$_patcher_wrapper)(r11)
1572 .lazy_symbol_pointer
1573 L_patcher_wrapper$lazy_ptr:
1574 .indirect_symbol _patcher_wrapper
1575 .long dyld_stub_binding_helper
1578 .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32
1581 .indirect_symbol _replace_me
1583 bcl 20,31,L00$_replace_me
1586 addis r11,r11,ha16(L_replace_me$lazy_ptr - L00$_replace_me)
1588 lwzu r12,lo16(L_replace_me$lazy_ptr - L00$_replace_me)(r11)
1592 .lazy_symbol_pointer
1593 L_replace_me$lazy_ptr:
1594 .indirect_symbol _replace_me
1595 .long dyld_stub_binding_helper
1597 #endif /* defined(__DARWIN__) */
1600 /* Disable exec-stacks, required for Gentoo ***********************************/
1602 #if defined(__GCC__) && defined(__ELF__)
1603 .section .note.GNU-stack,"",@progbits
1608 * These are local overrides for various environment variables in Emacs.
1609 * Please do not remove this and leave it at the end of the file, where
1610 * Emacs will automagically detect them.
1611 * ---------------------------------------------------------------------
1614 * indent-tabs-mode: t
1618 * vim:noexpandtab:sw=4:ts=4: