1 /* asmpart.h - prototypes for machine specfic functions
3 Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
4 R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser,
5 M. Probst, S. Ring, E. Steiner, C. Thalinger, D. Thuernbeck,
6 P. Tomsich, J. Wenninger
8 This file is part of CACAO.
10 This program is free software; you can redistribute it and/or
11 modify it under the terms of the GNU General Public License as
12 published by the Free Software Foundation; either version 2, or (at
13 your option) any later version.
15 This program is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
25 Contact: cacao@complang.tuwien.ac.at
27 Authors: Reinhard Grafl
30 Changes: Christian Thalinger
32 $Id: asmpart.h 1296 2004-07-10 17:02:15Z stefan $
42 #include "threads/thread.h"
45 determines if the byte support instruction set (21164a and higher)
48 int has_no_x_instr_set();
50 void synchronize_caches();
54 invokes the compiler for untranslated JavaVM methods.
55 Register R0 contains a pointer to the method info structure
56 (prepared by createcompilerstub).
58 void asm_call_jit_compiler();
62 This function calls a Java-method (which possibly needs compilation)
63 with up to 4 parameters. This function calls a Java-method (which
64 possibly needs compilation) with up to 4 parameters.
68 This function calls a Java-method (which possibly needs compilation)
69 with up to 4 parameters. This function calls a Java-method (which
70 possibly needs compilation) with up to 4 parameters.
71 also supports a return value
73 java_objectheader *asm_calljavafunction(methodinfo *m, void *arg1, void *arg2,
74 void *arg3, void *arg4);
75 java_objectheader *asm_calljavafunction2(methodinfo *m, u4 count, u4 size, void *callblock);
76 jdouble asm_calljavafunction2double(methodinfo *m, u4 count, u4 size, void *callblock);
77 jlong asm_calljavafunction2long(methodinfo *m, u4 count, u4 size, void *callblock);
79 /* We need these two labels in codegen.inc to add the asm_calljavafunction*'s
80 into the methodtable */
81 #if defined(__I386__) || defined(__X86_64__)
82 void calljava_xhandler();
83 void calljava_xhandler2();
87 void asm_handle_exception();
88 void asm_handle_nat_exception();
90 void asm_check_clinit();
92 void asm_handle_builtin_exception(classinfo *);
93 void asm_throw_and_handle_exception();
94 void asm_throw_and_handle_hardware_arithmetic_exception();
96 java_objectarray* Java_java_lang_VMSecurityManager_getClassContext(JNIEnv *env, jclass clazz);
97 stacktraceelement *asm_get_stackTrace();
99 /*java_lang_ClassLoader* Java_java_lang_VMSecurityManager_currentClassLoader(JNIEnv *env, jclass clazz);*/
101 void *asm_switchstackandcall(void *stack, void *func, void **stacktopsave, void * p);
103 void asm_builtin_trace();
104 void asm_builtin_exittrace();
106 #if defined(USE_THREADS) && defined(NATIVE_THREADS)
107 extern threadcritnode asm_criticalsections;
110 void asm_getclassvalues_atomic(vftbl_t *super, vftbl_t *sub, castinfo *out);
113 #endif /* _ASMPART_H */
117 * These are local overrides for various environment variables in Emacs.
118 * Please do not remove this and leave it at the end of the file, where
119 * Emacs will automagically detect them.
120 * ---------------------------------------------------------------------
123 * indent-tabs-mode: t