ETISS 0.11.2
ExtendableTranslatingInstructionSetSimulator(version0.11.2)
Loading...
Searching...
No Matches
GCCJIT.h
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#include "etiss/JIT.h"
8
13class GCCJIT : public etiss::JIT
14{
15 public:
16 GCCJIT(bool cleanup = true, std::string opt_level = "fast", bool quiet = false);
17 virtual ~GCCJIT();
18 virtual void *translate(std::string code, std::set<std::string> headerpaths, std::set<std::string> librarypaths,
19 std::set<std::string> libraries, std::string &error, bool debug = false);
20 virtual void *getFunction(void *handle, std::string name, std::string &error);
21 virtual void free(void *handle);
22
23 private:
24 private:
25 unsigned id;
26 std::string path_;
28 std::string opt_level_;
29 bool quiet_;
30};
JIT compiler interface definition.
provides compilation via gcc and load the compilation result with dlopen/dlsym functions
Definition GCCJIT.h:14
std::string opt_level_
Definition GCCJIT.h:28
unsigned id
Definition GCCJIT.h:25
bool cleanup_
Definition GCCJIT.h:27
virtual void free(void *handle)
clean up handled returned by etiss::JIT::translate
Definition GCCJIT.cpp:162
virtual void * translate(std::string code, std::set< std::string > headerpaths, std::set< std::string > librarypaths, std::set< std::string > libraries, std::string &error, bool debug=false)
translate C code to executable code and return a handle/pointer that identifies the compilation resul...
Definition GCCJIT.cpp:52
std::string path_
Definition GCCJIT.h:26
bool quiet_
Definition GCCJIT.h:29
virtual void * getFunction(void *handle, std::string name, std::string &error)
returns a function pointer to a compiled function from the handle returned by etiss::JIT::translate
Definition GCCJIT.cpp:152
virtual ~GCCJIT()
Definition GCCJIT.cpp:44
compiler interface for just in time compilation of generated C code
Definition JIT.h:29