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 5230 2006-08-10 19:45:28Z 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 asm_vm_call_method_int:
116 asm_vm_call_method_long:
117 asm_vm_call_method_float:
118 asm_vm_call_method_double:
119 .quad .asm_vm_call_method,.TOC.@tocbase,0
121 .size asm_vm_call_method, 24
122 .type .asm_vm_call_method,@function
123 .globl .asm_vm_call_method
127 std r0,LA_LR_OFFSET(sp)
130 std s0,8*8(sp) /* save used callee saved registers */
131 std a0,9*8(sp) /* save method pointer for compiler */
133 #if defined(__DARWIN__)
134 std itmp1,10*8(sp) /* register r11 is callee saved */
136 std pv,11*8(sp) /* save PV register */
138 std itmp3,12*8(sp) /* registers r14-r31 are callee saved */
139 stfd ftmp1,13*8(sp) /* registers f14-f31 are callee saved */
142 #if defined(__DARWIN__)
158 SAVE_TEMPORARY_REGISTERS(15) /* 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@highest /* load 64bit address */
206 ori itmp3,itmp3,L_jumptable_int@higher
207 rldicr itmp3,itmp3,32,31
208 oris itmp3,itmp3,L_jumptable_int@h
209 ori itmp3,itmp3,L_jumptable_int@l
212 slwi t2,t6,2 /* multiple of 4-bytes */
213 add itmp3,itmp3,t2 /* calculate address of jumptable */
214 ld itmp3,0(itmp3) /* load function address */
216 addi t0,t0,1 /* integer argument counter */
217 addi t6,t6,1 /* integer argument register counter */
218 #if defined(__DARWIN__)
219 addi t7,t7,1 /* stack slot counter */
223 L_register_handle_long:
224 #if defined(__DARWIN__)
225 addis itmp3,t3,ha16(L_jumptable_long - L_asm_vm_call_method_get_pc)
226 la itmp3,lo16(L_jumptable_long - L_asm_vm_call_method_get_pc)(itmp3)
228 lis itmp3,L_jumptable_long@ha
229 addi itmp3,itmp3,L_jumptable_long@l
231 #if !defined(__DARWIN__)
232 addi t6,t6,1 /* align to even numbers */
236 cmpwi t6,(INT_ARG_CNT - 1) /* are we out of integer argument */
237 blt L_register_handle_long_continue /* registers? */
239 li t6,INT_ARG_CNT /* yes, set integer argument register */
240 b L_register_copy /* count to max and next loop */
242 L_register_handle_long_continue:
243 slwi t2,t6,2 /* multiple of 4-bytes */
244 add itmp3,itmp3,t2 /* calculate address of jumptable */
245 lwz itmp3,0(itmp3) /* load function address */
247 addi t0,t0,1 /* integer argument counter */
248 addi t6,t6,2 /* integer argument register counter */
249 #if defined(__DARWIN__)
250 addi t7,t7,2 /* stack slot counter */
254 L_register_handle_float:
255 cmpwi t1,FLT_ARG_CNT /* are we out of float argument */
256 beq L_register_copy /* registers? yes, next loop */
258 andi. r0,itmp3,0x0001 /* is this a 2-word type? */
259 bne L_register_handle_double
261 #if defined(__DARWIN__)
262 addis itmp3,t3,ha16(L_jumptable_float - L_asm_vm_call_method_get_pc)
263 la itmp3,lo16(L_jumptable_float - L_asm_vm_call_method_get_pc)(itmp3)
265 lis itmp3,L_jumptable_float@ha
266 addi itmp3,itmp3,L_jumptable_float@l
269 slwi t2,t1,2 /* multiple of 4-bytes */
270 add itmp3,itmp3,t2 /* calculate address of jumptable */
271 lwz itmp3,0(itmp3) /* load function address */
273 addi t1,t1,1 /* float argument counter */
274 #if defined(__DARWIN__)
275 addi t7,t7,1 /* stack slot counter */
276 addi t6,t6,1 /* skip 1 integer argument register */
280 L_register_handle_double:
281 #if defined(__DARWIN__)
282 addis itmp3,t3,ha16(L_jumptable_double - L_asm_vm_call_method_get_pc)
283 la itmp3,lo16(L_jumptable_double - L_asm_vm_call_method_get_pc)(itmp3)
285 lis itmp3,L_jumptable_double@ha
286 addi itmp3,itmp3,L_jumptable_double@l
289 slwi t2,t1,2 /* multiple of 4-bytes */
290 add itmp3,itmp3,t2 /* calculate address of jumptable */
291 lwz itmp3,0(itmp3) /* load function address */
293 addi t1,t1,1 /* float argument counter */
294 #if defined(__DARWIN__)
295 addi t7,t7,2 /* stack slot counter */
296 addi t6,t6,2 /* skip 2 integer argument registers */
300 L_register_copy_done:
301 /* calculate remaining arguments */
302 sub itmp3,t4,t0 /* - integer arguments in registers */
303 sub itmp3,itmp3,t1 /* - float arguments in registers */
305 beq L_stack_copy_done
307 mr itmp2,t4 /* restore argument count */
308 mr itmp1,t5 /* restore argument block pointer */
310 slwi t4,itmp3,3 /* XXX use 8-bytes slots for now */
311 addi t4,t4,LA_SIZE /* add size of linkage area */
313 #if defined(__DARWIN__)
314 slwi t5,t7,2 /* add stack space for arguments */
320 mr t6,sp /* use t6 as temporary sp */
321 addi t6,t6,LA_SIZE /* skip linkage area */
322 #if defined(__DARWIN__)
323 add t6,t6,t5 /* skip stack space for arguments */
326 addi itmp1,itmp1,-sizevmarg /* initialize pointer (smaller code) */
327 addi itmp2,itmp2,1 /* initialize argument count */
330 addi itmp1,itmp1,sizevmarg /* goto next argument block */
331 addi itmp2,itmp2,-1 /* argument count - 1 */
333 beq L_stack_copy_done
335 lwz itmp3,offvmargtype+4(itmp1)
336 andi. r0,itmp3,0x0002 /* is this a float/double type? */
337 bne L_stack_handle_float
340 addi t0,t0,-1 /* arguments assigned to registers */
342 bge L_stack_copy_loop
344 andi. r0,itmp3,0x0001 /* is this a 2-word type? */
345 bne L_stack_handle_long
347 lwz itmp3,offvmargdata+4(itmp1) /* get integer argument */
348 stw itmp3,0(t6) /* and store it on the stack */
349 addi t6,t6,4 /* increase temporary sp by 1 slot */
353 #if !defined(__DARWIN__)
354 addi t6,t6,4 /* align stack to 8-bytes */
355 rlwinm t6,t6,0,30,28 /* clear lower 4-bits */
358 lwz itmp3,offvmargdata+0(itmp1) /* get long argument */
359 stw itmp3,0(t6) /* and store it on the stack */
360 lwz itmp3,offvmargdata+4(itmp1)
362 addi t6,t6,8 /* increase temporary sp by 2 slots */
365 L_stack_handle_float:
366 addi t1,t1,-1 /* arguments assigned to registers */
368 bge L_stack_copy_loop
370 andi. r0,itmp3,0x0001 /* is this a 2-word type? */
371 bne L_stack_handle_double
373 lfs ftmp3,offvmargdata(itmp1) /* get float argument */
374 stfs ftmp3,0(t6) /* and store it on the stack */
375 addi t6,t6,4 /* increase temporary sp by 1 slot */
378 L_stack_handle_double:
379 #if !defined(__DARWIN__)
380 addi t6,t6,4 /* align stack to 8-bytes */
381 rlwinm t6,t6,0,30,28 /* clear lower 4-bits */
384 lfd ftmp3,offvmargdata(itmp1) /* get double argument */
385 stfd ftmp3,0(t6) /* and store it on the stack */
386 addi t6,t6,8 /* increase temporary sp by 2 slots */
390 ld itmp1,9*8(s0) /* pass method pointer via tmp1 */
392 #if defined(__DARWIN__)
393 addis mptr,t3,ha16(L_asm_call_jit_compiler - L_asm_vm_call_method_get_pc)
394 la mptr,lo16(L_asm_call_jit_compiler - L_asm_vm_call_method_get_pc)(mptr)
396 lis mptr,L_asm_call_jit_compiler@highest /* load 64bit address */
397 ori mptr,mptr,L_asm_call_jit_compiler@higher
398 rldicr mptr,mptr,32,31
399 oris mptr,mptr,L_asm_call_jit_compiler@h
400 ori mptr,mptr,L_asm_call_jit_compiler@l
410 #if defined(__DARWIN__)
411 addi pv,itmp1,lo16(.asm_vm_call_method - 1b)
413 addi pv,itmp1,(.asm_vm_call_method - 1b)@l
416 L_asm_vm_call_method_return:
417 mr sp,s0 /* restore the function's sp */
419 lwz s0,8*4(sp) /* restore used callee saved registers */
421 #if defined(__DARWIN__)
422 lwz itmp1,10*4(sp) /* register r11 is callee saved */
424 lwz pv,11*4(sp) /* save PV register */
427 lfd ftmp1,14*4(sp) /* registers f14-f31 are callee saved */
430 #if defined(__DARWIN__)
446 RESTORE_TEMPORARY_REGISTERS(18) /* the offset has to be even */
449 lwz r0,40*4+LA_LR_OFFSET(r1)
454 asm_vm_call_method_exception_handler:
456 bl builtin_throw_exception
457 b L_asm_vm_call_method_return
477 lwz a0,offvmargdata+4(itmp1)
480 lwz a1,offvmargdata+4(itmp1)
483 lwz a2,offvmargdata+4(itmp1)
486 lwz a3,offvmargdata+4(itmp1)
489 lwz a4,offvmargdata+4(itmp1)
492 lwz a5,offvmargdata+4(itmp1)
495 lwz a6,offvmargdata+4(itmp1)
498 lwz a7,offvmargdata+4(itmp1)
506 #if defined(__DARWIN__)
515 /* we have two entries here, so we get the even argument register
516 alignment for linux */
531 lwz a0,offvmargdata+0(itmp1)
532 lwz a1,offvmargdata+4(itmp1)
534 #if defined(__DARWIN__)
536 lwz a1,offvmargdata+0(itmp1)
537 lwz a2,offvmargdata+4(itmp1)
541 lwz a2,offvmargdata+0(itmp1)
542 lwz a3,offvmargdata+4(itmp1)
544 #if defined(__DARWIN__)
546 lwz a3,offvmargdata+0(itmp1)
547 lwz a4,offvmargdata+4(itmp1)
551 lwz a4,offvmargdata+0(itmp1)
552 lwz a5,offvmargdata+4(itmp1)
554 #if defined(__DARWIN__)
556 lwz a5,offvmargdata+0(itmp1)
557 lwz a6,offvmargdata+4(itmp1)
561 lwz a6,offvmargdata+0(itmp1)
562 lwz a7,offvmargdata+4(itmp1)
579 #if defined(__DARWIN__)
591 lfs fa0,offvmargdata(itmp1)
594 lfs fa1,offvmargdata(itmp1)
597 lfs fa2,offvmargdata(itmp1)
600 lfs fa3,offvmargdata(itmp1)
603 lfs fa4,offvmargdata(itmp1)
606 lfs fa5,offvmargdata(itmp1)
609 lfs fa6,offvmargdata(itmp1)
612 lfs fa7,offvmargdata(itmp1)
615 #if defined(__DARWIN__)
617 lfs fa8,offvmargdata(itmp1)
620 lfs fa9,offvmargdata(itmp1)
623 lfs fa10,offvmargdata(itmp1)
626 lfs fa11,offvmargdata(itmp1)
629 lfs fa12,offvmargdata(itmp1)
647 #if defined(__DARWIN__)
659 lfd fa0,offvmargdata(itmp1)
662 lfd fa1,offvmargdata(itmp1)
665 lfd fa2,offvmargdata(itmp1)
668 lfd fa3,offvmargdata(itmp1)
671 lfd fa4,offvmargdata(itmp1)
674 lfd fa5,offvmargdata(itmp1)
677 lfd fa6,offvmargdata(itmp1)
680 lfd fa7,offvmargdata(itmp1)
683 #if defined(__DARWIN__)
685 lfd fa8,offvmargdata(itmp1)
688 lfd fa9,offvmargdata(itmp1)
691 lfd fa10,offvmargdata(itmp1)
694 lfd fa11,offvmargdata(itmp1)
697 lfd fa12,offvmargdata(itmp1)
702 /* asm_call_jit_compiler *******************************************************
704 Invokes the compiler for untranslated JavaVM methods.
706 *******************************************************************************/
708 asm_call_jit_compiler:
709 L_asm_call_jit_compiler: /* required for PIC code */
711 std r0,LA_LR_OFFSET(r1) /* save return address */
712 stdu r1,-(LA_SIZE + 5*8 + INT_ARG_CNT*8 + FLT_ARG_CNT*8)(r1)
714 #if defined(__DARWIN__)
715 stw a0,(LA_WORD_SIZE+5+0)*4(r1)
716 stw a1,(LA_WORD_SIZE+5+1)*4(r1)
717 stw a2,(LA_WORD_SIZE+5+2)*4(r1)
718 stw a3,(LA_WORD_SIZE+5+3)*4(r1)
719 stw a4,(LA_WORD_SIZE+5+4)*4(r1)
720 stw a5,(LA_WORD_SIZE+5+5)*4(r1)
721 stw a6,(LA_WORD_SIZE+5+6)*4(r1)
722 stw a7,(LA_WORD_SIZE+5+7)*4(r1)
724 stfd fa0,(LA_WORD_SIZE+5+8)*4(r1)
725 stfd fa1,(LA_WORD_SIZE+5+10)*4(r1)
726 stfd fa2,(LA_WORD_SIZE+5+12)*4(r1)
727 stfd fa3,(LA_WORD_SIZE+5+14)*4(r1)
728 stfd fa4,(LA_WORD_SIZE+5+16)*4(r1)
729 stfd fa5,(LA_WORD_SIZE+5+18)*4(r1)
730 stfd fa6,(LA_WORD_SIZE+5+20)*4(r1)
731 stfd fa7,(LA_WORD_SIZE+5+22)*4(r1)
732 stfd fa8,(LA_WORD_SIZE+5+24)*4(r1)
733 stfd fa9,(LA_WORD_SIZE+5+26)*4(r1)
734 stfd fa10,(LA_WORD_SIZE+5+28)*4(r1)
735 stfd fa11,(LA_WORD_SIZE+5+30)*4(r1)
736 stfd fa12,(LA_WORD_SIZE+5+32)*4(r1)
738 SAVE_ARGUMENT_REGISTERS(LA_WORD_SIZE+1)
743 addi a2,sp,(LA_SIZE + 5*8 + INT_ARG_CNT*8 + FLT_ARG_CNT*8)
744 ld a3,(LA_SIZE + 5*8 + INT_ARG_CNT*8 + FLT_ARG_CNT*8)+LA_LR_OFFSET(sp)
746 ori r0,r0,0 /* nop needed after jump to function desc. */
747 mr pv,v0 /* move address to pv register */
749 #if defined(__DARWIN__)
750 lwz a0,(LA_WORD_SIZE+5+0)*4(r1)
751 lwz a1,(LA_WORD_SIZE+5+1)*4(r1)
752 lwz a2,(LA_WORD_SIZE+5+2)*4(r1)
753 lwz a3,(LA_WORD_SIZE+5+3)*4(r1)
754 lwz a4,(LA_WORD_SIZE+5+4)*4(r1)
755 lwz a5,(LA_WORD_SIZE+5+5)*4(r1)
756 lwz a6,(LA_WORD_SIZE+5+6)*4(r1)
757 lwz a7,(LA_WORD_SIZE+5+7)*4(r1)
759 lfd fa0,(LA_WORD_SIZE+5+8)*4(r1)
760 lfd fa1,(LA_WORD_SIZE+5+10)*4(r1)
761 lfd fa2,(LA_WORD_SIZE+5+12)*4(r1)
762 lfd fa3,(LA_WORD_SIZE+5+14)*4(r1)
763 lfd fa4,(LA_WORD_SIZE+5+16)*4(r1)
764 lfd fa5,(LA_WORD_SIZE+5+18)*4(r1)
765 lfd fa6,(LA_WORD_SIZE+5+20)*4(r1)
766 lfd fa7,(LA_WORD_SIZE+5+22)*4(r1)
767 lfd fa8,(LA_WORD_SIZE+5+24)*4(r1)
768 lfd fa9,(LA_WORD_SIZE+5+26)*4(r1)
769 lfd fa10,(LA_WORD_SIZE+5+28)*4(r1)
770 lfd fa11,(LA_WORD_SIZE+5+30)*4(r1)
771 lfd fa12,(LA_WORD_SIZE+5+32)*4(r1)
773 RESTORE_ARGUMENT_REGISTERS(LA_WORD_SIZE+1)
776 ld itmp1,(LA_SIZE + 5*8 + INT_ARG_CNT*8 + FLT_ARG_CNT*8)+LA_LR_OFFSET(r1)
779 addi sp,sp,(LA_SIZE + 5*8 + INT_ARG_CNT*8 + FLT_ARG_CNT*8)
781 mr. pv,pv /* test for exception */
782 beq L_asm_call_jit_compiler_exception
784 mtctr pv /* move method address to control reg */
785 bctr /* and call the Java method */
787 L_asm_call_jit_compiler_exception:
789 stw r0,LA_LR_OFFSET(sp)
790 stwu sp,-LA_SIZE_ALIGNED(sp) /* preserve linkage area */
791 bl exceptions_get_and_clear_exception
792 lwz xpc,LA_SIZE_ALIGNED+LA_LR_OFFSET(sp)
794 addi sp,sp,LA_SIZE_ALIGNED
796 mr xptr,v0 /* get exception */
797 addi xpc,xpc,-4 /* exception address is ra - 4 */
798 b L_asm_handle_nat_exception
801 /********************* function asm_handle_exception ***************************
803 * This function handles an exception. It does not use the usual calling *
804 * conventions. The exception pointer is passed in REG_ITMP1 and the *
805 * pc from the exception raising position is passed in REG_ITMP2. It searches *
806 * the local exception table for a handler. If no one is found, it unwinds *
807 * stacks and continues searching the callers. *
809 * void asm_handle_exception (exceptionptr, exceptionpc); *
811 *******************************************************************************/
813 asm_handle_nat_exception:
814 L_asm_handle_nat_exception: /* required for PIC code */
822 bne L_asm_handle_exception
827 asm_handle_exception:
828 L_asm_handle_exception: /* required for PIC code */
829 addi sp,sp,-(ARG_CNT+TMP_CNT)*8 /* create maybe-leaf stackframe */
831 #if defined(__DARWIN__)
833 SAVE_ARGUMENT_REGISTERS(0) /* we save arg and temp registers in */
834 SAVE_TEMPORARY_REGISTERS(ARG_CNT) /* case this is a leaf method */
837 li a3,(ARG_CNT+TMP_CNT)*8 /* prepare a3 for handle_exception */
838 li a4,1 /* set maybe-leaf flag */
840 L_asm_handle_exception_stack_loop:
841 addi sp,sp,-(LA_WORD_SIZE+4+5)*4 /* allocate stack */
842 stw xptr,LA_SIZE+4*4(sp) /* save exception pointer */
843 stw xpc,LA_SIZE+5*4(sp) /* save exception pc */
844 stw pv,LA_SIZE+6*4(sp) /* save data segment pointer */
845 mflr r0 /* save return address */
846 stw r0,LA_SIZE+5*4(sp)
847 add a3,a3,sp /* calculate Java sp into a3... */
848 addi a3,a3,(LA_WORD_SIZE+4+5)*4
849 stw a4,LA_SIZE+8*4(sp) /* save maybe-leaf flag */
851 mr a0,xptr /* pass exception pointer */
852 mr a1,xpc /* pass exception pc */
853 mr a2,pv /* pass data segment pointer */
854 /* a3 is still set */
855 bl exceptions_handle_exception
858 beq L_asm_handle_exception_not_catched
860 mr xpc,v0 /* move handlerpc into xpc */
861 lwz xptr,LA_SIZE+4*4(sp) /* restore exception pointer */
862 lwz pv,LA_SIZE+6*4(sp) /* restore data segment pointer */
863 lwz r0,LA_SIZE+5*4(sp) /* restore return address */
865 lwz a4,LA_SIZE+8*4(sp) /* get maybe-leaf flag */
866 addi sp,sp,(LA_WORD_SIZE+4+5)*4 /* free stack frame */
869 beq L_asm_handle_exception_no_leaf
871 #if defined(__DARWIN__)
873 RESTORE_ARGUMENT_REGISTERS(0) /* if this is a leaf method, we have */
874 RESTORE_TEMPORARY_REGISTERS(ARG_CNT)/* to restore arg and temp registers */
877 addi sp,sp,(ARG_CNT+TMP_CNT)*8 /* remove maybe-leaf stackframe */
879 L_asm_handle_exception_no_leaf:
880 mtctr xpc /* jump to the handler */
883 L_asm_handle_exception_not_catched:
884 lwz xptr,LA_SIZE+4*4(sp) /* restore exception pointer */
885 lwz pv,LA_SIZE+6*4(sp) /* restore data segment pointer */
886 lwz r0,LA_SIZE+5*4(sp) /* restore return address */
888 lwz a4,LA_SIZE+8*4(sp) /* get maybe-leaf flag */
889 addi sp,sp,(LA_WORD_SIZE+4+5)*4 /* free stack frame */
892 beq L_asm_handle_exception_no_leaf_stack
894 addi sp,sp,(ARG_CNT+TMP_CNT)*8 /* remove maybe-leaf stackframe */
895 li a4,0 /* clear the maybe-leaf flag */
897 L_asm_handle_exception_no_leaf_stack:
898 lwz t0,FrameSize(pv) /* get frame size */
899 add t0,sp,t0 /* pointer to save area */
901 lwz t1,IsLeaf(pv) /* is leaf procedure */
903 bne L_asm_handle_exception_no_ra_restore
905 lwz r0,LA_LR_OFFSET(t0) /* restore ra */
908 L_asm_handle_exception_no_ra_restore:
909 mflr xpc /* the new xpc is ra */
910 lwz t1,IntSave(pv) /* t1 = saved int register count */
913 mflr t2 /* t2 = current pc */
914 #if defined(__DARWIN__)
915 addi t2,t2,lo16(ex_int2-ex_int1)
917 addi t2,t2,(ex_int2-ex_int1)@l
919 slwi t1,t1,2 /* t1 = register count * 4 */
920 subf t2,t1,t2 /* t2 = IntSave - t1 */
933 /*lwz s9,-1*4(t0) XXX */
936 subf t0,t1,t0 /* t0 = t0 - register count * 4 */
942 #if defined(__DARWIN__)
943 addi t2,t2,lo16(ex_flt2-ex_flt1)
945 addi t2,t2,(ex_flt2-ex_flt1)@l
947 slwi t1,t1,2 /* t1 = register count * 4 */
948 subf t2,t1,t2 /* t2 = FltSave - t1 */
964 lwz t0,FrameSize(pv) /* get frame size */
965 add sp,sp,t0 /* unwind stack */
966 li a3,0 /* prepare a3 for handle_exception */
975 bne L_asm_handle_exception_stack_loop
980 b L_asm_handle_exception_stack_loop
983 /* asm_abstractmethoderror *****************************************************
985 Creates and throws an AbstractMethodError.
987 *******************************************************************************/
989 asm_abstractmethoderror:
991 stw r0,LA_LR_OFFSET(sp)
992 stwu sp,-LA_SIZE_ALIGNED(sp) /* preserve linkage area */
993 addi a0,sp,LA_SIZE_ALIGNED /* pass java sp */
994 mr a1,r0 /* pass exception address */
995 bl exceptions_asm_new_abstractmethoderror
996 lwz r0,LA_SIZE_ALIGNED+LA_LR_OFFSET(sp)
997 mtlr r0 /* restore return address */
998 addi sp,sp,LA_SIZE_ALIGNED
1000 mr xptr,v0 /* get exception pointer */
1001 mr xpc,r0 /* we can't use r0 directly in addi */
1002 addi xpc,xpc,-4 /* exception address is ra - 4 */
1003 b L_asm_handle_nat_exception
1006 /* asm_patcher_wrapper *********************************************************
1011 20 return address into JIT code (patch position)
1012 16 pointer to virtual java_objectheader
1013 12 machine code (which is patched back later)
1014 8 unresolved class/method/field reference
1015 4 data segment displacement from load instructions
1016 0 patcher function pointer to call (pv is saved here afterwards)
1018 *******************************************************************************/
1020 asm_patcher_wrapper:
1021 mflr r0 /* get Java return address (leaf) */
1022 stw r0,6*4(sp) /* store it in the stub stackframe */
1023 /* keep stack 16-bytes aligned: 6+1+37 = 44 */
1024 stwu sp,-(LA_SIZE+(5+58)*4)(sp)
1026 #if defined(__DARWIN__)
1027 stw a0,LA_SIZE+(5+0)*4(r1) /* save argument registers */
1028 stw a1,LA_SIZE+(5+1)*4(r1) /* preserve linkage area (24 bytes) */
1029 stw a2,LA_SIZE+(5+2)*4(r1) /* and 4 bytes for 4 argument */
1030 stw a3,LA_SIZE+(5+3)*4(r1)
1031 stw a4,LA_SIZE+(5+4)*4(r1)
1032 stw a5,LA_SIZE+(5+5)*4(r1)
1033 stw a6,LA_SIZE+(5+6)*4(r1)
1034 stw a7,LA_SIZE+(5+7)*4(r1)
1036 stfd fa0,LA_SIZE+(5+8)*4(sp)
1037 stfd fa1,LA_SIZE+(5+10)*4(sp)
1038 stfd fa2,LA_SIZE+(5+12)*4(sp)
1039 stfd fa3,LA_SIZE+(5+14)*4(sp)
1040 stfd fa4,LA_SIZE+(5+16)*4(sp)
1041 stfd fa5,LA_SIZE+(5+18)*4(sp)
1042 stfd fa6,LA_SIZE+(5+20)*4(sp)
1043 stfd fa7,LA_SIZE+(5+22)*4(sp)
1044 stfd fa8,LA_SIZE+(5+24)*4(sp)
1045 stfd fa9,LA_SIZE+(5+26)*4(sp)
1046 stfd fa10,LA_SIZE+(5+28)*4(sp)
1047 stfd fa11,LA_SIZE+(5+30)*4(sp)
1048 stfd fa12,LA_SIZE+(5+32)*4(sp)
1050 stw t0,(LA_WORD_SIZE+5+33)*4(r1)
1051 stw t1,(LA_WORD_SIZE+5+34)*4(r1)
1052 stw t2,(LA_WORD_SIZE+5+35)*4(r1)
1053 stw t3,(LA_WORD_SIZE+5+36)*4(r1)
1054 stw t4,(LA_WORD_SIZE+5+37)*4(r1)
1055 stw t5,(LA_WORD_SIZE+5+38)*4(r1)
1056 stw t6,(LA_WORD_SIZE+5+39)*4(r1)
1057 stw t7,(LA_WORD_SIZE+5+40)*4(r1)
1059 stfd ft0,(LA_WORD_SIZE+5+42)*4(r1)
1060 stfd ft1,(LA_WORD_SIZE+5+44)*4(r1)
1061 stfd ft2,(LA_WORD_SIZE+5+46)*4(r1)
1062 stfd ft3,(LA_WORD_SIZE+5+48)*4(r1)
1063 stfd ft4,(LA_WORD_SIZE+5+50)*4(r1)
1064 stfd ft5,(LA_WORD_SIZE+5+52)*4(r1)
1066 SAVE_ARGUMENT_REGISTERS(LA_WORD_SIZE+1) /* save 8 int/8 float arguments */
1067 SAVE_TEMPORARY_REGISTERS(LA_WORD_SIZE+1+24)
1070 stw itmp1,LA_SIZE+(5+54)*4(sp)
1071 stw itmp2,LA_SIZE+(5+55)*4(sp)
1072 stw pv,LA_SIZE+(5+56)*4(sp)
1074 addi a0,sp,LA_SIZE+(5+58)*4 /* pass SP of patcher stub */
1075 mr a1,pv /* pass PV */
1076 mr a2,r0 /* pass RA (correct for leafs) */
1078 stw v0,LA_SIZE+(5+57)*4(sp) /* save return value */
1080 #if defined(__DARWIN__)
1081 lwz a0,LA_SIZE+(5+0)*4(r1)
1082 lwz a1,LA_SIZE+(5+1)*4(r1)
1083 lwz a2,LA_SIZE+(5+2)*4(r1)
1084 lwz a3,LA_SIZE+(5+3)*4(r1)
1085 lwz a4,LA_SIZE+(5+4)*4(r1)
1086 lwz a5,LA_SIZE+(5+5)*4(r1)
1087 lwz a6,LA_SIZE+(5+6)*4(r1)
1088 lwz a7,LA_SIZE+(5+7)*4(r1)
1090 lfd fa0,LA_SIZE+(5+8)*4(sp)
1091 lfd fa1,LA_SIZE+(5+10)*4(sp)
1092 lfd fa2,LA_SIZE+(5+12)*4(sp)
1093 lfd fa3,LA_SIZE+(5+14)*4(sp)
1094 lfd fa4,LA_SIZE+(5+16)*4(sp)
1095 lfd fa5,LA_SIZE+(5+18)*4(sp)
1096 lfd fa6,LA_SIZE+(5+20)*4(sp)
1097 lfd fa7,LA_SIZE+(5+22)*4(sp)
1098 lfd fa8,LA_SIZE+(5+24)*4(sp)
1099 lfd fa9,LA_SIZE+(5+26)*4(sp)
1100 lfd fa10,LA_SIZE+(5+28)*4(sp)
1101 lfd fa11,LA_SIZE+(5+30)*4(sp)
1102 lfd fa12,LA_SIZE+(5+32)*4(sp)
1104 lwz t0,(LA_WORD_SIZE+5+33)*4(r1)
1105 lwz t1,(LA_WORD_SIZE+5+34)*4(r1)
1106 lwz t2,(LA_WORD_SIZE+5+35)*4(r1)
1107 lwz t3,(LA_WORD_SIZE+5+36)*4(r1)
1108 lwz t4,(LA_WORD_SIZE+5+37)*4(r1)
1109 lwz t5,(LA_WORD_SIZE+5+38)*4(r1)
1110 lwz t6,(LA_WORD_SIZE+5+39)*4(r1)
1111 lwz t7,(LA_WORD_SIZE+5+40)*4(r1)
1113 lfd ft0,(LA_WORD_SIZE+5+42)*4(r1)
1114 lfd ft1,(LA_WORD_SIZE+5+44)*4(r1)
1115 lfd ft2,(LA_WORD_SIZE+5+46)*4(r1)
1116 lfd ft3,(LA_WORD_SIZE+5+48)*4(r1)
1117 lfd ft4,(LA_WORD_SIZE+5+50)*4(r1)
1118 lfd ft5,(LA_WORD_SIZE+5+52)*4(r1)
1120 RESTORE_ARGUMENT_REGISTERS(LA_WORD_SIZE+1) /* restore 8 int/8 float args */
1121 RESTORE_TEMPORARY_REGISTERS(LA_WORD_SIZE+1+24)
1124 lwz itmp1,LA_SIZE+(5+54)*4(sp)
1125 lwz itmp2,LA_SIZE+(5+55)*4(sp)
1126 lwz pv,LA_SIZE+(5+56)*4(sp)
1127 lwz itmp3,LA_SIZE+(5+57)*4(sp) /* restore return value into temp reg.*/
1129 lwz r0,(6+LA_WORD_SIZE+5+58)*4(sp) /* restore RA */
1132 mr. itmp3,itmp3 /* check for an exception */
1133 bne L_asm_patcher_wrapper_exception
1135 /* get return address (into JIT code) */
1136 lwz itmp3,(5+LA_WORD_SIZE+5+58)*4(sp)
1138 /* remove stack frame + patcher stub stack */
1139 addi sp,sp,(8+LA_WORD_SIZE+5+58)*4
1142 bctr /* jump to new patched code */
1144 L_asm_patcher_wrapper_exception:
1145 mr xptr,itmp3 /* get exception */
1146 lwz xpc,(5+LA_WORD_SIZE+5+58)*4(sp)
1147 addi sp,sp,(8+LA_WORD_SIZE+5+58)*4
1148 b L_asm_handle_exception
1151 /* asm_replacement_out *********************************************************
1153 This code is jumped to from the replacement-out stubs that are executed
1154 when a thread reaches an activated replacement point.
1156 The purpose of asm_replacement_out is to read out the parts of the
1157 execution state that cannot be accessed from C code, store this state,
1158 and then call the C function replace_me.
1161 16 start of stack inside method to replace
1162 0 rplpoint * info on the replacement point that was reached
1164 NOTE: itmp3 has been clobbered by the replacement-out stub!
1166 *******************************************************************************/
1168 /* some room to accomodate changes of the stack frame size during replacement */
1169 /* XXX we should find a cleaner solution here */
1170 #define REPLACEMENT_ROOM 512
1172 asm_replacement_out:
1173 /* create stack frame */
1174 addi sp,sp,-(sizeexecutionstate + REPLACEMENT_ROOM) /* XXX align */
1176 /* save link register */
1179 /* save registers in execution state */
1180 stw r0 ,( 0*8+offes_intregs)(sp)
1181 stw r1 ,( 1*8+offes_intregs)(sp)
1182 stw r2 ,( 2*8+offes_intregs)(sp)
1183 stw r3 ,( 3*8+offes_intregs)(sp)
1184 stw r4 ,( 4*8+offes_intregs)(sp)
1185 stw r5 ,( 5*8+offes_intregs)(sp)
1186 stw r6 ,( 6*8+offes_intregs)(sp)
1187 stw r7 ,( 7*8+offes_intregs)(sp)
1188 stw r8 ,( 8*8+offes_intregs)(sp)
1189 stw r9 ,( 9*8+offes_intregs)(sp)
1190 stw r10,(10*8+offes_intregs)(sp)
1191 stw r11,(11*8+offes_intregs)(sp)
1192 stw r12,(12*8+offes_intregs)(sp)
1193 stw r13,(13*8+offes_intregs)(sp)
1194 stw r14,(14*8+offes_intregs)(sp)
1195 stw r15,(15*8+offes_intregs)(sp)
1196 stw r16,(16*8+offes_intregs)(sp) /* link register */
1197 stw r17,(17*8+offes_intregs)(sp)
1198 stw r18,(18*8+offes_intregs)(sp)
1199 stw r19,(19*8+offes_intregs)(sp)
1200 stw r20,(20*8+offes_intregs)(sp)
1201 stw r21,(21*8+offes_intregs)(sp)
1202 stw r22,(22*8+offes_intregs)(sp)
1203 stw r23,(23*8+offes_intregs)(sp)
1204 stw r24,(24*8+offes_intregs)(sp)
1205 stw r25,(25*8+offes_intregs)(sp)
1206 stw r26,(26*8+offes_intregs)(sp)
1207 stw r27,(27*8+offes_intregs)(sp)
1208 stw r28,(28*8+offes_intregs)(sp)
1209 stw r29,(29*8+offes_intregs)(sp)
1210 stw r30,(30*8+offes_intregs)(sp)
1211 stw r31,(31*8+offes_intregs)(sp)
1213 stfd fr0 ,( 0*8+offes_fltregs)(sp)
1214 stfd fr1 ,( 1*8+offes_fltregs)(sp)
1215 stfd fr2 ,( 2*8+offes_fltregs)(sp)
1216 stfd fr3 ,( 3*8+offes_fltregs)(sp)
1217 stfd fr4 ,( 4*8+offes_fltregs)(sp)
1218 stfd fr5 ,( 5*8+offes_fltregs)(sp)
1219 stfd fr6 ,( 6*8+offes_fltregs)(sp)
1220 stfd fr7 ,( 7*8+offes_fltregs)(sp)
1221 stfd fr8 ,( 8*8+offes_fltregs)(sp)
1222 stfd fr9 ,( 9*8+offes_fltregs)(sp)
1223 stfd fr10,(10*8+offes_fltregs)(sp)
1224 stfd fr11,(11*8+offes_fltregs)(sp)
1225 stfd fr12,(12*8+offes_fltregs)(sp)
1226 stfd fr13,(13*8+offes_fltregs)(sp)
1227 stfd fr14,(14*8+offes_fltregs)(sp)
1228 stfd fr15,(15*8+offes_fltregs)(sp)
1229 stfd fr16,(16*8+offes_fltregs)(sp)
1230 stfd fr17,(17*8+offes_fltregs)(sp)
1231 stfd fr18,(18*8+offes_fltregs)(sp)
1232 stfd fr19,(19*8+offes_fltregs)(sp)
1233 stfd fr20,(20*8+offes_fltregs)(sp)
1234 stfd fr21,(21*8+offes_fltregs)(sp)
1235 stfd fr22,(22*8+offes_fltregs)(sp)
1236 stfd fr23,(23*8+offes_fltregs)(sp)
1237 stfd fr24,(24*8+offes_fltregs)(sp)
1238 stfd fr25,(25*8+offes_fltregs)(sp)
1239 stfd fr26,(26*8+offes_fltregs)(sp)
1240 stfd fr27,(27*8+offes_fltregs)(sp)
1241 stfd fr28,(28*8+offes_fltregs)(sp)
1242 stfd fr29,(29*8+offes_fltregs)(sp)
1243 stfd fr30,(30*8+offes_fltregs)(sp)
1244 stfd fr31,(31*8+offes_fltregs)(sp)
1246 /* calculate sp of method */
1247 addi itmp1,sp,(sizeexecutionstate + REPLACEMENT_ROOM + 4*4)
1248 stw itmp1,(offes_sp)(sp)
1251 stw pv,(offes_pv)(sp)
1253 /* call replace_me */
1254 lwz a0,-(4*4)(itmp1) /* arg0: rplpoint * */
1255 mr a1,sp /* arg1: execution state */
1256 addi sp,sp,-(LA_SIZE_ALIGNED)
1257 b replace_me /* call C function replace_me */
1259 /* asm_replacement_in **********************************************************
1261 This code writes the given execution state and jumps to the replacement
1264 This function never returns!
1266 NOTE: itmp3 is not restored!
1269 void asm_replacement_in(executionstate *es);
1271 *******************************************************************************/
1273 .asm_replacement_in:
1274 /* a0 == executionstate *es */
1276 /* set new sp and pv */
1277 lwz sp,(offes_sp)(a0)
1278 lwz pv,(offes_pv)(a0)
1280 /* copy registers from execution state */
1281 lwz r0 ,( 0*8+offes_intregs)(a0)
1283 /* r2 is reserved */
1284 /* a0 is loaded below */
1285 lwz r4 ,( 4*8+offes_intregs)(a0)
1286 lwz r5 ,( 5*8+offes_intregs)(a0)
1287 lwz r6 ,( 6*8+offes_intregs)(a0)
1288 lwz r7 ,( 7*8+offes_intregs)(a0)
1289 lwz r8 ,( 8*8+offes_intregs)(a0)
1290 lwz r9 ,( 9*8+offes_intregs)(a0)
1291 lwz r10,(10*8+offes_intregs)(a0)
1292 lwz r11,(11*8+offes_intregs)(a0)
1293 lwz r12,(12*8+offes_intregs)(a0)
1295 lwz r14,(14*8+offes_intregs)(a0)
1296 lwz r15,(15*8+offes_intregs)(a0)
1297 lwz r16,(16*8+offes_intregs)(a0) /* link register */
1298 lwz r17,(17*8+offes_intregs)(a0)
1299 lwz r18,(18*8+offes_intregs)(a0)
1300 lwz r19,(19*8+offes_intregs)(a0)
1301 lwz r20,(20*8+offes_intregs)(a0)
1302 lwz r21,(21*8+offes_intregs)(a0)
1303 lwz r22,(22*8+offes_intregs)(a0)
1304 lwz r23,(23*8+offes_intregs)(a0)
1305 lwz r24,(24*8+offes_intregs)(a0)
1306 lwz r25,(25*8+offes_intregs)(a0)
1307 lwz r26,(26*8+offes_intregs)(a0)
1308 lwz r27,(27*8+offes_intregs)(a0)
1309 lwz r28,(28*8+offes_intregs)(a0)
1310 lwz r29,(29*8+offes_intregs)(a0)
1311 lwz r30,(30*8+offes_intregs)(a0)
1312 lwz r31,(31*8+offes_intregs)(a0)
1314 lfd fr0 ,( 0*8+offes_fltregs)(a0)
1315 lfd fr1 ,( 1*8+offes_fltregs)(a0)
1316 lfd fr2 ,( 2*8+offes_fltregs)(a0)
1317 lfd fr3 ,( 3*8+offes_fltregs)(a0)
1318 lfd fr4 ,( 4*8+offes_fltregs)(a0)
1319 lfd fr5 ,( 5*8+offes_fltregs)(a0)
1320 lfd fr6 ,( 6*8+offes_fltregs)(a0)
1321 lfd fr7 ,( 7*8+offes_fltregs)(a0)
1322 lfd fr8 ,( 8*8+offes_fltregs)(a0)
1323 lfd fr9 ,( 9*8+offes_fltregs)(a0)
1324 lfd fr10,(10*8+offes_fltregs)(a0)
1325 lfd fr11,(11*8+offes_fltregs)(a0)
1326 lfd fr12,(12*8+offes_fltregs)(a0)
1327 lfd fr13,(13*8+offes_fltregs)(a0)
1328 lfd fr14,(14*8+offes_fltregs)(a0)
1329 lfd fr15,(15*8+offes_fltregs)(a0)
1330 lfd fr16,(16*8+offes_fltregs)(a0)
1331 lfd fr17,(17*8+offes_fltregs)(a0)
1332 lfd fr18,(18*8+offes_fltregs)(a0)
1333 lfd fr19,(19*8+offes_fltregs)(a0)
1334 lfd fr20,(20*8+offes_fltregs)(a0)
1335 lfd fr21,(21*8+offes_fltregs)(a0)
1336 lfd fr22,(22*8+offes_fltregs)(a0)
1337 lfd fr23,(23*8+offes_fltregs)(a0)
1338 lfd fr24,(24*8+offes_fltregs)(a0)
1339 lfd fr25,(25*8+offes_fltregs)(a0)
1340 lfd fr26,(26*8+offes_fltregs)(a0)
1341 lfd fr27,(27*8+offes_fltregs)(a0)
1342 lfd fr28,(28*8+offes_fltregs)(a0)
1343 lfd fr29,(29*8+offes_fltregs)(a0)
1344 lfd fr30,(30*8+offes_fltregs)(a0)
1345 lfd fr31,(31*8+offes_fltregs)(a0)
1347 /* restore link register */
1353 lwz itmp3,offes_pc(a0)
1357 lwz a0,(3*8+offes_intregs)(a0)
1359 /* jump to new code */
1364 /*********************************************************************/
1367 .quad .asm_cacheflush,.TOC.@tocbase,0
1369 .size asm_cacheflush,24
1370 .type .asm_cacheflush,@function
1371 .globl .asm_cacheflush
1399 asm_getclassvalues_atomic:
1400 .globl .asm_getclassvalues_atomic
1403 lwz r6,offbaseval(r3)
1404 lwz r7,offdiffval(r3)
1405 lwz r8,offbaseval(r4)
1407 stw r6,offcast_super_baseval(r5)
1408 stw r7,offcast_super_diffval(r5)
1409 stw r8,offcast_sub_baseval(r5)
1414 asm_criticalsections:
1415 #if defined(ENABLE_THREADS)
1423 #if defined(__DARWIN__)
1425 .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32
1427 L_builtin_throw_exception$stub:
1428 .indirect_symbol _builtin_throw_exception
1430 bcl 20,31,L00$_builtin_throw_exception
1431 L00$_builtin_throw_exception:
1433 addis r11,r11,ha16(L_builtin_throw_exception$lazy_ptr - L00$_builtin_throw_exception)
1435 lwzu r12,lo16(L_builtin_throw_exception$lazy_ptr - L00$_builtin_throw_exception)(r11)
1439 .lazy_symbol_pointer
1440 L_builtin_throw_exception$lazy_ptr:
1441 .indirect_symbol _builtin_throw_exception
1442 .long dyld_stub_binding_helper
1445 .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32
1447 L_exceptions_handle_exception$stub:
1448 .indirect_symbol _exceptions_handle_exception
1450 bcl 20,31,L00$_exceptions_handle_exception
1451 L00$_exceptions_handle_exception:
1453 addis r11,r11,ha16(L_exceptions_handle_exception$lazy_ptr - L00$_exceptions_handle_exception)
1455 lwzu r12,lo16(L_exceptions_handle_exception$lazy_ptr - L00$_exceptions_handle_exception)(r11)
1459 .lazy_symbol_pointer
1460 L_exceptions_handle_exception$lazy_ptr:
1461 .indirect_symbol _exceptions_handle_exception
1462 .long dyld_stub_binding_helper
1465 .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32
1467 L_stacktrace_create_extern_stackframeinfo$stub:
1468 .indirect_symbol _stacktrace_create_extern_stackframeinfo
1470 bcl 20,31,L00$_stacktrace_create_extern_stackframeinfo
1471 L00$_stacktrace_create_extern_stackframeinfo:
1473 addis r11,r11,ha16(L_stacktrace_create_extern_stackframeinfo$lazy_ptr - L00$_stacktrace_create_extern_stackframeinfo)
1475 lwzu r12,lo16(L_stacktrace_create_extern_stackframeinfo$lazy_ptr - L00$_stacktrace_create_extern_stackframeinfo)(r11)
1479 .lazy_symbol_pointer
1480 L_stacktrace_create_extern_stackframeinfo$lazy_ptr:
1481 .indirect_symbol _stacktrace_create_extern_stackframeinfo
1482 .long dyld_stub_binding_helper
1485 .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32
1487 L_jit_asm_compile$stub:
1488 .indirect_symbol _jit_asm_compile
1490 bcl 20,31,L00$_jit_asm_compile
1491 L00$_jit_asm_compile:
1493 addis r11,r11,ha16(L_jit_asm_compile$lazy_ptr - L00$_jit_asm_compile)
1495 lwzu r12,lo16(L_jit_asm_compile$lazy_ptr - L00$_jit_asm_compile)(r11)
1499 .lazy_symbol_pointer
1500 L_jit_asm_compile$lazy_ptr:
1501 .indirect_symbol _jit_asm_compile
1502 .long dyld_stub_binding_helper
1505 .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32
1507 L_stacktrace_remove_stackframeinfo$stub:
1508 .indirect_symbol _stacktrace_remove_stackframeinfo
1510 bcl 20,31,L00$_stacktrace_remove_stackframeinfo
1511 L00$_stacktrace_remove_stackframeinfo:
1513 addis r11,r11,ha16(L_stacktrace_remove_stackframeinfo$lazy_ptr - L00$_stacktrace_remove_stackframeinfo)
1515 lwzu r12,lo16(L_stacktrace_remove_stackframeinfo$lazy_ptr - L00$_stacktrace_remove_stackframeinfo)(r11)
1519 .lazy_symbol_pointer
1520 L_stacktrace_remove_stackframeinfo$lazy_ptr:
1521 .indirect_symbol _stacktrace_remove_stackframeinfo
1522 .long dyld_stub_binding_helper
1525 .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32
1527 L_exceptions_get_and_clear_exception$stub:
1528 .indirect_symbol _exceptions_get_and_clear_exception
1530 bcl 20,31,L00$_exceptions_get_and_clear_exception
1531 L00$_exceptions_get_and_clear_exception:
1533 addis r11,r11,ha16(L_exceptions_get_and_clear_exception$lazy_ptr - L00$_exceptions_get_and_clear_exception)
1535 lwzu r12,lo16(L_exceptions_get_and_clear_exception$lazy_ptr - L00$_exceptions_get_and_clear_exception)(r11)
1539 .lazy_symbol_pointer
1540 L_exceptions_get_and_clear_exception$lazy_ptr:
1541 .indirect_symbol _exceptions_get_and_clear_exception
1542 .long dyld_stub_binding_helper
1545 .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32
1547 L_exceptions_asm_new_abstractmethoderror$stub:
1548 .indirect_symbol _exceptions_asm_new_abstractmethoderror
1550 bcl 20,31,L00$_exceptions_asm_new_abstractmethoderror
1551 L00$_exceptions_asm_new_abstractmethoderror:
1553 addis r11,r11,ha16(L_exceptions_asm_new_abstractmethoderror$lazy_ptr - L00$_exceptions_asm_new_abstractmethoderror)
1555 lwzu r12,lo16(L_exceptions_asm_new_abstractmethoderror$lazy_ptr - L00$_exceptions_asm_new_abstractmethoderror)(r11)
1559 .lazy_symbol_pointer
1560 L_exceptions_asm_new_abstractmethoderror$lazy_ptr:
1561 .indirect_symbol _exceptions_asm_new_abstractmethoderror
1562 .long dyld_stub_binding_helper
1565 .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32
1567 L_patcher_wrapper$stub:
1568 .indirect_symbol _patcher_wrapper
1570 bcl 20,31,L00$_patcher_wrapper
1571 L00$_patcher_wrapper:
1573 addis r11,r11,ha16(L_patcher_wrapper$lazy_ptr - L00$_patcher_wrapper)
1575 lwzu r12,lo16(L_patcher_wrapper$lazy_ptr - L00$_patcher_wrapper)(r11)
1579 .lazy_symbol_pointer
1580 L_patcher_wrapper$lazy_ptr:
1581 .indirect_symbol _patcher_wrapper
1582 .long dyld_stub_binding_helper
1585 .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32
1588 .indirect_symbol _replace_me
1590 bcl 20,31,L00$_replace_me
1593 addis r11,r11,ha16(L_replace_me$lazy_ptr - L00$_replace_me)
1595 lwzu r12,lo16(L_replace_me$lazy_ptr - L00$_replace_me)(r11)
1599 .lazy_symbol_pointer
1600 L_replace_me$lazy_ptr:
1601 .indirect_symbol _replace_me
1602 .long dyld_stub_binding_helper
1604 #endif /* defined(__DARWIN__) */
1607 /* Disable exec-stacks, required for Gentoo ***********************************/
1609 #if defined(__GCC__) && defined(__ELF__)
1610 .section .note.GNU-stack,"",@progbits
1615 * These are local overrides for various environment variables in Emacs.
1616 * Please do not remove this and leave it at the end of the file, where
1617 * Emacs will automagically detect them.
1618 * ---------------------------------------------------------------------
1621 * indent-tabs-mode: t
1625 * vim:noexpandtab:sw=4:ts=4: