* src/vm/builtin.c (builtin_print_cycles_stats): Added.
[cacao.git] / src / vm / jit / i386 / asmpart.S
index eb563e5a5211a3c53132b7e809ff9678e87e0b4c..a4d6b1270c818520ee2b89dd88fe68da3ea9d8aa 100644 (file)
@@ -31,7 +31,7 @@
    Changes: Joseph Wenninger
             Edwin Steiner
 
-   $Id: asmpart.S 4749 2006-04-11 10:20:18Z twisti $
+   $Id: asmpart.S 4792 2006-04-19 01:05:18Z edwin $
 
 */
 
@@ -81,6 +81,8 @@
        .globl asm_criticalsections
        .globl asm_getclassvalues_atomic
 
+       .globl asm_get_cycle_count
+
 
 /* asm_md_init *****************************************************************
 
@@ -827,6 +829,22 @@ asm_criticalsections:
 #endif
 
 
+/* asm_get_cycle_count *********************************************************
+
+   Get the current time-stamp counter from the CPU.
+
+*******************************************************************************/
+
+asm_get_cycle_count:
+       push    bp
+       mov     sp,bp                       /* save stackptr                      */
+
+       rdtsc
+
+       leave
+       ret
+
+
 /*
  * These are local overrides for various environment variables in Emacs.
  * Please do not remove this and leave it at the end of the file, where