* src/vm/jit/optimizing/profile.c (native/jni.h): Removed.
[cacao.git] / src / vm / jit / asmpart.h
index 738f4cb068a2228f6aff546f6c1ed2316fac8f1f..2a4a2395fd8e94258155ecaf4068e31ffcfad4ec 100644 (file)
@@ -1,6 +1,6 @@
 /* src/vm/jit/asmpart.h - prototypes for machine specfic functions
 
-   Copyright (C) 1996-2005, 2006 R. Grafl, A. Krall, C. Kruegel,
+   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
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   Contact: cacao@cacaojvm.org
-
-   Authors: Reinhard Grafl
-            Andreas Krall
-
-   Changes: Christian Thalinger
-            Edwin Steiner
-
-   $Id: asmpart.h 4908 2006-05-12 16:49:50Z edwin $
+   $Id: asmpart.h 7338 2007-02-13 00:17:22Z twisti $
 
 */
 
 #include "config.h"
 #include "vm/types.h"
 
-
-#if defined(USE_THREADS)
-# if defined(NATIVE_THREADS)
-#  include "threads/native/threads.h"
-#  include "threads/native/critical.h"
-# else
-#  include "threads/green/threads.h"
-# endif
+#if defined(ENABLE_THREADS)
+# include "threads/critical.h"
 #endif
 
 #include "vm/global.h"
-#include "vm/linker.h"
-#include "vm/resolve.h"
 #include "vm/vm.h"
+
 #include "vm/jit/replace.h"
-#include "vm/jit/stacktrace.h"
+
+#include "vmcore/linker.h"
 
 
 /* some macros ****************************************************************/
@@ -108,7 +94,6 @@ s4   asm_md_init(void);
 */
 void asm_call_jit_compiler(void);
 
-
 #if defined(ENABLE_JIT)
 java_objectheader *asm_vm_call_method(methodinfo *m, s4 vmargscount,
                                                                          vm_arg *vmargs);
@@ -135,13 +120,6 @@ double intrp_asm_vm_call_method_double(methodinfo *m, s4 vmargscount,
                                                                           vm_arg *vmargs);
 #endif
 
-
-/* We need these two labels in codegen.inc to add the asm_calljavafunction*'s
-   into the methodtable */
-#if defined(__I386__) || defined(__X86_64__)
-void calljava_xhandler2(void);
-#endif
-
 /* exception handling functions */
 
 #if defined(ENABLE_JIT)
@@ -149,20 +127,31 @@ void asm_handle_exception(void);
 void asm_handle_nat_exception(void);
 #endif
 
+/* stub for throwing AbstractMethodError's */
+#if defined(ENABLE_JIT)
+void asm_abstractmethoderror(void);
+#endif
+
+#if defined(ENABLE_INTRP)
+void intrp_asm_abstractmethoderror(void);
+#endif
+
 /* wrapper for code patching functions */
-void asm_wrapper_patcher(void);
+void asm_patcher_wrapper(void);
 
 /* functions for on-stack replacement */
+#if defined(ENABLE_REPLACEMENT)
 void asm_replacement_out(void);
-void asm_replacement_in(executionstate *es);
+void asm_replacement_in(executionstate_t *es, replace_safestack_t *st);
+#endif
 
-void *asm_switchstackandcall(void *stack, void *func, void **stacktopsave, void * p);
+long asm_compare_and_swap(volatile long *p, long oldval, long newval);
+void asm_memory_barrier(void);
 
-#if defined(USE_THREADS) && defined(NATIVE_THREADS)
+#if defined(ENABLE_THREADS)
 extern critical_section_node_t asm_criticalsections;
 #endif
 
-
 #if defined(ENABLE_JIT)
 void asm_getclassvalues_atomic(vftbl_t *super, vftbl_t *sub, castinfo *out);
 #endif
@@ -171,12 +160,6 @@ void asm_getclassvalues_atomic(vftbl_t *super, vftbl_t *sub, castinfo *out);
 void intrp_asm_getclassvalues_atomic(vftbl_t *super, vftbl_t *sub, castinfo *out);
 #endif
 
-
-#if defined(USE_THREADS) && !defined(NATIVE_THREADS)
-void asm_perform_threadswitch(u1 **from, u1 **to, u1 **stackTop);
-u1*  asm_initialize_thread_stack(void *func, u1 *stack);
-#endif
-
 /* cache flush function */
 void asm_cacheflush(u1 *addr, s4 nbytes);