Merged trunk and subtype.
[cacao.git] / src / vm / jit / argument.h
1 /* src/vm/jit/argument.h - argument passing from and to JIT methods
2
3    Copyright (C) 2007, 2008
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 _VM_JIT_ARGUMENT_H
27 #define _VM_JIT_ARGUMENT_H
28
29 #include "config.h"
30
31 #include <stdint.h>
32
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36
37 #include "vm/global.h"
38
39
40 /* function prototypes ********************************************************/
41
42 imm_union argument_jitarray_load(methoddesc *md, int32_t index,
43                                                                  uint64_t *arg_regs, uint64_t *stack);
44 void      argument_jitarray_store(methoddesc *md, int32_t index,
45                                                                   uint64_t *arg_regs, uint64_t *stack,
46                                                                   imm_union param);
47
48 imm_union argument_jitreturn_load(methoddesc *md, uint64_t *return_regs);
49 void      argument_jitreturn_store(methoddesc *md, uint64_t *return_regs,
50                                                                    imm_union ret);
51
52 uint64_t *argument_vmarray_from_valist(methodinfo *m, java_handle_t *o,
53                                                                            va_list ap);
54 uint64_t *argument_vmarray_from_jvalue(methodinfo *m, java_handle_t *o,
55                                                                            const jvalue *args);
56 uint64_t *argument_vmarray_from_objectarray(methodinfo *m, java_handle_t *o,
57                                                                                         java_handle_objectarray_t *params);
58
59 #ifdef __cplusplus
60 }
61 #endif
62
63 #endif /* _VM_JIT_ARGUMENT_H */
64
65
66 /*
67  * These are local overrides for various environment variables in Emacs.
68  * Please do not remove this and leave it at the end of the file, where
69  * Emacs will automagically detect them.
70  * ---------------------------------------------------------------------
71  * Local variables:
72  * mode: c
73  * indent-tabs-mode: t
74  * c-basic-offset: 4
75  * tab-width: 4
76  * End:
77  * vim:noexpandtab:sw=4:ts=4:
78  */