CACAO
asmpart.hpp
Go to the documentation of this file.
1 /* src/vm/jit/asmpart.hpp - prototypes for machine specfic functions
2 
3  Copyright (C) 1996-2013
4  CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
5 
6  This file is part of CACAO.
7 
8  This program is free software; you can redistribute it and/or
9  modify it under the terms of the GNU General Public License as
10  published by the Free Software Foundation; either version 2, or (at
11  your option) any later version.
12 
13  This program is distributed in the hope that it will be useful, but
14  WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with this program; if not, write to the Free Software
20  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21  02110-1301, USA.
22 
23 */
24 
25 
26 #ifndef ASMPART_HPP_
27 #define ASMPART_HPP_ 1
28 
29 #include "config.h"
30 
31 #include <stdint.h>
32 
33 #include "vm/types.hpp"
34 
35 #include "vm/global.hpp"
36 #include "vm/vm.hpp"
37 
38 
39 /* function prototypes ********************************************************/
40 
41 extern "C" {
42 
43 /* machine dependent initialization */
44 s4 asm_md_init(void);
45 
46 #if !defined(JIT_COMPILER_VIA_SIGNAL)
47 /*
48  invokes the compiler for untranslated JavaVM methods.
49  Register R0 contains a pointer to the method info structure
50  (prepared by createcompilerstub).
51 */
52 void asm_call_jit_compiler(void);
53 #endif
54 
55 #if defined(ENABLE_JIT)
56 java_object_t *asm_vm_call_method(void *pv, uint64_t *array, int32_t stackargs);
57 int32_t asm_vm_call_method_int(void *pv, uint64_t *array, int32_t stackargs);
58 
59 int64_t asm_vm_call_method_long(void *pv, uint64_t *array, int32_t stackargs);
60 float asm_vm_call_method_float(void *pv, uint64_t *array, int32_t stackargs);
61 double asm_vm_call_method_double(void *pv, uint64_t *array, int32_t stackargs);
62 
64 void asm_vm_call_method_end(void);
65 #endif
66 
67 #if defined(ENABLE_INTRP)
68 java_objectheader *intrp_asm_vm_call_method(methodinfo *m, s4 vmargscount,
69  vm_arg *vmargs);
70 
72  vm_arg *vmargs);
74  vm_arg *vmargs);
75 float intrp_asm_vm_call_method_float(methodinfo *m, s4 vmargscount,
76  vm_arg *vmargs);
77 double intrp_asm_vm_call_method_double(methodinfo *m, s4 vmargscount,
78  vm_arg *vmargs);
79 #endif
80 
81 /* exception handling functions */
82 
83 #if defined(ENABLE_JIT)
84 void asm_handle_exception(void);
85 void asm_handle_nat_exception(void);
86 #endif
87 
88 #if defined(ENABLE_INTRP)
90 #endif
91 
92 /* wrapper for code patching functions */
93 void asm_patcher_wrapper(void);
94 
95 /* cache flush function */
96 void asm_cacheflush(void* addr, int nbytes);
97 
98 #if defined(ENABLE_ESCAPE_CHECK)
99 void asm_escape_check(java_object_t *obj);
100 #endif
101 
102 } // extern "C"
103 
104 #endif // _ASMPART_HPP_
105 
106 
107 /*
108  * These are local overrides for various environment variables in Emacs.
109  * Please do not remove this and leave it at the end of the file, where
110  * Emacs will automagically detect them.
111  * ---------------------------------------------------------------------
112  * Local variables:
113  * mode: c++
114  * indent-tabs-mode: t
115  * c-basic-offset: 4
116  * tab-width: 4
117  * End:
118  * vim:noexpandtab:sw=4:ts=4:
119  */
void asm_cacheflush(void *addr, int nbytes)
#define pv
Definition: md-asm.hpp:65
java_object_t * asm_vm_call_method(void *pv, uint64_t *array, int32_t stackargs)
java_objectheader * intrp_asm_vm_call_method(methodinfo *m, s4 vmargscount, vm_arg *vmargs)
Definition: asmpart.c:93
s4 intrp_asm_vm_call_method_int(methodinfo *m, s4 vmargscount, vm_arg *vmargs)
Definition: asmpart.c:109
double intrp_asm_vm_call_method_double(methodinfo *m, s4 vmargscount, vm_arg *vmargs)
Definition: asmpart.c:155
void asm_patcher_wrapper(void)
int64_t s8
Definition: types.hpp:48
int32_t asm_vm_call_method_int(void *pv, uint64_t *array, int32_t stackargs)
float asm_vm_call_method_float(void *pv, uint64_t *array, int32_t stackargs)
int64_t asm_vm_call_method_long(void *pv, uint64_t *array, int32_t stackargs)
void asm_vm_call_method_end(void)
s8 intrp_asm_vm_call_method_long(methodinfo *m, s4 vmargscount, vm_arg *vmargs)
Definition: asmpart.c:124
void intrp_asm_abstractmethoderror(void)
Definition: asmpart.c:292
int32_t s4
Definition: types.hpp:45
double asm_vm_call_method_double(void *pv, uint64_t *array, int32_t stackargs)
void asm_handle_exception(void)
float intrp_asm_vm_call_method_float(methodinfo *m, s4 vmargscount, vm_arg *vmargs)
Definition: asmpart.c:139
void asm_handle_nat_exception(void)
void asm_call_jit_compiler(void)
void asm_vm_call_method_exception_handler(void)
s4 asm_md_init(void)