Fixed PR99 (hopefully).
[cacao.git] / src / vm / jit / arm / asmpart.S
index d5da48d87c8f1ee8388ad56fb82e9cb36202fd03..d3f4b93fdddcc5802cb94e47dfe1b484b5dd327c 100644 (file)
@@ -1,9 +1,7 @@
 /* src/vm/jit/arm/asmpart.S - Java-C interface functions for ARM
 
-   Copyright (C) 1996-2005, 2006, 2007 R. Grafl, A. Krall, C. Kruegel,
-   C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
-   E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
-   J. Wenninger, Institut f. Computersprachen - TU Wien
+   Copyright (C) 1996-2005, 2006, 2007, 2008
+   CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
 
    This file is part of CACAO.
 
 
        .globl asm_cacheflush
 
-#if !defined(ENABLE_THREADS)
-asm_exceptionptr:
-       .word _no_threads_exceptionptr
-#endif
-
 
 /* asm_vm_call_method **********************************************************
 
@@ -76,25 +69,17 @@ asm_exceptionptr:
 
        .align  2
 
-       .word   0                           /* catch type all                     */
-       .word   0                           /* handler pc                         */
-       .word   0                           /* end pc                             */
-       .word   0                           /* start pc                           */
-       .word   1                           /* extable size                       */
-       .word   0                           /* line number table start            */
-       .word   0                           /* line number table size             */
        .word   0                           /* FltSave                            */
        .word   0                           /* IntSave                            */
        .word   0                           /* IsLeaf                             */
-       .word   0                           /* IsSync                             */
        .word   0                           /* FrameSize                          */
        .word   0                           /* CodeinfoPointer                    */
 
 asm_vm_call_method:
 asm_vm_call_method_int:
 asm_vm_call_method_long:
-/* asm_vm_call_method_float:
-asm_vm_call_method_double: */
+asm_vm_call_method_float:
+asm_vm_call_method_double:
        SAVE_SCRATCH_REGISTERS            /* save our personal scratch regs   */
        stmfd sp!, {v1}                   /* V1 is used to remember SP        */
        str   a0, [sp, #-4]!              /* store methods entrypoint         */
@@ -149,13 +134,6 @@ asm_vm_call_method_exception_handler:
        ldmfd sp!, {v1}
        RESTORE_SCRATCH_REGS_AND_RETURN   /* return to caller, restore regs   */
 
-asm_vm_call_method_float:
-       mov a0,#0x51
-       b asm_debug
-asm_vm_call_method_double:
-       mov a0,#0x52
-       b asm_debug
-
 asm_vm_call_method_end:
 
 
@@ -225,7 +203,7 @@ asm_handle_nat_exception:
        /*TODO:maybe make a macro out of it!!!*/
        SAVE_ARGUMENT_REGISTERS  
        mov   a0, lr
-       bl    md_codegen_get_pv_from_pc
+       bl    md_asm_codegen_get_pv_from_pc
        mov   ip, res1
        RESTORE_ARGUMENT_REGISTERS  
        /* fall through */
@@ -282,7 +260,7 @@ asm_handle_exception_not_catched:
        /*TODO:maybe make a macro out of it!!!*/
        SAVE_ARGUMENT_REGISTERS  
        mov   a0, lr
-       bl    md_codegen_get_pv_from_pc
+       bl    md_asm_codegen_get_pv_from_pc
        mov   ip, res1
        RESTORE_ARGUMENT_REGISTERS  
 
@@ -315,7 +293,9 @@ asm_abstractmethoderror:
 *                                                                              *
 *******************************************************************************/
 
-.equ sys_cacheflush,__ARM_NR_cacheflush /* syscall number for cache flushing  */
+L___ARM_NR_cacheflush:
+       .align 2
+       .word __ARM_NR_cacheflush
 
 asm_cacheflush:
        add   a1, a0, a1
@@ -326,20 +306,17 @@ asm_cacheflush:
           see "http://wiki.debian.org/ArmEabiPort" for additional details. */
 
        stmfd sp!, {r7}
-       mov   r7, #0x0f0000
-       add   r7, r7, #0x000002
-#endif
-
-#if 0
+       ldr   r7, L___ARM_NR_cacheflush
+       swi   0x0
+       ldmfd sp!, {r7}
+#else
+# if 0
        /* TWISTI: required on iyonix, maybe a linux-2.4 bug */
        mov   a0, #0x0
        mov   a1, #0xff000000
-#endif
+# endif
 
-       swi   sys_cacheflush
-
-#if defined(__ARM_EABI__)
-       ldmfd sp!, {r7}
+       swi   __ARM_NR_cacheflush
 #endif
 
        mov   pc, lr