ETISS 0.11.2
ExtendableTranslatingInstructionSetSimulator(version0.11.2)
Loading...
Searching...
No Matches
TCCJITLib.cpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-3-Clause
2//
3// This file is part of ETISS. It is licensed under the BSD 3-Clause License; you may not use this file except in
4// compliance with the License. You should have received a copy of the license along with this project. If not, see the
5// LICENSE file.
6
7// define a name for this library. this will be used to avoid name clashes with other libraries. in this example the
8// library is named "X". IMPORTANT this name MUST match the library name: e.g. X -> libX.so
9
10#define ETISS_LIBNAME TCCJIT
11
12#include "etiss/helper/JITLibrary.h" // defines the following functions
13
14#include "TCCJIT.h"
15
16extern "C"
17{
18
20 {
21 return "0.9.28rc";
22 }
23
25
27 {
28 // TODO
29 return 1; // number of cpu architectures provided
30 }
31 ETISS_PLUGIN_EXPORT const char *TCCJIT_nameJIT(unsigned index)
32 {
33 // TODO
34 switch (index)
35 {
36 case 0:
37 return "TCCJIT";
38 default:
39 return "";
40 }
41 }
42 ETISS_PLUGIN_EXPORT etiss::JIT *TCCJIT_createJIT(unsigned index, std::map<std::string, std::string> options)
43 {
44 // TODO
45 switch (index)
46 {
47 case 0:
48 // parse arguments?
49 return new TCCJIT();
50 default:
51 return 0;
52 }
53 }
55 {
56 delete arch;
57 }
58}
ETISS_PLUGIN_EXPORT etiss::CPUArch std::map< std::string, std::string > options
create new instance of the CPUArch type at index
defines the functions needed for a library that provides etiss::JIT implementations
ETISS_LIBRARYIF_VERSION_FUNC_IMPL ETISS_PLUGIN_EXPORT unsigned TCCJIT_countJIT()
Definition TCCJITLib.cpp:26
ETISS_PLUGIN_EXPORT etiss::JIT * TCCJIT_createJIT(unsigned index, std::map< std::string, std::string > options)
Definition TCCJITLib.cpp:42
ETISS_PLUGIN_EXPORT const char * TCCJIT_nameJIT(unsigned index)
Definition TCCJITLib.cpp:31
ETISS_PLUGIN_EXPORT const char * TCCJIT_versionInfo()
Definition TCCJITLib.cpp:19
ETISS_PLUGIN_EXPORT void TCCJIT_deleteJIT(etiss::JIT *arch)
Definition TCCJITLib.cpp:54
compiler interface for just in time compilation of generated C code
Definition JIT.h:29
#define ETISS_PLUGIN_EXPORT
#define ETISS_LIBRARYIF_VERSION_FUNC_IMPL
Definition Misc.h:47