* Merged in twisti-branch.
[cacao.git] / src / vm / jit / asmpart.h
index 9d74b0592c7b2c4aa56084a9c2943dfa743e80d8..e1e614ccf8e00507c91b8690ff41ec1e1ea46f5a 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 5145 2006-07-17 11:48:38Z twisti $
+   $Id: asmpart.h 7577 2007-03-25 20:55:06Z twisti $
 
 */
 
 #include "config.h"
 #include "vm/types.h"
 
-
 #if defined(ENABLE_THREADS)
-# include "threads/native/threads.h"
-# include "threads/native/critical.h"
+# 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 ****************************************************************/
 #endif /* defined(ENABLE_JIT) */
 
 
-typedef struct castinfo castinfo;
-
-struct castinfo {
-       s4 super_baseval;
-       s4 super_diffval;
-       s4 sub_baseval;
-};
-
-
 /* function prototypes ********************************************************/
 
 /* machine dependent initialization */
@@ -114,6 +95,11 @@ float  asm_vm_call_method_float(methodinfo *m, s4 vmargscount, vm_arg *vmargs);
 double asm_vm_call_method_double(methodinfo *m, s4 vmargscount, vm_arg *vmargs);
 
 void   asm_vm_call_method_exception_handler(void);
+
+/* asm_vm_call_method_end is a dummy symbol marking the end of the asm_vm_call_method
+ * function and is used to insert the coderange into the avl tree.
+ */
+void   asm_vm_call_method_end(void);
 #endif
 
 #if defined(ENABLE_INTRP)
@@ -138,22 +124,30 @@ 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_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(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