* src/vm/jit/x86_64/asmpart.S (asm_abstractmethoderror): Keep stack aligned.
[cacao.git] / src / vm / jit / x86_64 / asmpart.S
index 5807491ecbac01e65242b9c65be0c10615d4faaa..bfeb1e0fe8f44a5a13750c4689f357f194b87d43 100644 (file)
@@ -1,6 +1,6 @@
 /* src/vm/jit/x86_64/asmpart.S - Java-C interface functions for x86_64
 
-   Copyright (C) 1996-2005, 2006, 2007, 2008
+   Copyright (C) 1996-2012
    CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
 
    This file is part of CACAO.
@@ -56,8 +56,6 @@
        .globl asm_builtin_d2i
        .globl asm_builtin_d2l
 
-       .globl asm_get_cycle_count
-
 
 /********************* function asm_calljavafunction ***************************
 *                                                                              *
@@ -316,12 +314,14 @@ noflt:
 *******************************************************************************/
 
 asm_abstractmethoderror:
+       sub     $8,sp                       /* keep stack aligned                 */
        mov     sp,a0                       /* pass java sp                       */
-       add     $1*8,a0
-       mov     0*8(sp),a1                  /* pass exception address             */
+       add     $2*8,a0
+       mov     1*8(sp),a1                  /* pass exception address             */
        sub     $3,a1
        call    exceptions_asm_new_abstractmethoderror@PLT
                                            /* exception pointer is return value  */
+       pop     xpc                         /* dummy pop                          */
        pop     xpc                         /* get exception address              */
        sub     $3,xpc                      /* exception address is ra - 3        */
        jmp     L_asm_handle_exception
@@ -389,20 +389,6 @@ asm_builtin_d2l:
        ret
 
 
-/* asm_get_cycle_count *********************************************************
-
-   Get the current time-stamp counter from the CPU.
-
-*******************************************************************************/
-
-asm_get_cycle_count:
-       rdtsc
-       shl $0x20, %rdx
-       mov %eax, %eax
-       or %rdx, %rax
-       ret
-
-
 /* disable exec-stacks ********************************************************/
 
 #if defined(__linux__) && defined(__ELF__)