1 /* src/vm/jit/powerpc64/asmpart.S - Java-C interface functions for PowerPC64
3 Copyright (C) 1996-2005, 2006, 2007 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
35 #include "vm/jit/abi-asm.h"
36 #include "vm/jit/methodheader.h"
39 /* export functions ***********************************************************/
41 .globl asm_vm_call_method_exception_handler
42 .globl asm_vm_call_method_end
44 .globl asm_call_jit_compiler
46 .globl asm_handle_nat_exception
47 .globl asm_handle_exception
49 .globl asm_abstractmethoderror
51 #if defined(ENABLE_REPLACEMENT)
52 .globl asm_replacement_out
53 .globl .asm_replacement_in
59 /* asm_vm_call_method **********************************************************
61 * This function calls a Java-method (which possibly needs compilation) *
62 * with up to 4 address parameters. *
64 * This functions calls the JIT-compiler which eventually translates the *
65 * method into machine code. *
68 * javaobject_header *asm_calljavamethod (methodinfo *m, *
69 * void *arg1, void *arg2, void *arg3, void *arg4); *
71 *******************************************************************************/
72 /* this is the method header see src/vm/jit/methodheader.h */
76 .quad 0 /* catch type all */
77 .quad 0 /* handler pc */
79 .quad 0 /* start pc */
80 .long 1 /* extable size */
81 .long 0 /* ALIGNMENT PADDING */
82 .quad 0 /* line number table start */
83 .quad 0 /* line number table size */
84 .long 0 /* ALIGNMENT PADDING */
89 .long 0 /* frame size */
90 .quad 0 /* codeinfo pointer */
94 .globl asm_vm_call_method
95 .globl asm_vm_call_method_int
96 .globl asm_vm_call_method_long
97 .globl asm_vm_call_method_float
98 .globl asm_vm_call_method_double
103 asm_vm_call_method_int:
104 asm_vm_call_method_long:
105 asm_vm_call_method_float:
106 asm_vm_call_method_double:
107 .quad .asm_vm_call_method,.TOC.@tocbase,0
109 .size asm_vm_call_method, 24
110 .type .asm_vm_call_method,@function
111 .globl .asm_vm_call_method
114 .globl asm_vm_call_method
115 asm_vm_call_method_int:
116 .globl asm_vm_call_method_int
117 asm_vm_call_method_long:
118 .globl asm_vm_call_method_long
119 asm_vm_call_method_float:
120 .globl asm_vm_call_method_float
121 asm_vm_call_method_double:
122 .globl asm_vm_call_method_double
126 .asm_vm_call_method_int:
127 .asm_vm_call_method_long:
128 .asm_vm_call_method_float:
129 .asm_vm_call_method_double:
131 std r0,LA_LR_OFFSET(sp)
134 std s0,8*8(sp) /* save used callee saved registers */
135 std a0,9*8(sp) /* save method pointer for compiler */
137 std pv,11*8(sp) /* save PV register */
139 std itmp3,12*8(sp) /* registers r14-r31 are callee saved */
140 stfd ftmp1,13*8(sp) /* registers f14-f31 are callee saved */
144 SAVE_TEMPORARY_REGISTERS(15)
145 mr s0, r1 /* save stack pointer */
147 /* a1 contains a pointer to a unit64_t structure filled with all INT_ARG_REG,
148 followed by ADR_ARG_CNT and FLT_ARG_CNT, afterwards what else needs to be copied onto
150 a2 contains the number of additional stack slots to be copied
181 beq L_stack_copy_done
184 addi t1,t1,20*8 /* before first possible stack slot arg */
185 mr t3,t2 /* argument counter */
186 sldi t2,t2,8 /* calculate size of stack */
187 sub sp,sp,t2 /* increase the stack */
188 mr t2,sp /* t2 points to bottom of stack now */
191 addi t1,t1,8 /* next possible stack slot to copy */
192 mr. t3,t3 /* more stack slots to copy ? */
193 beq L_stack_copy_done
201 mr itmp1, s0 /* fake invokevirtual invocation */
202 addi itmp1, itmp1, 9*8 /* address of methods pv */
208 addi pv,itmp1,(.asm_vm_call_method - 1b)@l
210 L_asm_vm_call_method_return:
211 mr sp,s0 /* restore the function's sp */
213 ld s0,8*8(sp) /* restore used callee saved registers */
215 ld pv,11*8(sp) /* save PV register */
218 lfd ftmp1,13*8(sp) /* registers f14-f31 are callee saved */
221 RESTORE_TEMPORARY_REGISTERS(15)
223 ld r0,40*8+LA_LR_OFFSET(r1)
228 asm_vm_call_method_exception_handler:
230 bl builtin_throw_exception
231 b L_asm_vm_call_method_return
233 asm_vm_call_method_end:
236 /* asm_call_jit_compiler *******************************************************
238 Invokes the compiler for untranslated JavaVM methods.
240 *******************************************************************************/
242 asm_call_jit_compiler:
243 L_asm_call_jit_compiler: /* required for PIC code */
245 std r0,LA_LR_OFFSET(sp) /* save return address */
246 stdu r1,-(LA_SIZE+PA_SIZE+ARG_CNT*8)(sp)
248 SAVE_ARGUMENT_REGISTERS(LA_SIZE_IN_POINTERS+PA_SIZE_IN_POINTERS)
252 addi a2,sp,(LA_SIZE + PA_SIZE+ ARG_CNT*8)
253 ld a3,(LA_SIZE + PA_SIZE + ARG_CNT*8)+LA_LR_OFFSET(sp)
255 ori r0,r0,0 /* nop needed after jump to function desc. */
256 mr pv,v0 /* move address to pv register */
258 RESTORE_ARGUMENT_REGISTERS(LA_SIZE_IN_POINTERS+PA_SIZE_IN_POINTERS)
260 ld itmp1,(LA_SIZE + PA_SIZE + ARG_CNT*8)+LA_LR_OFFSET(sp)
263 addi sp,sp,(LA_SIZE + PA_SIZE + ARG_CNT*8)
265 mr. pv,pv /* test for exception */
266 beq L_asm_call_jit_compiler_exception
268 mtctr pv /* move method address to control reg */
269 bctr /* and call the Java method */
271 L_asm_call_jit_compiler_exception:
273 std r0,LA_LR_OFFSET(sp)
274 stdu sp,-LA_SIZE_ALIGNED(sp) /* preserve linkage area */
275 bl exceptions_get_and_clear_exception
276 ld xpc,LA_SIZE_ALIGNED+LA_LR_OFFSET(sp)
278 addi sp,sp,LA_SIZE_ALIGNED
280 mr xptr,v0 /* get exception */
281 addi xpc,xpc,-4 /* exception address is ra - 4 */
282 b L_asm_handle_nat_exception
285 /********************* function asm_handle_exception ***************************
287 * This function handles an exception. It does not use the usual calling *
288 * conventions. The exception pointer is passed in REG_ITMP1 and the *
289 * pc from the exception raising position is passed in REG_ITMP2. It searches *
290 * the local exception table for a handler. If no one is found, it unwinds *
291 * stacks and continues searching the callers. *
293 * void asm_handle_exception (exceptionptr, exceptionpc); *
295 *******************************************************************************/
297 asm_handle_nat_exception:
298 L_asm_handle_nat_exception: /* required for PIC code */
299 L_asm_handle_exception_stack_loop:
301 addi sp,sp,-(LA_SIZE+PA_SIZE+((4+6)*8)) /* allocate stack (+4 for darwin) */
302 std xptr,LA_SIZE+PA_SIZE+(4+0)*8(sp) /* save exception pointer */
303 std xpc,LA_SIZE+PA_SIZE+(4+1)*8(sp) /* save exception pc */
304 std r0,LA_SIZE+PA_SIZE+(4+3)*8(sp) /* save return address */
306 std itmp3,LA_SIZE+PA_SIZE+(4+4)*8(sp) /* save maybe-leaf flag (cleared) */
308 mr a0,r0 /* pass return address */
309 bl md_codegen_get_pv_from_pc /* get PV from RA */
310 std v0,LA_SIZE+PA_SIZE+(4+2)*8(sp) /* save data segment pointer */
312 ld a0,LA_SIZE+PA_SIZE+(4+0)*8(sp) /* pass xptr */
313 ld a1,LA_SIZE+PA_SIZE+(4+1)*8(sp) /* pass xpc */
314 ld a2,LA_SIZE+PA_SIZE+(4+2)*8(sp) /* pass PV (v0 == a0) */
315 addi a3,sp,LA_SIZE+PA_SIZE+((4+6)*8) /* pass Java SP */
317 b L_asm_handle_exception_continue
320 asm_handle_exception:
321 L_asm_handle_exception: /* required for PIC code */
322 addi sp,sp,-(ARG_CNT+TMP_CNT)*8 /* create maybe-leaf stackframe */
324 SAVE_ARGUMENT_REGISTERS(0) /* we save arg and temp registers in */
325 SAVE_TEMPORARY_REGISTERS(ARG_CNT) /* case this is a leaf method */
327 addi sp,sp,-(LA_SIZE+PA_SIZE+(4+6)*8) /* allocate stack */
328 std xptr,LA_SIZE+PA_SIZE+(4+0)*8(sp) /* save exception pointer */
329 std pv,LA_SIZE+PA_SIZE+(4+2)*8(sp) /* save data segment pointer */
330 mflr r0 /* save return address */
331 std r0,LA_SIZE+PA_SIZE+(4+3)*8(sp)
333 std t0, LA_SIZE+PA_SIZE+(4+4)*8(sp) /* maybe-leaf flag */
335 mr a0,xptr /* pass exception pointer */
336 mr a1,xpc /* pass exception pc */
337 mr a2,pv /* pass data segment pointer */
338 addi a3,sp,LA_SIZE+PA_SIZE+(ARG_CNT+TMP_CNT)*8+(4+6)*8
341 L_asm_handle_exception_continue:
342 bl exceptions_handle_exception
345 beq L_asm_handle_exception_not_catched
347 mr xpc,v0 /* move handlerpc into xpc */
348 ld xptr,LA_SIZE+PA_SIZE+(4+0)*8(sp) /* restore exception pointer */
349 ld pv,LA_SIZE+PA_SIZE+(4+2)*8(sp) /* restore data segment pointer */
350 ld r0,LA_SIZE+PA_SIZE+(4+3)*8(sp) /* restore return address */
352 ld t0,LA_SIZE+PA_SIZE+(4+4)*8(sp) /* get maybe-leaf flag */
353 addi sp,sp,LA_SIZE+PA_SIZE+(4+6)*8 /* free stack frame */
356 beq L_asm_handle_exception_no_leaf
358 RESTORE_ARGUMENT_REGISTERS(0) /* if this is a leaf method, we have */
359 RESTORE_TEMPORARY_REGISTERS(ARG_CNT)/* to restore arg and temp registers */
361 addi sp,sp,(ARG_CNT+TMP_CNT)*8 /* remove maybe-leaf stackframe */
363 L_asm_handle_exception_no_leaf:
364 mtctr xpc /* jump to the handler */
367 L_asm_handle_exception_not_catched:
368 ld xptr,LA_SIZE+PA_SIZE+(4+0)*8(sp) /* restore exception pointer */
369 ld pv,LA_SIZE+PA_SIZE+(4+2)*8(sp) /* restore data segment pointer */
370 ld r0,LA_SIZE+PA_SIZE+(4+3)*8(sp) /* restore return address */
372 ld t0,LA_SIZE+PA_SIZE+(4+4)*8(sp) /* get maybe-leaf flag */
373 addi sp,sp,LA_SIZE+PA_SIZE+(4+6)*8 /* free stack frame */
376 beq L_asm_handle_exception_no_leaf_stack
378 addi sp,sp,(ARG_CNT+TMP_CNT)*8 /* remove maybe-leaf stackframe */
379 li t0,0 /* clear the maybe-leaf flag */
381 L_asm_handle_exception_no_leaf_stack:
382 lwz t1,FrameSize(pv) /* get frame size */
383 add t1,sp,t1 /* pointer to save area */
385 lwz t2,IsLeaf(pv) /* is leaf procedure */
387 bne L_asm_handle_exception_no_ra_restore
389 ld r0,LA_LR_OFFSET(t1) /* restore ra */
392 L_asm_handle_exception_no_ra_restore:
393 mflr xpc /* the new xpc is ra */
394 mr t4,xpc /* save RA */
395 lwz t2,IntSave(pv) /* t1 = saved int register count */
398 mflr t3 /* t3 = current pc */
399 addi t3,t3,(ex_int2-ex_int1)@l
400 slwi t2,t2,2 /* t2 = register count * 4 */
401 subf t3,t2,t3 /* t3 = IntSave - t2 */
416 subf t1,t2,t1 /* t1 = t1 - register count * 4 */
421 addi t3,t3,(ex_flt2-ex_flt1)@l
422 slwi t2,t2,2 /* t2 = register count * 4 */
423 subf t3,t2,t3 /* t3 = FltSave - t2 */
439 mtlr t4 /* restore RA */
441 add sp,sp,t1 /* unwind stack */
442 b L_asm_handle_exception_stack_loop
445 /* asm_abstractmethoderror *****************************************************
447 Creates and throws an AbstractMethodError.
449 *******************************************************************************/
451 asm_abstractmethoderror:
453 std r0,LA_LR_OFFSET(sp)
454 stdu sp,-LA_SIZE_ALIGNED(sp) /* preserve linkage area */
455 addi a0,sp,LA_SIZE_ALIGNED /* pass java sp */
456 mr a1,r0 /* pass exception address */
457 bl exceptions_asm_new_abstractmethoderror
458 ld r0,LA_SIZE_ALIGNED+LA_LR_OFFSET(sp)
459 mtlr r0 /* restore return address */
460 addi sp,sp,LA_SIZE_ALIGNED
462 mr xptr,v0 /* get exception pointer */
463 mr xpc,r0 /* we can't use r0 directly in addi */
464 addi xpc,xpc,-4 /* exception address is ra - 4 */
465 b L_asm_handle_nat_exception
468 #if defined(ENABLE_REPLACEMENT)
470 /* asm_replacement_out *********************************************************
472 This code is jumped to from the replacement-out stubs that are executed
473 when a thread reaches an activated replacement point.
475 The purpose of asm_replacement_out is to read out the parts of the
476 execution state that cannot be accessed from C code, store this state,
477 and then call the C function replace_me.
480 16 start of stack inside method to replace
481 0 rplpoint * info on the replacement point that was reached
483 NOTE: itmp3 has been clobbered by the replacement-out stub!
485 *******************************************************************************/
487 /* some room to accomodate changes of the stack frame size during replacement */
488 /* XXX we should find a cleaner solution here */
489 #define REPLACEMENT_ROOM 512
492 /* create stack frame */
493 addi sp,sp,-(sizeexecutionstate + REPLACEMENT_ROOM) /* XXX align */
495 /* save link register */
498 /* save registers in execution state */
499 std r0 ,( 0*8+offes_intregs)(sp)
500 std r1 ,( 1*8+offes_intregs)(sp)
501 std r2 ,( 2*8+offes_intregs)(sp)
502 std r3 ,( 3*8+offes_intregs)(sp)
503 std r4 ,( 4*8+offes_intregs)(sp)
504 std r5 ,( 5*8+offes_intregs)(sp)
505 std r6 ,( 6*8+offes_intregs)(sp)
506 std r7 ,( 7*8+offes_intregs)(sp)
507 std r8 ,( 8*8+offes_intregs)(sp)
508 std r9 ,( 9*8+offes_intregs)(sp)
509 std r10,(10*8+offes_intregs)(sp)
510 std r11,(11*8+offes_intregs)(sp)
511 std r12,(12*8+offes_intregs)(sp)
512 std r13,(13*8+offes_intregs)(sp)
513 std r14,(14*8+offes_intregs)(sp)
514 std r15,(15*8+offes_intregs)(sp)
515 std r16,(16*8+offes_intregs)(sp) /* link register */
516 std r17,(17*8+offes_intregs)(sp)
517 std r18,(18*8+offes_intregs)(sp)
518 std r19,(19*8+offes_intregs)(sp)
519 std r20,(20*8+offes_intregs)(sp)
520 std r21,(21*8+offes_intregs)(sp)
521 std r22,(22*8+offes_intregs)(sp)
522 std r23,(23*8+offes_intregs)(sp)
523 std r24,(24*8+offes_intregs)(sp)
524 std r25,(25*8+offes_intregs)(sp)
525 std r26,(26*8+offes_intregs)(sp)
526 std r27,(27*8+offes_intregs)(sp)
527 std r28,(28*8+offes_intregs)(sp)
528 std r29,(29*8+offes_intregs)(sp)
529 std r30,(30*8+offes_intregs)(sp)
530 std r31,(31*8+offes_intregs)(sp)
532 stfd fr0 ,( 0*8+offes_fltregs)(sp)
533 stfd fr1 ,( 1*8+offes_fltregs)(sp)
534 stfd fr2 ,( 2*8+offes_fltregs)(sp)
535 stfd fr3 ,( 3*8+offes_fltregs)(sp)
536 stfd fr4 ,( 4*8+offes_fltregs)(sp)
537 stfd fr5 ,( 5*8+offes_fltregs)(sp)
538 stfd fr6 ,( 6*8+offes_fltregs)(sp)
539 stfd fr7 ,( 7*8+offes_fltregs)(sp)
540 stfd fr8 ,( 8*8+offes_fltregs)(sp)
541 stfd fr9 ,( 9*8+offes_fltregs)(sp)
542 stfd fr10,(10*8+offes_fltregs)(sp)
543 stfd fr11,(11*8+offes_fltregs)(sp)
544 stfd fr12,(12*8+offes_fltregs)(sp)
545 stfd fr13,(13*8+offes_fltregs)(sp)
546 stfd fr14,(14*8+offes_fltregs)(sp)
547 stfd fr15,(15*8+offes_fltregs)(sp)
548 stfd fr16,(16*8+offes_fltregs)(sp)
549 stfd fr17,(17*8+offes_fltregs)(sp)
550 stfd fr18,(18*8+offes_fltregs)(sp)
551 stfd fr19,(19*8+offes_fltregs)(sp)
552 stfd fr20,(20*8+offes_fltregs)(sp)
553 stfd fr21,(21*8+offes_fltregs)(sp)
554 stfd fr22,(22*8+offes_fltregs)(sp)
555 stfd fr23,(23*8+offes_fltregs)(sp)
556 stfd fr24,(24*8+offes_fltregs)(sp)
557 stfd fr25,(25*8+offes_fltregs)(sp)
558 stfd fr26,(26*8+offes_fltregs)(sp)
559 stfd fr27,(27*8+offes_fltregs)(sp)
560 stfd fr28,(28*8+offes_fltregs)(sp)
561 stfd fr29,(29*8+offes_fltregs)(sp)
562 stfd fr30,(30*8+offes_fltregs)(sp)
563 stfd fr31,(31*8+offes_fltregs)(sp)
565 /* calculate sp of method */
566 addi itmp1,sp,(sizeexecutionstate + REPLACEMENT_ROOM + 4*4)
567 stw itmp1,(offes_sp)(sp)
570 stw pv,(offes_pv)(sp)
572 /* call replace_me */
573 lwz a0,-(4*4)(itmp1) /* arg0: rplpoint * */
574 mr a1,sp /* arg1: execution state */
575 addi sp,sp,-(LA_SIZE_ALIGNED)
576 b replace_me /* call C function replace_me */
578 /* asm_replacement_in **********************************************************
580 This code writes the given execution state and jumps to the replacement
583 This function never returns!
585 NOTE: itmp3 is not restored!
588 void asm_replacement_in(executionstate *es);
590 *******************************************************************************/
593 /* a0 == executionstate *es */
595 /* set new sp and pv */
599 /* copy registers from execution state */
600 ld r0 ,( 0*8+offes_intregs)(a0)
603 /* a0 is loaded below */
604 ld r4 ,( 4*8+offes_intregs)(a0)
605 ld r5 ,( 5*8+offes_intregs)(a0)
606 ld r6 ,( 6*8+offes_intregs)(a0)
607 ld r7 ,( 7*8+offes_intregs)(a0)
608 ld r8 ,( 8*8+offes_intregs)(a0)
609 ld r9 ,( 9*8+offes_intregs)(a0)
610 ld r10,(10*8+offes_intregs)(a0)
611 ld r11,(11*8+offes_intregs)(a0)
612 ld r12,(12*8+offes_intregs)(a0)
614 ld r14,(14*8+offes_intregs)(a0)
615 ld r15,(15*8+offes_intregs)(a0)
616 ld r16,(16*8+offes_intregs)(a0) /* link register */
617 ld r17,(17*8+offes_intregs)(a0)
618 ld r18,(18*8+offes_intregs)(a0)
619 ld r19,(19*8+offes_intregs)(a0)
620 ld r20,(20*8+offes_intregs)(a0)
621 ld r21,(21*8+offes_intregs)(a0)
622 ld r22,(22*8+offes_intregs)(a0)
623 ld r23,(23*8+offes_intregs)(a0)
624 ld r24,(24*8+offes_intregs)(a0)
625 ld r25,(25*8+offes_intregs)(a0)
626 ld r26,(26*8+offes_intregs)(a0)
627 ld r27,(27*8+offes_intregs)(a0)
628 ld r28,(28*8+offes_intregs)(a0)
629 ld r29,(29*8+offes_intregs)(a0)
630 ld r30,(30*8+offes_intregs)(a0)
631 ld r31,(31*8+offes_intregs)(a0)
633 lfd fr0 ,( 0*8+offes_fltregs)(a0)
634 lfd fr1 ,( 1*8+offes_fltregs)(a0)
635 lfd fr2 ,( 2*8+offes_fltregs)(a0)
636 lfd fr3 ,( 3*8+offes_fltregs)(a0)
637 lfd fr4 ,( 4*8+offes_fltregs)(a0)
638 lfd fr5 ,( 5*8+offes_fltregs)(a0)
639 lfd fr6 ,( 6*8+offes_fltregs)(a0)
640 lfd fr7 ,( 7*8+offes_fltregs)(a0)
641 lfd fr8 ,( 8*8+offes_fltregs)(a0)
642 lfd fr9 ,( 9*8+offes_fltregs)(a0)
643 lfd fr10,(10*8+offes_fltregs)(a0)
644 lfd fr11,(11*8+offes_fltregs)(a0)
645 lfd fr12,(12*8+offes_fltregs)(a0)
646 lfd fr13,(13*8+offes_fltregs)(a0)
647 lfd fr14,(14*8+offes_fltregs)(a0)
648 lfd fr15,(15*8+offes_fltregs)(a0)
649 lfd fr16,(16*8+offes_fltregs)(a0)
650 lfd fr17,(17*8+offes_fltregs)(a0)
651 lfd fr18,(18*8+offes_fltregs)(a0)
652 lfd fr19,(19*8+offes_fltregs)(a0)
653 lfd fr20,(20*8+offes_fltregs)(a0)
654 lfd fr21,(21*8+offes_fltregs)(a0)
655 lfd fr22,(22*8+offes_fltregs)(a0)
656 lfd fr23,(23*8+offes_fltregs)(a0)
657 lfd fr24,(24*8+offes_fltregs)(a0)
658 lfd fr25,(25*8+offes_fltregs)(a0)
659 lfd fr26,(26*8+offes_fltregs)(a0)
660 lfd fr27,(27*8+offes_fltregs)(a0)
661 lfd fr28,(28*8+offes_fltregs)(a0)
662 lfd fr29,(29*8+offes_fltregs)(a0)
663 lfd fr30,(30*8+offes_fltregs)(a0)
664 lfd fr31,(31*8+offes_fltregs)(a0)
666 /* restore link register */
672 ld itmp3,offes_pc(a0)
676 ld a0,(3*8+offes_intregs)(a0)
678 /* jump to new code */
683 #endif /* defined(ENABLE_REPLACEMENT) */
685 /* asm_cacheflush **************************************************************
686 copied from linux/arch/ppc64/kernel/vdso64/cacheflush.S
687 assumes 128 byte cache line size.
688 All registers used may be trashed for fun and profit.
689 *******************************************************************************/
694 .quad .asm_cacheflush,.TOC.@tocbase,0
696 .size asm_cacheflush, 24
697 .type .asm_cacheflush,@function
698 .globl .asm_cacheflush
700 /* construct the AND mask */
701 li r6, 0xffffffffffff8000
702 ori r6,r6,0x000000000000ff80
729 /* disable exec-stacks ********************************************************/
731 #if defined(__linux__) && defined(__ELF__)
732 .section .note.GNU-stack,"",%progbits
737 * These are local overrides for various environment variables in Emacs.
738 * Please do not remove this and leave it at the end of the file, where
739 * Emacs will automagically detect them.
740 * ---------------------------------------------------------------------
743 * indent-tabs-mode: t
747 * vim:noexpandtab:sw=4:ts=4: