Major file restructuring.
[cacao.git] / asmpart.h
1 /* asmpart.h - 
2
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
7
8    This file is part of CACAO.
9
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.
14
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.
19
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
23    02111-1307, USA.
24
25    Contact: cacao@complang.tuwien.ac.at
26
27    Authors: Reinhard Grafl
28             Andreas Krall
29
30    $Id: asmpart.h 557 2003-11-02 22:51:59Z twisti $
31
32 */
33
34
35 #include "global.h"
36
37 /* 
38    determines if the byte support instruction set (21164a and higher)
39    is available.
40 */
41 int has_no_x_instr_set();
42
43 void synchronize_caches();
44
45
46 /* 
47    invokes the compiler for untranslated JavaVM methods.
48    Register R0 contains a pointer to the method info structure
49    (prepared by createcompilerstub).
50 */
51 void asm_call_jit_compiler();
52
53
54 /* 
55    This function calls a Java-method (which possibly needs compilation)
56    with up to 4 parameters. This function calls a Java-method (which
57    possibly needs compilation) with up to 4 parameters.
58 */
59 java_objectheader *asm_calljavamethod(methodinfo *m, void *arg1, void *arg2,
60                                       void *arg3, void *arg4);
61
62 /* 
63    This function calls a Java-method (which possibly needs compilation)
64    with up to 4 parameters. This function calls a Java-method (which
65    possibly needs compilation) with up to 4 parameters. 
66    also supports a return value
67 */
68 java_objectheader *asm_calljavafunction(methodinfo *m, void *arg1, void *arg2,
69                                         void *arg3, void *arg4);
70
71 void asm_handle_exception();
72 void asm_handle_nat_exception();
73
74 /* 
75    gets the class of the caller from the stack frame
76 */
77 methodinfo *asm_getcallingmethod();
78
79
80 /* 
81    This funtion saves all callee saved registers and calls the function
82    which is passed as parameter.
83    This function is needed by the garbage collector, which needs to access
84    all registers which are stored on the stack. Unused registers are
85    cleared to avoid interferances with the GC.
86 */
87 void asm_dumpregistersandcall(functionptr f);
88
89
90 void *asm_switchstackandcall(void *stack, void *func, void **stacktopsave, void * p);
91
92 void asm_builtin_trace();
93 void asm_builtin_exittrace();
94
95
96 /*
97  * These are local overrides for various environment variables in Emacs.
98  * Please do not remove this and leave it at the end of the file, where
99  * Emacs will automagically detect them.
100  * ---------------------------------------------------------------------
101  * Local variables:
102  * mode: c
103  * indent-tabs-mode: t
104  * c-basic-offset: 4
105  * tab-width: 4
106  * End:
107  */