* Merged in twisti-branch.
[cacao.git] / src / vm / jit / arm / asmpart.S
index 4f4ba3602ccb4e7c7a3f91adbb01e1ebd262d206..ff95759430d0a2c356e854d359eab3712ccc876a 100644 (file)
@@ -22,7 +22,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: asmpart.S 7227 2007-01-18 13:21:36Z twisti $
+   $Id: asmpart.S 7454 2007-03-05 15:40:48Z tbfg $
 
 */
 
@@ -48,6 +48,7 @@
        .globl asm_vm_call_method_float
        .globl asm_vm_call_method_double
        .globl asm_vm_call_method_exception_handler
+       .globl asm_vm_call_method_end
 
        .globl asm_call_jit_compiler
 
@@ -196,6 +197,7 @@ asm_vm_call_method_float:
         b asm_debug
 asm_vm_call_method_double:
         mov a0,#0x52
+asm_vm_call_method_end:
         b asm_debug
 
 
@@ -216,10 +218,11 @@ asm_vm_call_method_double:
 *                                                                              *
 *******************************************************************************/
 
-#define MYSTACKSIZE (5*4)
+#define MYSTACKSIZE (6*4)
 
 asm_call_jit_compiler:
        SAVE_ARGUMENT_REGISTERS             /* save our argument registers & LR   */
+       sub   sp, sp, #4                    /* keep stack 8-byte aligned          */
 
        mov   a0, itmp1                     /* pass methodinfo pointer            */
        mov   a1, mptr                      /* pass method pointer                */
@@ -231,6 +234,7 @@ asm_call_jit_compiler:
        tst   itmp1,itmp1                   /* check for exeption                 */
        beq   L_asm_call_jit_compiler_exception
 
+       add   sp, sp, #4                    /* keep stack 8-byte aligned          */
        RESTORE_ARGUMENT_REGISTERS          /* load our argument registers & LR   */
 
        mov   ip, itmp1
@@ -240,6 +244,7 @@ L_asm_call_jit_compiler_exception:
        bl    exceptions_get_and_clear_exception
        mov   xptr, res1                    /* get exception                      */
 
+       add   sp, sp, #4                    /* keep stack 8-byte aligned          */
        RESTORE_ARGUMENT_REGISTERS          /* load LR                            */
 
        sub   xpc, lr, #4                   /* xpc = instruction that called us   */
@@ -343,7 +348,7 @@ asm_handle_exception_not_catched:
 *                                                                              *
 *******************************************************************************/
 
-#define PATCHSTACKSIZE 7*4
+#define PATCHSTACKSIZE 8*4
 
 asm_patcher_wrapper:
        mov   itmp3, sp                     /* preserve original SP in ITMP3      */
@@ -365,8 +370,8 @@ asm_patcher_wrapper:
 
        add   sp, sp, #PATCHSTACKSIZE       /* remove patcher stack frame         */
 
-       ldr   itmp3, [sp, #-4]              /* restore ITMP3 for calling method   */
-       ldr   pc, [sp, #-12]                /* jump to new patched code           */
+       ldr   itmp3, [sp, #-8]              /* restore ITMP3 for calling method   */
+       ldr   pc, [sp, #-16]                /* jump to new patched code           */
 
 L_asm_patcher_wrapper_exception:
        mov   xptr, itmp3                   /* get exception                      */