ETISS 0.8.0
Extendable Translating Instruction Set Simulator (version 0.8.0)
LibraryInterface.h
Go to the documentation of this file.
1 
56 #ifndef ETISS_INCLUDE_LIBRARY_H_
57 #define ETISS_INCLUDE_LIBRARY_H_
58 
59 #include <map>
60 #include <memory>
61 #include <mutex>
62 #include <string>
63 
64 #include "etiss/config.h"
65 
66 #define etiss_helper_merge_l2(X1, X2) X1##X2
67 #define etiss_helper_merge(X1, X2) etiss_helper_merge_l2(X1, X2)
68 #include "etiss/Misc.h"
69 
70 #include "etiss/CPUArch.h"
71 #include "etiss/ClassDefs.h"
72 #include "etiss/JIT.h"
73 #include "etiss/Plugin.h"
74 #include "etiss/pluginexport.h"
75 
76 namespace etiss
77 {
78 
92 {
93  private:
94  // friend void etiss::addLibrary(std::shared_ptr<etiss::LibraryInterface> interface);
95  public:
100  LibraryInterface(std::string name);
101 
102  virtual ~LibraryInterface();
103 
105  virtual std::string versionInfo();
106 
107  virtual unsigned countPlugins();
108  virtual unsigned countCPUArchs();
109  virtual unsigned countJITs();
110 
111  virtual std::string nameJIT(unsigned index);
112  virtual std::string namePlugin(unsigned index);
113  virtual std::string nameCPUArch(unsigned index);
114 
115  public:
116  virtual etiss::JIT *createJIT(unsigned index,
117  std::map<std::string, std::string> options = std::map<std::string, std::string>());
118  virtual etiss::CPUArch *createCPUArch(
119  unsigned index, std::map<std::string, std::string> options = std::map<std::string, std::string>());
120  virtual etiss::Plugin *createPlugin(
121  unsigned index, std::map<std::string, std::string> options = std::map<std::string, std::string>());
122 
123  virtual void deleteJIT(etiss::JIT *);
124  virtual void deleteCPUArch(etiss::CPUArch *);
125  virtual void deletePlugin(etiss::Plugin *);
126 
127  public:
131  virtual bool isEmpty();
135  virtual const std::string &getName();
136 
137  public:
138  static std::shared_ptr<LibraryInterface> openSharedLibrary(std::string path, std::string name);
139 
140  static std::shared_ptr<LibraryInterface> openIntegratedLibrary();
141 
142  static unsigned getCurrentLibraryVersion();
143 
144  static void addSearchPath(const std::string &path);
145 
146  private:
147  std::string name_;
148 };
149 
150 } // namespace etiss
151 
152 #endif
ETISS_PLUGIN_EXPORT etiss::CPUArch std::map< std::string, std::string > options
create new instance of the CPUArch type at index
contains neccesary interfaces for instruction translation.
JIT compiler interface definition.
general configuration and logging
plugins for extensions to code translation and instruction execution
the interface to translate instructions of and processor architecture
Definition: CPUArch.h:162
compiler interface for just in time compilation of generated C code
Definition: JIT.h:67
interface class for libraries.
virtual void deletePlugin(etiss::Plugin *)
virtual bool isEmpty()
returns true if this library provides nothing
virtual etiss::CPUArch * createCPUArch(unsigned index, std::map< std::string, std::string > options=std::map< std::string, std::string >())
virtual unsigned countPlugins()
virtual etiss::Plugin * createPlugin(unsigned index, std::map< std::string, std::string > options=std::map< std::string, std::string >())
static std::shared_ptr< LibraryInterface > openIntegratedLibrary()
LibraryInterface(std::string name)
virtual void deleteCPUArch(etiss::CPUArch *)
virtual std::string versionInfo()
simple version info string. intended to present information in a human readable way.
static void addSearchPath(const std::string &path)
virtual void deleteJIT(etiss::JIT *)
virtual unsigned countJITs()
static std::shared_ptr< LibraryInterface > openSharedLibrary(std::string path, std::string name)
virtual std::string nameCPUArch(unsigned index)
static unsigned getCurrentLibraryVersion()
virtual unsigned countCPUArchs()
virtual std::string namePlugin(unsigned index)
virtual std::string nameJIT(unsigned index)
virtual const std::string & getName()
virtual etiss::JIT * createJIT(unsigned index, std::map< std::string, std::string > options=std::map< std::string, std::string >())
base plugin class that provides access to different plugin functions if present
Definition: Plugin.h:77
contains defines to configure ETISS.
Page Table Entry (PTE) defines the composition of Page Frame Number (PFN) and relavant flags.
Definition: Benchmark.h:53