GNU header update.
[cacao.git] / src / vm / jit / asmpart.h
index 7a4d792023ee0a75ef95ba0316966b6e0cdd392c..3f9a2df359415b98e0cf05b00ec5df690496e590 100644 (file)
@@ -1,9 +1,9 @@
-/* asmpart.h - prototypes for machine specfic functions
+/* vm/jit/asmpart.h - prototypes for machine specfic functions
 
-   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
-   R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser,
-   M. Probst, S. Ring, E. Steiner, C. Thalinger, D. Thuernbeck,
-   P. Tomsich, J. Wenninger
+   Copyright (C) 1996-2005 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
 
    This file is part of CACAO.
 
@@ -29,7 +29,7 @@
 
    Changes: Christian Thalinger
 
-   $Id: asmpart.h 1129 2004-06-05 14:37:14Z twisti $
+   $Id: asmpart.h 1735 2004-12-07 14:33:27Z twisti $
 
 */
 
 #ifndef _ASMPART_H
 #define _ASMPART_H
 
-#include "global.h"
-#include "jni.h"
-#include "threads/thread.h"
+#include "native/jni.h"
+#include "vm/global.h"
 
+#if defined(USE_THREADS)
+# if defined(NATIVE_THREADS)
+#  include "threads/native/threads.h"
+# else
+#  include "threads/green/threads.h"
+# endif
+#endif
+
+
+typedef struct castinfo castinfo;
+
+struct castinfo {
+       s4 super_baseval;
+       s4 super_diffval;
+       s4 sub_baseval;
+};
+
+
+#if defined(__ALPHA__)
 /* 
    determines if the byte support instruction set (21164a and higher)
    is available.
@@ -48,6 +66,7 @@
 int has_no_x_instr_set();
 
 void synchronize_caches();
+#endif
 
 
 /* 
@@ -91,6 +110,11 @@ void asm_check_clinit();
 
 void asm_handle_builtin_exception(classinfo *);
 void asm_throw_and_handle_exception();
+#ifdef __ALPHA__
+void asm_throw_and_handle_nat_exception();
+void asm_refillin_and_handle_exception();
+void asm_throw_and_handle_arrayindexoutofbounds_exception();
+#endif
 void asm_throw_and_handle_hardware_arithmetic_exception();
 
 java_objectarray* Java_java_lang_VMSecurityManager_getClassContext(JNIEnv *env, jclass clazz);
@@ -104,9 +128,18 @@ void asm_builtin_trace();
 void asm_builtin_exittrace();
 
 #if defined(USE_THREADS) && defined(NATIVE_THREADS)
-extern threadcritnode *asm_criticalsections;
+extern threadcritnode asm_criticalsections;
+#endif
+
+void asm_getclassvalues_atomic(vftbl_t *super, vftbl_t *sub, castinfo *out);
+
+void asm_prepare_native_stackinfo(void*ret,void*stackbegin);
+void asm_remove_native_stackinfo();
+
+#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
-void asm_getclassvalues_atomic(vftbl *super, vftbl *sub, castinfo *out);
 
 #endif /* _ASMPART_H */