1 /* src/vm/jit/asmpart.h - prototypes for machine specfic functions
3 Copyright (C) 1996-2005, 2006, 2007 R. Grafl, A. Krall, C. Kruegel,
4 C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
5 E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
6 J. Wenninger, Institut f. Computersprachen - TU Wien
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., 51 Franklin Street, Fifth Floor, Boston, MA
37 #if defined(ENABLE_THREADS)
38 # include "threads/critical.h"
41 #include "vm/global.h"
44 #include "vmcore/linker.h"
47 /* function prototypes ********************************************************/
49 /* machine dependent initialization */
53 invokes the compiler for untranslated JavaVM methods.
54 Register R0 contains a pointer to the method info structure
55 (prepared by createcompilerstub).
57 void asm_call_jit_compiler(void);
59 #if defined(ENABLE_JIT)
60 java_object_t *asm_vm_call_method(void *pv, uint64_t *array, int32_t stackargs);
61 int32_t asm_vm_call_method_int(void *pv, uint64_t *array, int32_t stackargs);
63 int64_t asm_vm_call_method_long(void *pv, uint64_t *array, int32_t stackargs);
64 float asm_vm_call_method_float(void *pv, uint64_t *array, int32_t stackargs);
65 double asm_vm_call_method_double(void *pv, uint64_t *array, int32_t stackargs);
67 void asm_vm_call_method_exception_handler(void);
68 void asm_vm_call_method_end(void);
71 #if defined(ENABLE_INTRP)
72 java_objectheader *intrp_asm_vm_call_method(methodinfo *m, s4 vmargscount,
75 s4 intrp_asm_vm_call_method_int(methodinfo *m, s4 vmargscount,
77 s8 intrp_asm_vm_call_method_long(methodinfo *m, s4 vmargscount,
79 float intrp_asm_vm_call_method_float(methodinfo *m, s4 vmargscount,
81 double intrp_asm_vm_call_method_double(methodinfo *m, s4 vmargscount,
85 /* exception handling functions */
87 #if defined(ENABLE_JIT)
88 void asm_handle_exception(void);
89 void asm_handle_nat_exception(void);
92 /* stub for throwing AbstractMethodError's */
93 #if defined(ENABLE_JIT)
94 void asm_abstractmethoderror(void);
97 #if defined(ENABLE_INTRP)
98 void intrp_asm_abstractmethoderror(void);
101 /* wrapper for code patching functions */
102 void asm_patcher_wrapper(void);
104 long asm_compare_and_swap(volatile long *p, long oldval, long newval);
105 void asm_memory_barrier(void);
107 /* cache flush function */
108 void asm_cacheflush(u1 *addr, s4 nbytes);
110 u8 asm_get_cycle_count(void);
112 #endif /* _ASMPART_H */
116 * These are local overrides for various environment variables in Emacs.
117 * Please do not remove this and leave it at the end of the file, where
118 * Emacs will automagically detect them.
119 * ---------------------------------------------------------------------
122 * indent-tabs-mode: t
126 * vim:noexpandtab:sw=4:ts=4: