ETISS 0.8.0
Extendable Translating Instruction Set Simulator (version 0.8.0)
LLVMJITLIB.cpp
Go to the documentation of this file.
1 /*
2 
3  @copyright
4 
5  <pre>
6 
7  Copyright 2018 Infineon Technologies AG
8 
9  This file is part of ETISS tool, see <https://github.com/tum-ei-eda/etiss>.
10 
11  The initial version of this software has been created with the funding support by the German Federal
12  Ministry of Education and Research (BMBF) in the project EffektiV under grant 01IS13022.
13 
14  Redistribution and use in source and binary forms, with or without modification, are permitted
15  provided that the following conditions are met:
16 
17  1. Redistributions of source code must retain the above copyright notice, this list of conditions and
18  the following disclaimer.
19 
20  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
21  and the following disclaimer in the documentation and/or other materials provided with the distribution.
22 
23  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse
24  or promote products derived from this software without specific prior written permission.
25 
26  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
27  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
28  PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
29  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
30  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
32  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33  POSSIBILITY OF SUCH DAMAGE.
34 
35  </pre>
36 
37  @author Chair of Electronic Design Automation, TUM
38 
39  @version 0.1
40 
41 */
42 
43 #define ETISS_LIBNAME LLVMJIT
45 
46 
47 #include "LLVMJIT.h"
48 
49 #include <iostream>
50 
51 // implement etiss library interface
52 extern "C"
53 {
54 
55  const char *LLVMJIT_versionInfo() { return "3.4.2for0.4"; }
56 
57  // implement version function
59 
60  unsigned LLVMJIT_countJIT() { return 1; }
61  const char *LLVMJIT_nameJIT(unsigned index)
62  {
63  switch (index)
64  {
65  case 0:
66  return "LLVMJIT";
67  default:
68  return 0;
69  }
70  }
71  etiss::JIT *LLVMJIT_createJIT(unsigned index, std::map<std::string, std::string> options)
72  {
73  switch (index)
74  {
75  case 0:
76  return new etiss::LLVMJIT();
77  default:
78  return 0;
79  }
80  }
81 
82  void LLVMJIT_deleteJIT(etiss::JIT *o) { delete o; }
83 }
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
const char * LLVMJIT_versionInfo()
Definition: LLVMJITLIB.cpp:55
const char * LLVMJIT_nameJIT(unsigned index)
Definition: LLVMJITLIB.cpp:61
etiss::JIT * LLVMJIT_createJIT(unsigned index, std::map< std::string, std::string > options)
Definition: LLVMJITLIB.cpp:71
ETISS_LIBRARYIF_VERSION_FUNC_IMPL unsigned LLVMJIT_countJIT()
Definition: LLVMJITLIB.cpp:60
void LLVMJIT_deleteJIT(etiss::JIT *o)
Definition: LLVMJITLIB.cpp:82
compiler interface for just in time compilation of generated C code
Definition: JIT.h:67
#define ETISS_LIBRARYIF_VERSION_FUNC_IMPL
Definition: Misc.h:85