Merged revisions 7501-7598 via svnmerge from
[cacao.git] / src / vm / jit / powerpc64 / asmpart.S
index b500d5b253d9eaf181f22138cd7031a34e6ebb25..49961cd1b47a7a273025fd9ba331d2bda83677b2 100644 (file)
    Changes: Christian Thalinger
             Edwin Steiner
 
-   $Id: asmpart.S 6100 2006-12-01 11:38:47Z tbfg $
+   $Id: asmpart.S 7596 2007-03-28 21:05:53Z twisti $
 
 */
 
 
 #include "config.h"
 
+#define __ASSEMBLY__
+
 #include "md-abi.h"
 #include "md-asm.h"
 
 
 /* export functions ***********************************************************/
 
-#ifdef ENABLE_LIBJVM
-       .globl asm_vm_call_method
-       .globl asm_vm_call_method_int
-       .globl asm_vm_call_method_long
-       .globl asm_vm_call_method_float
-       .globl asm_vm_call_method_double
-#else
-       .globl .asm_vm_call_method
-       .globl .asm_vm_call_method_int
-       .globl .asm_vm_call_method_long
-       .globl .asm_vm_call_method_float
-       .globl .asm_vm_call_method_double
-#endif
        .globl asm_vm_call_method_exception_handler
+       .globl asm_vm_call_method_end
 
        .globl asm_call_jit_compiler
 
 
        .globl asm_patcher_wrapper
 
+#if defined(ENABLE_REPLACEMENT)
        .globl asm_replacement_out
        .globl .asm_replacement_in
+#endif
 
-       .globl .asm_cacheflush          /* no function descriptor needed, only called direct */
+       .globl asm_cacheflush
        .globl asm_criticalsections
-       .globl .asm_getclassvalues_atomic
+       .globl asm_getclassvalues_atomic
 
 
 /* asm_vm_call_method **********************************************************
        .quad   0                           /* codeinfo pointer                   */
 
 #ifdef ENABLE_LIBJVM
+       
+       .globl asm_vm_call_method
+       .globl asm_vm_call_method_int
+       .globl asm_vm_call_method_long
+       .globl asm_vm_call_method_float
+       .globl asm_vm_call_method_double
        .section ".opd","aw"
        .align 3
 
 #else
        asm_vm_call_method:
        .globl asm_vm_call_method
+       asm_vm_call_method_int:
+       .globl asm_vm_call_method_int
+       asm_vm_call_method_long:
+       .globl asm_vm_call_method_long
+       asm_vm_call_method_float:
+       .globl asm_vm_call_method_float
+       asm_vm_call_method_double:
+       .globl asm_vm_call_method_double
 #endif
 
 .asm_vm_call_method:
@@ -630,6 +636,8 @@ L_handle_fda12:
        lfd     fa12,offvmargdata(itmp1)
        b       L_register_copy
 
+asm_vm_call_method_end:
+       nop
 
 /* asm_call_jit_compiler *******************************************************
 
@@ -1071,6 +1079,7 @@ L_asm_patcher_wrapper_exception:
        addi    sp,sp,LA_SIZE+PA_SIZE+ARG_CNT*8+TMP_CNT*8+4*8+8*8
        b       L_asm_handle_exception
 
+#if defined(ENABLE_REPLACEMENT)
 
 /* asm_replacement_out *********************************************************
 
@@ -1285,10 +1294,22 @@ asm_replacement_out:
        mtctr   itmp3
        bctr
 
+#endif /* defined(ENABLE_REPLACEMENT) */
+
 /* asm_cacheflush **************************************************************
        copied from linux/arch/ppc64/kernel/vdso64/cacheflush.S
        assumes 128 byte cache line size.
+       All registers used may be trashed for fun and profit.
 *******************************************************************************/
+
+       .section ".opd","aw"
+       .align 3
+asm_cacheflush:
+               .quad   .asm_cacheflush,.TOC.@tocbase,0
+               .previous
+               .size asm_cacheflush, 24
+               .type .asm_cacheflush,@function
+               .globl .asm_cacheflush 
 .asm_cacheflush:
        /* construct the AND mask */
        li      r6,   0xffffffffffff8000
@@ -1318,7 +1339,19 @@ asm_replacement_out:
        isync
        blr
 
+/*
+               asm_getclassvalues_atomic 
+*/
+       .section ".opd","aw"
+       .align 3
+asm_getclassvalues_atomic:
+               .quad   .asm_getclassvalues_atomic,.TOC.@tocbase,0
+               .previous
+               .size asm_getclassvalues_atomic, 24
+               .type .asm_getclassvalues_atomic,@function
+               .globl .asm_getclassvalues_atomic
 .asm_getclassvalues_atomic:
+
 _crit_restart:
 _crit_begin:
        lwz     r6,offbaseval(r3)