CACAO
stubs.hpp
Go to the documentation of this file.
1 /* src/vm/jit/stubs.hpp - JIT stubs
2 
3  Copyright (C) 2008 Theobroma Systems Ltd.
4 
5  This file is part of CACAO.
6 
7  This program is free software; you can redistribute it and/or
8  modify it under the terms of the GNU General Public License as
9  published by the Free Software Foundation; either version 2, or (at
10  your option) any later version.
11 
12  This program is distributed in the hope that it will be useful, but
13  WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program; if not, write to the Free Software
19  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
20  02110-1301, USA.
21 
22 */
23 
24 
25 #ifndef _STUBS_HPP
26 #define _STUBS_HPP
27 
28 #include "config.h"
29 #include "vm/global.hpp" // for functionptr
30 
31 struct builtintable_entry;
32 struct codeinfo;
33 struct methodinfo;
34 
35 
36 /**
37  * Class for compiler stub generation.
38  */
39 class CompilerStub {
40 public:
41  static inline int get_code_size();
42 
43  static void* generate(methodinfo* m);
44  static void remove(void* stub);
45 };
46 
47 
48 /**
49  * Class for builtin stub generation.
50  */
51 class BuiltinStub {
52 public:
53  static void generate(methodinfo* m, builtintable_entry* bte);
54 };
55 
56 
58 public:
59  static void *stubcode;
60  static void generate();
61 };
62 
63 /**
64  * Class for native stub generation.
65  */
66 class NativeStub {
67 public:
68  static codeinfo* generate(methodinfo* m, functionptr f);
69  static void remove(void* stub);
70 };
71 
72 
73 // Include machine dependent implementation.
74 #include "md-stubs.hpp"
75 
76 #endif // _STUBS_HPP
77 
78 
79 /*
80  * These are local overrides for various environment variables in Emacs.
81  * Please do not remove this and leave it at the end of the file, where
82  * Emacs will automagically detect them.
83  * ---------------------------------------------------------------------
84  * Local variables:
85  * mode: c++
86  * indent-tabs-mode: t
87  * c-basic-offset: 4
88  * tab-width: 4
89  * End:
90  * vim:noexpandtab:sw=4:ts=4:
91  */
Class for builtin stub generation.
Definition: stubs.hpp:51
static void * stubcode
Definition: stubs.hpp:59
void(* functionptr)(void)
Definition: global.hpp:39
static int get_code_size()
Return the code size of a compiler on the aarch64 architecture.
Definition: md-stubs.hpp:38
static void * generate(methodinfo *m)
Wrapper for codegen_emit_stub_compiler.
Definition: stubs.cpp:61
static void generate()
Definition: stubs.cpp:262
Class for native stub generation.
Definition: stubs.hpp:66
Definition: builtin.hpp:60
static void generate(methodinfo *m, builtintable_entry *bte)
Wrapper for codegen_emit_stub_native.
Definition: stubs.cpp:192
static codeinfo * generate(methodinfo *m, functionptr f)
Wrapper for codegen_emit_stub_native.
Definition: stubs.cpp:282
Class for compiler stub generation.
Definition: stubs.hpp:39