patcher_builtin_new gets a contant_classref.
[cacao.git] / src / vm / jit / patcher.h
1 /* src/vm/jit/patcher.h - code patching functions
2
3    Copyright (C) 1996-2005 R. Grafl, A. Krall, C. Kruegel, C. Oates,
4    R. Obermaisser, M. Platter, M. Probst, S. Ring, E. Steiner,
5    C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich, J. Wenninger,
6    Institut f. Computersprachen - TU Wien
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: Christian Thalinger
28
29    Changes:
30
31    $Id: patcher.h 2334 2005-04-22 13:28:10Z twisti $
32
33 */
34
35 #ifndef _PATCHER_H
36 #define _PATCHER_H
37
38 #include "types.h"
39 #include "vm/global.h"
40
41
42 /* function prototypes ********************************************************/
43
44 bool patcher_get_putstatic(u1 *sp);
45 #define PATCHER_get_putstatic (functionptr) patcher_get_putstatic
46
47 #if defined(__I386__)
48
49 bool patcher_getfield(u1 *sp);
50 #define PATCHER_getfield (functionptr) patcher_getfield
51
52 bool patcher_putfield(u1 *sp);
53 #define PATCHER_putfield (functionptr) patcher_putfield
54
55 #else
56
57 bool patcher_get_putfield(u1 *sp);
58 #define PATCHER_get_putfield (functionptr) patcher_get_putfield
59
60 #endif /* defined(__I386__) */
61
62 bool patcher_builtin_new(constant_classref *cr, u1 *sp);
63
64 bool patcher_builtin_newarray(u1 *sp, constant_classref *cr);
65 bool patcher_builtin_multianewarray(u1 *sp, constant_classref *cr);
66 bool patcher_builtin_checkarraycast(u1 *sp, constant_classref *cr);
67 bool patcher_builtin_arrayinstanceof(u1 *sp, constant_classref *cr);
68
69 bool patcher_invokestatic_special(u1 *sp);
70 #define PATCHER_invokestatic_special (functionptr) patcher_invokestatic_special
71
72 bool patcher_invokevirtual(u1 *sp);
73 #define PATCHER_invokevirtual (functionptr) patcher_invokevirtual
74
75 bool patcher_invokeinterface(u1 *sp);
76 #define PATCHER_invokeinterface (functionptr) patcher_invokeinterface
77
78 bool patcher_checkcast_instanceof_flags(u1 *sp);
79 #define PATCHER_checkcast_instanceof_flags (functionptr) patcher_checkcast_instanceof_flags
80
81 bool patcher_checkcast_instanceof_interface(u1 *sp);
82 #define PATCHER_checkcast_instanceof_interface (functionptr) patcher_checkcast_instanceof_interface
83
84 bool patcher_checkcast_class(u1 *sp);
85 #define PATCHER_checkcast_class (functionptr) patcher_checkcast_class
86
87 bool patcher_instanceof_class(u1 *sp);
88 #define PATCHER_instanceof_class (functionptr) patcher_instanceof_class
89
90 bool patcher_clinit(u1 *sp);
91 #define PATCHER_clinit (functionptr) patcher_clinit
92
93 #endif /* _PATCHER_H */
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  * vim:noexpandtab:sw=4:ts=4:
108  */
109