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
29 Changes: Christian Thalinger
32 $Id: asmpart.S 5880 2006-10-31 13:40:55Z tbfg $
42 #include "vm/jit/abi-asm.h"
43 #include "vm/jit/methodheader.h"
44 #include "vm/jit/powerpc64/offsets.h"
52 /* export functions ***********************************************************/
55 .globl asm_vm_call_method
56 .globl asm_vm_call_method_int
57 .globl asm_vm_call_method_long
58 .globl asm_vm_call_method_float
59 .globl asm_vm_call_method_double
61 .globl .asm_vm_call_method
62 .globl .asm_vm_call_method_int
63 .globl .asm_vm_call_method_long
64 .globl .asm_vm_call_method_float
65 .globl .asm_vm_call_method_double
67 .globl asm_vm_call_method_exception_handler
69 .globl asm_call_jit_compiler
71 .globl asm_handle_nat_exception
72 .globl asm_handle_exception
74 .globl asm_abstractmethoderror
76 .globl asm_patcher_wrapper
78 .globl asm_replacement_out
79 .globl .asm_replacement_in
81 .globl .asm_cacheflush /* no function descriptor needed, only called direct */
82 .globl asm_criticalsections
83 .globl .asm_getclassvalues_atomic
86 /* asm_vm_call_method **********************************************************
88 * This function calls a Java-method (which possibly needs compilation) *
89 * with up to 4 address parameters. *
91 * This functions calls the JIT-compiler which eventually translates the *
92 * method into machine code. *
95 * javaobject_header *asm_calljavamethod (methodinfo *m, *
96 * void *arg1, void *arg2, void *arg3, void *arg4); *
98 *******************************************************************************/
99 /* this is the method header see src/vm/jit/methodheader.h */
103 .quad 0 /* catch type all */
104 .quad 0 /* handler pc */
106 .quad 0 /* start pc */
107 .long 1 /* extable size */
108 .long 0 /* ALIGNMENT PADDING */
109 .quad 0 /* line number table start */
110 .quad 0 /* line number table size */
111 .long 0 /* ALIGNMENT PADDING */
112 .long 0 /* fltsave */
113 .long 0 /* intsave */
116 .long 0 /* frame size */
117 .quad 0 /* codeinfo pointer */
124 asm_vm_call_method_int:
125 asm_vm_call_method_long:
126 asm_vm_call_method_float:
127 asm_vm_call_method_double:
128 .quad .asm_vm_call_method,.TOC.@tocbase,0
130 .size asm_vm_call_method, 24
131 .type .asm_vm_call_method,@function
132 .globl .asm_vm_call_method
135 .globl asm_vm_call_method
139 .asm_vm_call_method_int:
140 .asm_vm_call_method_long:
141 .asm_vm_call_method_float:
142 .asm_vm_call_method_double:
144 std r0,LA_LR_OFFSET(sp)
147 std s0,8*8(sp) /* save used callee saved registers */
148 std a0,9*8(sp) /* save method pointer for compiler */
150 #if defined(__DARWIN__)
151 std itmp1,10*8(sp) /* register r11 is callee saved */
153 std pv,11*8(sp) /* save PV register */
155 std itmp3,12*8(sp) /* registers r14-r31 are callee saved */
156 stfd ftmp1,13*8(sp) /* registers f14-f31 are callee saved */
159 #if defined(__DARWIN__)
175 SAVE_TEMPORARY_REGISTERS(15) /* the offset has to be even */
178 mr itmp2,a1 /* arg count */
179 mr itmp1,a2 /* pointer to arg block */
181 mr t4,itmp2 /* save argument count */
182 mr t5,itmp1 /* save argument block pointer */
184 mr s0,sp /* save current sp to s0 */
186 addi itmp1,itmp1,-sizevmarg /* initialize pointer (smaller code) */
187 addi itmp2,itmp2,1 /* initialize argument count */
188 li t0,0 /* initialize integer argument counter */
189 li t1,0 /* initialize float argument counter */
190 li t6,0 /* initialize integer register counter */
191 #if defined(__DARWIN__)
192 li t7,0 /* initialize stack slot counter */
195 mflr r0 /* save link register (PIC code) */
196 bl L_asm_vm_call_method_get_pc
197 L_asm_vm_call_method_get_pc:
198 mflr t3 /* t3 contains the current pc */
202 addi itmp1,itmp1,sizevmarg /* goto next argument block */
203 addi itmp2,itmp2,-1 /* argument count - 1 */
205 beq L_register_copy_done
207 lwz itmp3,offvmargtype+4(itmp1)
208 andi. r0,itmp3,0x0002 /* is this a float/double type? */
209 bne L_register_handle_float
211 L_register_handle_int:
212 cmpwi t6,INT_ARG_CNT /* are we out of integer argument */
213 beq L_register_copy /* registers? yes, next loop */
215 andi. r0,itmp3,0x0001 /* is this a 2-word type? */
216 bne L_register_handle_long
218 #if defined(__DARWIN__)
219 #error "FIXME for darwin"
221 lis itmp3,L_jumptable_int@highest /* load 64bit address */
222 ori itmp3,itmp3,L_jumptable_int@higher
223 rldicr itmp3,itmp3,32,31
224 oris itmp3,itmp3,L_jumptable_int@h
225 ori itmp3,itmp3,L_jumptable_int@l
227 b L_register_do_copy_longint
229 L_register_handle_long:
231 #if defined(__DARWIN__)
232 #error "FIXME for darwin"
234 lis itmp3,L_jumptable_long@highest /* load 64bit address */
235 ori itmp3,itmp3,L_jumptable_long@higher
236 rldicr itmp3,itmp3,32,31
237 oris itmp3,itmp3,L_jumptable_long@h
238 ori itmp3,itmp3,L_jumptable_long@l
241 L_register_do_copy_longint:
242 slwi t2,t6,3 /* multiple of 8-bytes */
243 add itmp3,itmp3,t2 /* calculate address of jumptable */
244 ld itmp3,0(itmp3) /* load function address */
246 addi t0,t0,1 /* integer argument counter */
247 addi t6,t6,1 /* integer argument register counter */
248 #if defined(__DARWIN__)
249 addi t7,t7,1 /* stack slot counter */
253 L_register_handle_float:
254 cmpwi t1,FLT_ARG_CNT /* are we out of float argument */
255 beq L_register_copy /* registers? yes, next loop */
257 andi. r0,itmp3,0x0001 /* is this a 2-word type? */
258 bne L_register_handle_double
260 #if defined(__DARWIN__)
261 #error "FIXME for darwin"
263 lis itmp3,L_jumptable_float@highest /* load 64bit address */
264 ori itmp3,itmp3,L_jumptable_float@higher
265 rldicr itmp3,itmp3,32,31
266 oris itmp3,itmp3,L_jumptable_float@h
267 ori itmp3,itmp3,L_jumptable_float@l
269 b L_register_do_copy_floatdouble
271 L_register_handle_double:
273 #if defined(__DARWIN__)
274 #error "FIXME for darwin"
276 lis itmp3,L_jumptable_double@highest /* load 64bit address */
277 ori itmp3,itmp3,L_jumptable_double@higher
278 rldicr itmp3,itmp3,32,31
279 oris itmp3,itmp3,L_jumptable_double@h
280 ori itmp3,itmp3,L_jumptable_double@l
284 L_register_do_copy_floatdouble:
286 slwi t2,t1,3 /* multiple of 8-bytes */
287 add itmp3,itmp3,t2 /* calculate address of jumptable */
288 ld itmp3,0(itmp3) /* load function address */
290 addi t1,t1,1 /* float argument counter */
291 #if defined(__DARWIN__)
292 addi t7,t7,1 /* stack slot counter */
293 addi t6,t6,1 /* skip 1 integer argument register */
298 L_register_copy_done:
299 /* calculate remaining arguments */
300 sub itmp3,t4,t0 /* - integer arguments in registers */
301 sub itmp3,itmp3,t1 /* - float arguments in registers */
303 beq L_stack_copy_done
305 mr itmp2,t4 /* restore argument count */
306 mr itmp1,t5 /* restore argument block pointer */
308 slwi t4,itmp3,3 /* XXX use 8-bytes slots for now */
309 addi t4,t4,LA_SIZE /* add size of linkage area */
311 #if defined(__DARWIN__)
312 slwi t5,t7,2 /* add stack space for arguments */
318 mr t6,sp /* use t6 as temporary sp */
319 addi t6,t6,LA_SIZE /* skip linkage area */
320 #if defined(__DARWIN__)
321 add t6,t6,t5 /* skip stack space for arguments */
324 addi itmp1,itmp1,-sizevmarg /* initialize pointer (smaller code) */
325 addi itmp2,itmp2,1 /* initialize argument count */
328 addi itmp1,itmp1,sizevmarg /* goto next argument block */
329 addi itmp2,itmp2,-1 /* argument count - 1 */
331 beq L_stack_copy_done
333 lwz itmp3,offvmargtype+4(itmp1)
334 andi. r0,itmp3,0x0002 /* is this a float/double type? */
335 bne L_stack_handle_float
338 addi t0,t0,-1 /* arguments assigned to registers */
340 bge L_stack_copy_loop
342 andi. r0,itmp3,0x0001 /* is this a 2-word type? */
343 bne L_stack_handle_long
345 lwz itmp3,offvmargdata+4(itmp1) /* get integer argument */
346 stw itmp3,0(t6) /* and store it on the stack */
347 addi t6,t6,4 /* increase temporary sp by 1 slot */
351 #if !defined(__DARWIN__)
352 addi t6,t6,4 /* align stack to 8-bytes */
353 rlwinm t6,t6,0,30,28 /* clear lower 4-bits */
356 lwz itmp3,offvmargdata+0(itmp1) /* get long argument */
357 stw itmp3,0(t6) /* and store it on the stack */
358 lwz itmp3,offvmargdata+4(itmp1)
360 addi t6,t6,8 /* increase temporary sp by 2 slots */
363 L_stack_handle_float:
364 addi t1,t1,-1 /* arguments assigned to registers */
366 bge L_stack_copy_loop
368 andi. r0,itmp3,0x0001 /* is this a 2-word type? */
369 bne L_stack_handle_double
371 lfs ftmp3,offvmargdata(itmp1) /* get float argument */
372 stfs ftmp3,0(t6) /* and store it on the stack */
373 addi t6,t6,4 /* increase temporary sp by 1 slot */
376 L_stack_handle_double:
377 #if !defined(__DARWIN__)
378 addi t6,t6,4 /* align stack to 8-bytes */
379 rlwinm t6,t6,0,30,28 /* clear lower 4-bits */
382 lfd ftmp3,offvmargdata(itmp1) /* get double argument */
383 stfd ftmp3,0(t6) /* and store it on the stack */
384 addi t6,t6,8 /* increase temporary sp by 2 slots */
388 ld itmp1,9*8(s0) /* pass method pointer via tmp1 */
390 #if defined(__DARWIN__)
391 addis mptr,t3,ha16(L_asm_call_jit_compiler - L_asm_vm_call_method_get_pc)
392 la mptr,lo16(L_asm_call_jit_compiler - L_asm_vm_call_method_get_pc)(mptr)
394 lis mptr,L_asm_call_jit_compiler@highest /* load 64bit address */
395 ori mptr,mptr,L_asm_call_jit_compiler@higher
396 rldicr mptr,mptr,32,31
397 oris mptr,mptr,L_asm_call_jit_compiler@h
398 ori mptr,mptr,L_asm_call_jit_compiler@l
408 #if defined(__DARWIN__)
409 addi pv,itmp1,lo16(.asm_vm_call_method - 1b)
411 addi pv,itmp1,(.asm_vm_call_method - 1b)@l
414 L_asm_vm_call_method_return:
415 mr sp,s0 /* restore the function's sp */
417 ld s0,8*8(sp) /* restore used callee saved registers */
419 #if defined(__DARWIN__)
420 lwz itmp1,10*4(sp) /* register r11 is callee saved */
422 ld pv,11*8(sp) /* save PV register */
425 lfd ftmp1,14*8(sp) /* registers f14-f31 are callee saved */
428 #if defined(__DARWIN__)
444 RESTORE_TEMPORARY_REGISTERS(18) /* the offset has to be even */
447 ld r0,40*8+LA_LR_OFFSET(r1)
452 asm_vm_call_method_exception_handler:
454 bl builtin_throw_exception
455 b L_asm_vm_call_method_return
475 lwz a0,offvmargdata+4(itmp1)
478 lwz a1,offvmargdata+4(itmp1)
481 lwz a2,offvmargdata+4(itmp1)
484 lwz a3,offvmargdata+4(itmp1)
487 lwz a4,offvmargdata+4(itmp1)
490 lwz a5,offvmargdata+4(itmp1)
493 lwz a6,offvmargdata+4(itmp1)
496 lwz a7,offvmargdata+4(itmp1)
517 ld a0,offvmargdata(itmp1)
520 ld a1,offvmargdata(itmp1)
523 ld a2,offvmargdata(itmp1)
526 ld a3,offvmargdata(itmp1)
529 ld a4,offvmargdata(itmp1)
532 ld a5,offvmargdata(itmp1)
535 ld a6,offvmargdata(itmp1)
538 ld a7,offvmargdata(itmp1)
554 #if defined(__DARWIN__)
566 lfs fa0,offvmargdata(itmp1)
569 lfs fa1,offvmargdata(itmp1)
572 lfs fa2,offvmargdata(itmp1)
575 lfs fa3,offvmargdata(itmp1)
578 lfs fa4,offvmargdata(itmp1)
581 lfs fa5,offvmargdata(itmp1)
584 lfs fa6,offvmargdata(itmp1)
587 lfs fa7,offvmargdata(itmp1)
590 #if defined(__DARWIN__)
592 lfs fa8,offvmargdata(itmp1)
595 lfs fa9,offvmargdata(itmp1)
598 lfs fa10,offvmargdata(itmp1)
601 lfs fa11,offvmargdata(itmp1)
604 lfs fa12,offvmargdata(itmp1)
622 #if defined(__DARWIN__)
634 lfd fa0,offvmargdata(itmp1)
637 lfd fa1,offvmargdata(itmp1)
640 lfd fa2,offvmargdata(itmp1)
643 lfd fa3,offvmargdata(itmp1)
646 lfd fa4,offvmargdata(itmp1)
649 lfd fa5,offvmargdata(itmp1)
652 lfd fa6,offvmargdata(itmp1)
655 lfd fa7,offvmargdata(itmp1)
658 #if defined(__DARWIN__)
660 lfd fa8,offvmargdata(itmp1)
663 lfd fa9,offvmargdata(itmp1)
666 lfd fa10,offvmargdata(itmp1)
669 lfd fa11,offvmargdata(itmp1)
672 lfd fa12,offvmargdata(itmp1)
677 /* asm_call_jit_compiler *******************************************************
679 Invokes the compiler for untranslated JavaVM methods.
681 *******************************************************************************/
683 asm_call_jit_compiler:
684 L_asm_call_jit_compiler: /* required for PIC code */
686 std r0,LA_LR_OFFSET(sp) /* save return address */
687 stdu r1,-(LA_SIZE+PA_SIZE+ARG_CNT*8)(sp)
689 #if defined(__DARWIN__)
690 stw a0,LA_SIZE+(5+0)*8(r1)
691 stw a1,LA_SIZE+(5+1)*8(r1)
692 stw a2,LA_SIZE+(5+2)*8(r1)
693 stw a3,LA_SIZE+(5+3)*8(r1)
694 stw a4,LA_SIZE+(5+4)*8(r1)
695 stw a5,LA_SIZE+(5+5)*8(r1)
696 stw a6,LA_SIZE+(5+6)*8(r1)
697 stw a7,LA_SIZE+(5+7)*8(r1)
699 stfd fa0,LA_SIZE+(5+8)*8(r1)
700 stfd fa1,LA_SIZE+(5+10)*8(r1)
701 stfd fa2,LA_SIZE+(5+12)*8(r1)
702 stfd fa3,LA_SIZE+(5+14)*8(r1)
703 stfd fa4,LA_SIZE+(5+16)*8(r1)
704 stfd fa5,LA_SIZE+(5+18)*8(r1)
705 stfd fa6,LA_SIZE+(5+20)*8(r1)
706 stfd fa7,LA_SIZE+(5+22)*8(r1)
707 stfd fa8,LA_SIZE+(5+24)*8(r1)
708 stfd fa9,LA_SIZE+(5+26)*8(r1)
709 stfd fa10,LA_SIZE+(5+28)*8(r1)
710 stfd fa11,LA_SIZE+(5+30)*8(r1)
711 stfd fa12,LA_SIZE+(5+32)*8(r1)
713 SAVE_ARGUMENT_REGISTERS(LA_SIZE_IN_POINTERS+PA_SIZE_IN_POINTERS)
718 addi a2,sp,(LA_SIZE + PA_SIZE+ ARG_CNT*8)
719 ld a3,(LA_SIZE + PA_SIZE + ARG_CNT*8)+LA_LR_OFFSET(sp)
721 ori r0,r0,0 /* nop needed after jump to function desc. */
722 mr pv,v0 /* move address to pv register */
724 #if defined(__DARWIN__)
725 lwz a0,LA_SIZE+(+5+0)*8(r1)
726 lwz a1,LA_SIZE+(+5+1)*8(r1)
727 lwz a2,LA_SIZE+(+5+2)*8(r1)
728 lwz a3,LA_SIZE+(+5+3)*8(r1)
729 lwz a4,LA_SIZE+(+5+4)*8(r1)
730 lwz a5,LA_SIZE+(+5+5)*8(r1)
731 lwz a6,LA_SIZE+(+5+6)*8(r1)
732 lwz a7,LA_SIZE+(+5+7)*8(r1)
734 lfd fa0,LA_SIZE+(+5+8)*8(r1)
735 lfd fa1,LA_SIZE+(+5+10)*8(r1)
736 lfd fa2,LA_SIZE+(+5+12)*8(r1)
737 lfd fa3,LA_SIZE+(+5+14)*8(r1)
738 lfd fa4,LA_SIZE+(+5+16)*8(r1)
739 lfd fa5,LA_SIZE+(+5+18)*8(r1)
740 lfd fa6,LA_SIZE+(+5+20)*8(r1)
741 lfd fa7,LA_SIZE+(+5+22)*8(r1)
742 lfd fa8,LA_SIZE+(+5+24)*8(r1)
743 lfd fa9,LA_SIZE+(+5+26)*8(r1)
744 lfd fa10,LA_SIZE+(+5+28)*8(r1)
745 lfd fa11,LA_SIZE+(+5+30)*8(r1)
746 lfd fa12,LA_SIZE+(+5+32)*8(r1)
748 RESTORE_ARGUMENT_REGISTERS(LA_SIZE_IN_POINTERS+PA_SIZE_IN_POINTERS)
751 ld itmp1,(LA_SIZE + PA_SIZE + ARG_CNT*8)+LA_LR_OFFSET(sp)
754 addi sp,sp,(LA_SIZE + PA_SIZE + ARG_CNT*8)
756 mr. pv,pv /* test for exception */
757 beq L_asm_call_jit_compiler_exception
759 mtctr pv /* move method address to control reg */
760 bctr /* and call the Java method */
762 L_asm_call_jit_compiler_exception:
764 std r0,LA_LR_OFFSET(sp)
765 stdu sp,-LA_SIZE_ALIGNED(sp) /* preserve linkage area */
766 bl exceptions_get_and_clear_exception
767 ld xpc,LA_SIZE_ALIGNED+LA_LR_OFFSET(sp)
769 addi sp,sp,LA_SIZE_ALIGNED
771 mr xptr,v0 /* get exception */
772 addi xpc,xpc,-4 /* exception address is ra - 4 */
773 b L_asm_handle_nat_exception
776 /********************* function asm_handle_exception ***************************
778 * This function handles an exception. It does not use the usual calling *
779 * conventions. The exception pointer is passed in REG_ITMP1 and the *
780 * pc from the exception raising position is passed in REG_ITMP2. It searches *
781 * the local exception table for a handler. If no one is found, it unwinds *
782 * stacks and continues searching the callers. *
784 * void asm_handle_exception (exceptionptr, exceptionpc); *
786 *******************************************************************************/
788 asm_handle_nat_exception:
789 L_asm_handle_nat_exception: /* required for PIC code */
790 L_asm_handle_exception_stack_loop:
792 addi sp,sp,-(LA_SIZE+PA_SIZE+((4+6)*8)) /* allocate stack (+4 for darwin) */
793 std xptr,LA_SIZE+PA_SIZE+(4+0)*8(sp) /* save exception pointer */
794 std xpc,LA_SIZE+PA_SIZE+(4+1)*8(sp) /* save exception pc */
795 std r0,LA_SIZE+PA_SIZE+(4+3)*8(sp) /* save return address */
797 std itmp3,LA_SIZE+PA_SIZE+(4+4)*8(sp) /* save maybe-leaf flag (cleared) */
799 mr a0,r0 /* pass return address */
800 bl md_codegen_get_pv_from_pc /* get PV from RA */
801 std v0,LA_SIZE+PA_SIZE+(4+2)*8(sp) /* save data segment pointer */
803 ld a0,LA_SIZE+PA_SIZE+(4+0)*8(sp) /* pass xptr */
804 ld a1,LA_SIZE+PA_SIZE+(4+1)*8(sp) /* pass xpc */
805 ld a2,LA_SIZE+PA_SIZE+(4+2)*8(sp) /* pass PV (v0 == a0) */
806 addi a3,sp,LA_SIZE+PA_SIZE+((4+6)*8) /* pass Java SP */
808 b L_asm_handle_exception_continue
811 asm_handle_exception:
812 L_asm_handle_exception: /* required for PIC code */
813 addi sp,sp,-(ARG_CNT+TMP_CNT)*8 /* create maybe-leaf stackframe */
815 #if defined(__DARWIN__)
817 SAVE_ARGUMENT_REGISTERS(0) /* we save arg and temp registers in */
818 SAVE_TEMPORARY_REGISTERS(ARG_CNT) /* case this is a leaf method */
821 addi sp,sp,-(LA_SIZE+PA_SIZE+(4+6)*8) /* allocate stack */
822 std xptr,LA_SIZE+PA_SIZE+(4+0)*8(sp) /* save exception pointer */
823 std pv,LA_SIZE+PA_SIZE+(4+2)*8(sp) /* save data segment pointer */
824 mflr r0 /* save return address */
825 std r0,LA_SIZE+PA_SIZE+(4+3)*8(sp)
827 std t0, LA_SIZE+PA_SIZE+(4+4)*8(sp) /* maybe-leaf flag */
829 mr a0,xptr /* pass exception pointer */
830 mr a1,xpc /* pass exception pc */
831 mr a2,pv /* pass data segment pointer */
832 addi a3,sp,LA_SIZE+PA_SIZE+(ARG_CNT+TMP_CNT)*8+(4+6)*8
835 L_asm_handle_exception_continue:
836 bl exceptions_handle_exception
839 beq L_asm_handle_exception_not_catched
841 mr xpc,v0 /* move handlerpc into xpc */
842 ld xptr,LA_SIZE+PA_SIZE+(4+0)*8(sp) /* restore exception pointer */
843 ld pv,LA_SIZE+PA_SIZE+(4+2)*8(sp) /* restore data segment pointer */
844 ld r0,LA_SIZE+PA_SIZE+(4+3)*8(sp) /* restore return address */
846 ld t0,LA_SIZE+PA_SIZE+(4+4)*8(sp) /* get maybe-leaf flag */
847 addi sp,sp,LA_SIZE+PA_SIZE+(4+6)*8 /* free stack frame */
850 beq L_asm_handle_exception_no_leaf
852 #if defined(__DARWIN__)
854 RESTORE_ARGUMENT_REGISTERS(0) /* if this is a leaf method, we have */
855 RESTORE_TEMPORARY_REGISTERS(ARG_CNT)/* to restore arg and temp registers */
858 addi sp,sp,(ARG_CNT+TMP_CNT)*8 /* remove maybe-leaf stackframe */
860 L_asm_handle_exception_no_leaf:
861 mtctr xpc /* jump to the handler */
864 L_asm_handle_exception_not_catched:
865 ld xptr,LA_SIZE+PA_SIZE+(4+0)*8(sp) /* restore exception pointer */
866 ld pv,LA_SIZE+PA_SIZE+(4+2)*8(sp) /* restore data segment pointer */
867 ld r0,LA_SIZE+PA_SIZE+(4+3)*8(sp) /* restore return address */
869 ld t0,LA_SIZE+PA_SIZE+(4+4)*8(sp) /* get maybe-leaf flag */
870 addi sp,sp,LA_SIZE+PA_SIZE+(4+6)*8 /* free stack frame */
873 beq L_asm_handle_exception_no_leaf_stack
875 addi sp,sp,(ARG_CNT+TMP_CNT)*8 /* remove maybe-leaf stackframe */
876 li t0,0 /* clear the maybe-leaf flag */
878 L_asm_handle_exception_no_leaf_stack:
879 lwz t1,FrameSize(pv) /* get frame size */
880 add t1,sp,t1 /* pointer to save area */
882 lwz t2,IsLeaf(pv) /* is leaf procedure */
884 bne L_asm_handle_exception_no_ra_restore
886 ld r0,LA_LR_OFFSET(t1) /* restore ra */
889 L_asm_handle_exception_no_ra_restore:
890 mflr xpc /* the new xpc is ra */
891 mr t4,xpc /* save RA */
892 lwz t2,IntSave(pv) /* t1 = saved int register count */
895 mflr t3 /* t3 = current pc */
896 #if defined(__DARWIN__)
897 addi t2,t2,lo16(ex_int2-ex_int1)
899 addi t3,t3,(ex_int2-ex_int1)@l
901 slwi t2,t2,2 /* t2 = register count * 4 */
902 subf t3,t2,t3 /* t3 = IntSave - t2 */
917 subf t1,t2,t1 /* t1 = t1 - register count * 4 */
922 #if defined(__DARWIN__)
923 addi t2,t2,lo16(ex_flt2-ex_flt1)
925 addi t3,t3,(ex_flt2-ex_flt1)@l
927 slwi t2,t2,2 /* t2 = register count * 4 */
928 subf t3,t2,t3 /* t3 = FltSave - t2 */
944 mtlr t4 /* restore RA */
946 add sp,sp,t1 /* unwind stack */
947 b L_asm_handle_exception_stack_loop
950 /* asm_abstractmethoderror *****************************************************
952 Creates and throws an AbstractMethodError.
954 *******************************************************************************/
956 asm_abstractmethoderror:
958 stw r0,LA_LR_OFFSET(sp)
959 stwu sp,-LA_SIZE_ALIGNED(sp) /* preserve linkage area */
960 addi a0,sp,LA_SIZE_ALIGNED /* pass java sp */
961 mr a1,r0 /* pass exception address */
962 bl exceptions_asm_new_abstractmethoderror
963 lwz r0,LA_SIZE_ALIGNED+LA_LR_OFFSET(sp)
964 mtlr r0 /* restore return address */
965 addi sp,sp,LA_SIZE_ALIGNED
967 mr xptr,v0 /* get exception pointer */
968 mr xpc,r0 /* we can't use r0 directly in addi */
969 addi xpc,xpc,-4 /* exception address is ra - 4 */
970 b L_asm_handle_nat_exception
973 /* asm_patcher_wrapper *********************************************************
978 40 return address into JIT code (patch position)
979 32 pointer to virtual java_objectheader
980 24 machine code (which is patched back later)
981 16 unresolved class/method/field reference
982 8 data segment displacement from load instructions
983 0 patcher function pointer to call (pv is saved here afterwards)
985 *******************************************************************************/
988 mflr r0 /* get Java return address (leaf) */
989 std r0,6*8(sp) /* store it in the stub stackframe */
990 /* keep stack 16-bytes aligned: 6+1+37 = 44 */
991 stdu sp,-(LA_SIZE+PA_SIZE+ARG_CNT*8+TMP_CNT*8+4*8)(sp)
993 #if defined(__DARWIN__)
994 stw a0,LA_SIZE+(5+0)*8(r1) /* save argument registers */
995 stw a1,LA_SIZE+(5+1)*8(r1) /* preserve linkage area (24 bytes) */
996 stw a2,LA_SIZE+(5+2)*8(r1) /* and 4 bytes for 4 argument */
997 stw a3,LA_SIZE+(5+3)*8(r1)
998 stw a4,LA_SIZE+(5+4)*8(r1)
999 stw a5,LA_SIZE+(5+5)*8(r1)
1000 stw a6,LA_SIZE+(5+6)*8(r1)
1001 stw a7,LA_SIZE+(5+7)*8(r1)
1003 stfd fa0,LA_SIZE+(5+8)*8(sp)
1004 stfd fa1,LA_SIZE+(5+10)*8(sp)
1005 stfd fa2,LA_SIZE+(5+12)*8(sp)
1006 stfd fa3,LA_SIZE+(5+14)*8(sp)
1007 stfd fa4,LA_SIZE+(5+16)*8(sp)
1008 stfd fa5,LA_SIZE+(5+18)*8(sp)
1009 stfd fa6,LA_SIZE+(5+20)*8(sp)
1010 stfd fa7,LA_SIZE+(5+22)*8(sp)
1011 stfd fa8,LA_SIZE+(5+24)*8(sp)
1012 stfd fa9,LA_SIZE+(5+26)*8(sp)
1013 stfd fa10,LA_SIZE+(5+28)*8(sp)
1014 stfd fa11,LA_SIZE+(5+30)*8(sp)
1015 stfd fa12,LA_SIZE+(5+32)*8(sp) /* XXX */
1017 stw t0,LA_SIZE+(+5+33)*8(r1)
1018 stw t1,LA_SIZE+(+5+34)*8(r1)
1019 stw t2,LA_SIZE+(+5+35)*8(r1)
1020 stw t3,LA_SIZE+(+5+36)*8(r1)
1021 stw t4,LA_SIZE+(+5+37)*8(r1)
1022 stw t5,LA_SIZE+(+5+38)*8(r1)
1023 stw t6,LA_SIZE+(+5+39)*8(r1)
1024 stw t7,LA_SIZE+(+5+40)*8(r1)
1026 stfd ft0,LA_SIZE+(+5+42)*8(r1)
1027 stfd ft1,LA_SIZE+(+5+44)*8(r1)
1028 stfd ft2,LA_SIZE+(+5+46)*8(r1)
1029 stfd ft3,LA_SIZE+(+5+48)*8(r1)
1030 stfd ft4,LA_SIZE+(+5+50)*8(r1)
1031 stfd ft5,LA_SIZE+(+5+52)*8(r1)
1033 SAVE_ARGUMENT_REGISTERS(LA_SIZE_IN_POINTERS+PA_SIZE_IN_POINTERS) /* save 8 int/8 float arguments */
1034 SAVE_TEMPORARY_REGISTERS(LA_SIZE_IN_POINTERS+PA_SIZE_IN_POINTERS+ARG_CNT)
1037 std itmp1,LA_SIZE+PA_SIZE+(ARG_CNT+TMP_CNT)*8+1*8(sp)
1038 std itmp2,LA_SIZE+PA_SIZE+(ARG_CNT+TMP_CNT)*8+2*8(sp)
1039 std pv,LA_SIZE+PA_SIZE+(ARG_CNT+TMP_CNT)*8+3*8(sp)
1041 addi a0,sp,LA_SIZE+PA_SIZE+ARG_CNT*8+TMP_CNT*8+4*8 /* pass SP of patcher stub */
1042 mr a1,pv /* pass PV */
1043 mr a2,r0 /* pass RA (correct for leafs) */
1045 std v0,LA_SIZE+PA_SIZE+(ARG_CNT+TMP_CNT)*8+4*8(sp) /* save return value */
1047 #if defined(__DARWIN__)
1048 lwz a0,LA_SIZE+(5+0)*8(r1)
1049 lwz a1,LA_SIZE+(5+1)*8(r1)
1050 lwz a2,LA_SIZE+(5+2)*8(r1)
1051 lwz a3,LA_SIZE+(5+3)*8(r1)
1052 lwz a4,LA_SIZE+(5+4)*8(r1)
1053 lwz a5,LA_SIZE+(5+5)*8(r1)
1054 lwz a6,LA_SIZE+(5+6)*8(r1)
1055 lwz a7,LA_SIZE+(5+7)*8(r1)
1057 lfd fa0,LA_SIZE+(5+8)*8(sp)
1058 lfd fa1,LA_SIZE+(5+10)*8(sp)
1059 lfd fa2,LA_SIZE+(5+12)*8(sp)
1060 lfd fa3,LA_SIZE+(5+14)*8(sp)
1061 lfd fa4,LA_SIZE+(5+16)*8(sp)
1062 lfd fa5,LA_SIZE+(5+18)*8(sp)
1063 lfd fa6,LA_SIZE+(5+20)*8(sp)
1064 lfd fa7,LA_SIZE+(5+22)*8(sp)
1065 lfd fa8,LA_SIZE+(5+24)*8(sp)
1066 lfd fa9,LA_SIZE+(5+26)*8(sp)
1067 lfd fa10,LA_SIZE+(5+28)*8(sp)
1068 lfd fa11,LA_SIZE+(5+30)*8(sp)
1069 lfd fa12,LA_SIZE+(5+32)*8(sp)
1071 lwz t0,LA_SIZE+(+5+33)*8(r1)
1072 lwz t1,LA_SIZE+(+5+34)*8(r1)
1073 lwz t2,LA_SIZE+(+5+35)*8(r1)
1074 lwz t3,LA_SIZE+(+5+36)*8(r1)
1075 lwz t4,LA_SIZE+(+5+37)*8(r1)
1076 lwz t5,LA_SIZE+(+5+38)*8(r1)
1077 lwz t6,LA_SIZE+(+5+39)*8(r1)
1078 lwz t7,LA_SIZE+(+5+40)*8(r1)
1080 lfd ft0,LA_SIZE+(+5+42)*8(r1)
1081 lfd ft1,LA_SIZE+(+5+44)*8(r1)
1082 lfd ft2,LA_SIZE+(+5+46)*8(r1)
1083 lfd ft3,LA_SIZE+(+5+48)*8(r1)
1084 lfd ft4,LA_SIZE+(+5+50)*8(r1)
1085 lfd ft5,LA_SIZE+(+5+52)*8(r1)
1087 RESTORE_ARGUMENT_REGISTERS(LA_SIZE_IN_POINTERS+PA_SIZE_IN_POINTERS) /* restore 8 int/8 float args */
1088 RESTORE_TEMPORARY_REGISTERS(LA_SIZE_IN_POINTERS+PA_SIZE_IN_POINTERS+ARG_CNT)
1091 ld itmp1,LA_SIZE+PA_SIZE+(ARG_CNT+TMP_CNT)*8+1*8(sp)
1092 ld itmp2,LA_SIZE+PA_SIZE+(ARG_CNT+TMP_CNT)*8+2*8(sp)
1093 ld pv,LA_SIZE+PA_SIZE+(ARG_CNT+TMP_CNT)*8+3*8(sp)
1094 ld itmp3,LA_SIZE+PA_SIZE+(ARG_CNT+TMP_CNT)*8+4*8(sp)
1096 ld r0,LA_SIZE+PA_SIZE+ARG_CNT*8+TMP_CNT*8+4*8+6*8(sp) /* restore RA */
1099 mr. itmp3,itmp3 /* check for an exception */
1100 bne L_asm_patcher_wrapper_exception
1102 /* get return address (into JIT code) */
1103 ld itmp3,LA_SIZE+PA_SIZE+ARG_CNT*8+TMP_CNT*8+4*8+5*8(sp)
1105 /* remove stack frame + patcher stub stack */
1106 addi sp,sp,LA_SIZE+PA_SIZE+ARG_CNT*8+TMP_CNT*8+4*8+8*8
1109 bctr /* jump to new patched code */
1111 L_asm_patcher_wrapper_exception:
1112 mr xptr,itmp3 /* get exception */
1113 ld xpc,LA_SIZE+PA_SIZE+ARG_CNT*8+TMP_CNT*8+4*8+5*8(sp)
1114 addi sp,sp,LA_SIZE+PA_SIZE+ARG_CNT*8+TMP_CNT*8+4*8+8*8
1115 b L_asm_handle_exception
1118 /* asm_replacement_out *********************************************************
1120 This code is jumped to from the replacement-out stubs that are executed
1121 when a thread reaches an activated replacement point.
1123 The purpose of asm_replacement_out is to read out the parts of the
1124 execution state that cannot be accessed from C code, store this state,
1125 and then call the C function replace_me.
1128 16 start of stack inside method to replace
1129 0 rplpoint * info on the replacement point that was reached
1131 NOTE: itmp3 has been clobbered by the replacement-out stub!
1133 *******************************************************************************/
1135 /* some room to accomodate changes of the stack frame size during replacement */
1136 /* XXX we should find a cleaner solution here */
1137 #define REPLACEMENT_ROOM 512
1139 asm_replacement_out:
1140 /* create stack frame */
1141 addi sp,sp,-(sizeexecutionstate + REPLACEMENT_ROOM) /* XXX align */
1143 /* save link register */
1146 /* save registers in execution state */
1147 stw r0 ,( 0*8+offes_intregs)(sp)
1148 stw r1 ,( 1*8+offes_intregs)(sp)
1149 stw r2 ,( 2*8+offes_intregs)(sp)
1150 stw r3 ,( 3*8+offes_intregs)(sp)
1151 stw r4 ,( 4*8+offes_intregs)(sp)
1152 stw r5 ,( 5*8+offes_intregs)(sp)
1153 stw r6 ,( 6*8+offes_intregs)(sp)
1154 stw r7 ,( 7*8+offes_intregs)(sp)
1155 stw r8 ,( 8*8+offes_intregs)(sp)
1156 stw r9 ,( 9*8+offes_intregs)(sp)
1157 stw r10,(10*8+offes_intregs)(sp)
1158 stw r11,(11*8+offes_intregs)(sp)
1159 stw r12,(12*8+offes_intregs)(sp)
1160 stw r13,(13*8+offes_intregs)(sp)
1161 stw r14,(14*8+offes_intregs)(sp)
1162 stw r15,(15*8+offes_intregs)(sp)
1163 stw r16,(16*8+offes_intregs)(sp) /* link register */
1164 stw r17,(17*8+offes_intregs)(sp)
1165 stw r18,(18*8+offes_intregs)(sp)
1166 stw r19,(19*8+offes_intregs)(sp)
1167 stw r20,(20*8+offes_intregs)(sp)
1168 stw r21,(21*8+offes_intregs)(sp)
1169 stw r22,(22*8+offes_intregs)(sp)
1170 stw r23,(23*8+offes_intregs)(sp)
1171 stw r24,(24*8+offes_intregs)(sp)
1172 stw r25,(25*8+offes_intregs)(sp)
1173 stw r26,(26*8+offes_intregs)(sp)
1174 stw r27,(27*8+offes_intregs)(sp)
1175 stw r28,(28*8+offes_intregs)(sp)
1176 stw r29,(29*8+offes_intregs)(sp)
1177 stw r30,(30*8+offes_intregs)(sp)
1178 stw r31,(31*8+offes_intregs)(sp)
1180 stfd fr0 ,( 0*8+offes_fltregs)(sp)
1181 stfd fr1 ,( 1*8+offes_fltregs)(sp)
1182 stfd fr2 ,( 2*8+offes_fltregs)(sp)
1183 stfd fr3 ,( 3*8+offes_fltregs)(sp)
1184 stfd fr4 ,( 4*8+offes_fltregs)(sp)
1185 stfd fr5 ,( 5*8+offes_fltregs)(sp)
1186 stfd fr6 ,( 6*8+offes_fltregs)(sp)
1187 stfd fr7 ,( 7*8+offes_fltregs)(sp)
1188 stfd fr8 ,( 8*8+offes_fltregs)(sp)
1189 stfd fr9 ,( 9*8+offes_fltregs)(sp)
1190 stfd fr10,(10*8+offes_fltregs)(sp)
1191 stfd fr11,(11*8+offes_fltregs)(sp)
1192 stfd fr12,(12*8+offes_fltregs)(sp)
1193 stfd fr13,(13*8+offes_fltregs)(sp)
1194 stfd fr14,(14*8+offes_fltregs)(sp)
1195 stfd fr15,(15*8+offes_fltregs)(sp)
1196 stfd fr16,(16*8+offes_fltregs)(sp)
1197 stfd fr17,(17*8+offes_fltregs)(sp)
1198 stfd fr18,(18*8+offes_fltregs)(sp)
1199 stfd fr19,(19*8+offes_fltregs)(sp)
1200 stfd fr20,(20*8+offes_fltregs)(sp)
1201 stfd fr21,(21*8+offes_fltregs)(sp)
1202 stfd fr22,(22*8+offes_fltregs)(sp)
1203 stfd fr23,(23*8+offes_fltregs)(sp)
1204 stfd fr24,(24*8+offes_fltregs)(sp)
1205 stfd fr25,(25*8+offes_fltregs)(sp)
1206 stfd fr26,(26*8+offes_fltregs)(sp)
1207 stfd fr27,(27*8+offes_fltregs)(sp)
1208 stfd fr28,(28*8+offes_fltregs)(sp)
1209 stfd fr29,(29*8+offes_fltregs)(sp)
1210 stfd fr30,(30*8+offes_fltregs)(sp)
1211 stfd fr31,(31*8+offes_fltregs)(sp)
1213 /* calculate sp of method */
1214 addi itmp1,sp,(sizeexecutionstate + REPLACEMENT_ROOM + 4*4)
1215 stw itmp1,(offes_sp)(sp)
1218 stw pv,(offes_pv)(sp)
1220 /* call replace_me */
1221 lwz a0,-(4*4)(itmp1) /* arg0: rplpoint * */
1222 mr a1,sp /* arg1: execution state */
1223 addi sp,sp,-(LA_SIZE_ALIGNED)
1224 b replace_me /* call C function replace_me */
1226 /* asm_replacement_in **********************************************************
1228 This code writes the given execution state and jumps to the replacement
1231 This function never returns!
1233 NOTE: itmp3 is not restored!
1236 void asm_replacement_in(executionstate *es);
1238 *******************************************************************************/
1240 .asm_replacement_in:
1241 /* a0 == executionstate *es */
1243 /* set new sp and pv */
1244 lwz sp,(offes_sp)(a0)
1245 lwz pv,(offes_pv)(a0)
1247 /* copy registers from execution state */
1248 lwz r0 ,( 0*8+offes_intregs)(a0)
1250 /* r2 is reserved */
1251 /* a0 is loaded below */
1252 lwz r4 ,( 4*8+offes_intregs)(a0)
1253 lwz r5 ,( 5*8+offes_intregs)(a0)
1254 lwz r6 ,( 6*8+offes_intregs)(a0)
1255 lwz r7 ,( 7*8+offes_intregs)(a0)
1256 lwz r8 ,( 8*8+offes_intregs)(a0)
1257 lwz r9 ,( 9*8+offes_intregs)(a0)
1258 lwz r10,(10*8+offes_intregs)(a0)
1259 lwz r11,(11*8+offes_intregs)(a0)
1260 lwz r12,(12*8+offes_intregs)(a0)
1262 lwz r14,(14*8+offes_intregs)(a0)
1263 lwz r15,(15*8+offes_intregs)(a0)
1264 lwz r16,(16*8+offes_intregs)(a0) /* link register */
1265 lwz r17,(17*8+offes_intregs)(a0)
1266 lwz r18,(18*8+offes_intregs)(a0)
1267 lwz r19,(19*8+offes_intregs)(a0)
1268 lwz r20,(20*8+offes_intregs)(a0)
1269 lwz r21,(21*8+offes_intregs)(a0)
1270 lwz r22,(22*8+offes_intregs)(a0)
1271 lwz r23,(23*8+offes_intregs)(a0)
1272 lwz r24,(24*8+offes_intregs)(a0)
1273 lwz r25,(25*8+offes_intregs)(a0)
1274 lwz r26,(26*8+offes_intregs)(a0)
1275 lwz r27,(27*8+offes_intregs)(a0)
1276 lwz r28,(28*8+offes_intregs)(a0)
1277 lwz r29,(29*8+offes_intregs)(a0)
1278 lwz r30,(30*8+offes_intregs)(a0)
1279 lwz r31,(31*8+offes_intregs)(a0)
1281 lfd fr0 ,( 0*8+offes_fltregs)(a0)
1282 lfd fr1 ,( 1*8+offes_fltregs)(a0)
1283 lfd fr2 ,( 2*8+offes_fltregs)(a0)
1284 lfd fr3 ,( 3*8+offes_fltregs)(a0)
1285 lfd fr4 ,( 4*8+offes_fltregs)(a0)
1286 lfd fr5 ,( 5*8+offes_fltregs)(a0)
1287 lfd fr6 ,( 6*8+offes_fltregs)(a0)
1288 lfd fr7 ,( 7*8+offes_fltregs)(a0)
1289 lfd fr8 ,( 8*8+offes_fltregs)(a0)
1290 lfd fr9 ,( 9*8+offes_fltregs)(a0)
1291 lfd fr10,(10*8+offes_fltregs)(a0)
1292 lfd fr11,(11*8+offes_fltregs)(a0)
1293 lfd fr12,(12*8+offes_fltregs)(a0)
1294 lfd fr13,(13*8+offes_fltregs)(a0)
1295 lfd fr14,(14*8+offes_fltregs)(a0)
1296 lfd fr15,(15*8+offes_fltregs)(a0)
1297 lfd fr16,(16*8+offes_fltregs)(a0)
1298 lfd fr17,(17*8+offes_fltregs)(a0)
1299 lfd fr18,(18*8+offes_fltregs)(a0)
1300 lfd fr19,(19*8+offes_fltregs)(a0)
1301 lfd fr20,(20*8+offes_fltregs)(a0)
1302 lfd fr21,(21*8+offes_fltregs)(a0)
1303 lfd fr22,(22*8+offes_fltregs)(a0)
1304 lfd fr23,(23*8+offes_fltregs)(a0)
1305 lfd fr24,(24*8+offes_fltregs)(a0)
1306 lfd fr25,(25*8+offes_fltregs)(a0)
1307 lfd fr26,(26*8+offes_fltregs)(a0)
1308 lfd fr27,(27*8+offes_fltregs)(a0)
1309 lfd fr28,(28*8+offes_fltregs)(a0)
1310 lfd fr29,(29*8+offes_fltregs)(a0)
1311 lfd fr30,(30*8+offes_fltregs)(a0)
1312 lfd fr31,(31*8+offes_fltregs)(a0)
1314 /* restore link register */
1320 lwz itmp3,offes_pc(a0)
1324 lwz a0,(3*8+offes_intregs)(a0)
1326 /* jump to new code */
1331 /* asm_cacheflush **************************************************************
1332 copied from linux/arch/ppc64/kernel/vdso64/cacheflush.S
1333 assumes 128 byte cache line size.
1334 *******************************************************************************/
1336 /* construct the AND mask */
1337 li r6, 0xffffffffffff8000
1338 ori r6,r6,0x000000000000ff80
1364 .asm_getclassvalues_atomic:
1367 lwz r6,offbaseval(r3)
1368 lwz r7,offdiffval(r3)
1369 lwz r8,offbaseval(r4)
1371 stw r6,offcast_super_baseval(r5)
1372 stw r7,offcast_super_diffval(r5)
1373 stw r8,offcast_sub_baseval(r5)
1378 asm_criticalsections:
1379 #if defined(ENABLE_THREADS)
1387 #if defined(__DARWIN__)
1389 .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32
1391 L_builtin_throw_exception$stub:
1392 .indirect_symbol _builtin_throw_exception
1394 bcl 20,31,L00$_builtin_throw_exception
1395 L00$_builtin_throw_exception:
1397 addis r11,r11,ha16(L_builtin_throw_exception$lazy_ptr - L00$_builtin_throw_exception)
1399 lwzu r12,lo16(L_builtin_throw_exception$lazy_ptr - L00$_builtin_throw_exception)(r11)
1403 .lazy_symbol_pointer
1404 L_builtin_throw_exception$lazy_ptr:
1405 .indirect_symbol _builtin_throw_exception
1406 .long dyld_stub_binding_helper
1409 .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32
1411 L_exceptions_handle_exception$stub:
1412 .indirect_symbol _exceptions_handle_exception
1414 bcl 20,31,L00$_exceptions_handle_exception
1415 L00$_exceptions_handle_exception:
1417 addis r11,r11,ha16(L_exceptions_handle_exception$lazy_ptr - L00$_exceptions_handle_exception)
1419 lwzu r12,lo16(L_exceptions_handle_exception$lazy_ptr - L00$_exceptions_handle_exception)(r11)
1423 .lazy_symbol_pointer
1424 L_exceptions_handle_exception$lazy_ptr:
1425 .indirect_symbol _exceptions_handle_exception
1426 .long dyld_stub_binding_helper
1429 .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32
1431 L_stacktrace_create_extern_stackframeinfo$stub:
1432 .indirect_symbol _stacktrace_create_extern_stackframeinfo
1434 bcl 20,31,L00$_stacktrace_create_extern_stackframeinfo
1435 L00$_stacktrace_create_extern_stackframeinfo:
1437 addis r11,r11,ha16(L_stacktrace_create_extern_stackframeinfo$lazy_ptr - L00$_stacktrace_create_extern_stackframeinfo)
1439 lwzu r12,lo16(L_stacktrace_create_extern_stackframeinfo$lazy_ptr - L00$_stacktrace_create_extern_stackframeinfo)(r11)
1443 .lazy_symbol_pointer
1444 L_stacktrace_create_extern_stackframeinfo$lazy_ptr:
1445 .indirect_symbol _stacktrace_create_extern_stackframeinfo
1446 .long dyld_stub_binding_helper
1449 .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32
1451 L_jit_asm_compile$stub:
1452 .indirect_symbol _jit_asm_compile
1454 bcl 20,31,L00$_jit_asm_compile
1455 L00$_jit_asm_compile:
1457 addis r11,r11,ha16(L_jit_asm_compile$lazy_ptr - L00$_jit_asm_compile)
1459 lwzu r12,lo16(L_jit_asm_compile$lazy_ptr - L00$_jit_asm_compile)(r11)
1463 .lazy_symbol_pointer
1464 L_jit_asm_compile$lazy_ptr:
1465 .indirect_symbol _jit_asm_compile
1466 .long dyld_stub_binding_helper
1468 .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32
1470 L_stacktrace_remove_stackframeinfo$stub:
1471 .indirect_symbol _stacktrace_remove_stackframeinfo
1473 bcl 20,31,L00$_stacktrace_remove_stackframeinfo
1474 L00$_stacktrace_remove_stackframeinfo:
1476 addis r11,r11,ha16(L_stacktrace_remove_stackframeinfo$lazy_ptr - L00$_stacktrace_remove_stackframeinfo)
1478 lwzu r12,lo16(L_stacktrace_remove_stackframeinfo$lazy_ptr - L00$_stacktrace_remove_stackframeinfo)(r11)
1482 .lazy_symbol_pointer
1483 L_stacktrace_remove_stackframeinfo$lazy_ptr:
1484 .indirect_symbol _stacktrace_remove_stackframeinfo
1485 .long dyld_stub_binding_helper
1488 .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32
1490 L_exceptions_get_and_clear_exception$stub:
1491 .indirect_symbol _exceptions_get_and_clear_exception
1493 bcl 20,31,L00$_exceptions_get_and_clear_exception
1494 L00$_exceptions_get_and_clear_exception:
1496 addis r11,r11,ha16(L_exceptions_get_and_clear_exception$lazy_ptr - L00$_exceptions_get_and_clear_exception)
1498 lwzu r12,lo16(L_exceptions_get_and_clear_exception$lazy_ptr - L00$_exceptions_get_and_clear_exception)(r11)
1502 .lazy_symbol_pointer
1503 L_exceptions_get_and_clear_exception$lazy_ptr:
1504 .indirect_symbol _exceptions_get_and_clear_exception
1505 .long dyld_stub_binding_helper
1508 .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32
1510 L_exceptions_asm_new_abstractmethoderror$stub:
1511 .indirect_symbol _exceptions_asm_new_abstractmethoderror
1513 bcl 20,31,L00$_exceptions_asm_new_abstractmethoderror
1514 L00$_exceptions_asm_new_abstractmethoderror:
1516 addis r11,r11,ha16(L_exceptions_asm_new_abstractmethoderror$lazy_ptr - L00$_exceptions_asm_new_abstractmethoderror)
1518 lwzu r12,lo16(L_exceptions_asm_new_abstractmethoderror$lazy_ptr - L00$_exceptions_asm_new_abstractmethoderror)(r11)
1522 .lazy_symbol_pointer
1523 L_exceptions_asm_new_abstractmethoderror$lazy_ptr:
1524 .indirect_symbol _exceptions_asm_new_abstractmethoderror
1525 .long dyld_stub_binding_helper
1528 .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32
1530 L_patcher_wrapper$stub:
1531 .indirect_symbol _patcher_wrapper
1533 bcl 20,31,L00$_patcher_wrapper
1534 L00$_patcher_wrapper:
1536 addis r11,r11,ha16(L_patcher_wrapper$lazy_ptr - L00$_patcher_wrapper)
1538 lwzu r12,lo16(L_patcher_wrapper$lazy_ptr - L00$_patcher_wrapper)(r11)
1542 .lazy_symbol_pointer
1543 L_patcher_wrapper$lazy_ptr:
1544 .indirect_symbol _patcher_wrapper
1545 .long dyld_stub_binding_helper
1548 .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32
1551 .indirect_symbol _replace_me
1553 bcl 20,31,L00$_replace_me
1556 addis r11,r11,ha16(L_replace_me$lazy_ptr - L00$_replace_me)
1558 lwzu r12,lo16(L_replace_me$lazy_ptr - L00$_replace_me)(r11)
1562 .lazy_symbol_pointer
1563 L_replace_me$lazy_ptr:
1564 .indirect_symbol _replace_me
1565 .long dyld_stub_binding_helper
1567 #endif /* defined(__DARWIN__) */
1570 /* Disable exec-stacks, required for Gentoo ***********************************/
1572 #if defined(__GCC__) && defined(__ELF__)
1573 .section .note.GNU-stack,"",@progbits
1578 * These are local overrides for various environment variables in Emacs.
1579 * Please do not remove this and leave it at the end of the file, where
1580 * Emacs will automagically detect them.
1581 * ---------------------------------------------------------------------
1584 * indent-tabs-mode: t
1588 * vim:noexpandtab:sw=4:ts=4: