ETISS 0.8.0
Extendable Translating Instruction Set Simulator (version 0.8.0)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
IntegratedLibraryHelper.cpp
Go to the documentation of this file.
1
55
56#define ETISS_LIBNAME ETISSINCLUDED
57
61
68{
69 public:
70 IntegratedLibrary() : etiss::LibraryInterface("ETISSINCLUDED") {}
71 virtual std::string versionInfo() { return ETISS_VERSION_FULL; }
72 virtual unsigned countPlugins() { return ETISSINCLUDED_countPlugin(); }
73 virtual unsigned countCPUArchs() { return ETISSINCLUDED_countCPUArch(); }
74 virtual unsigned countJITs() { return ETISSINCLUDED_countJIT(); }
75
76 virtual std::string nameJIT(unsigned index)
77 {
78 const char *name = ETISSINCLUDED_nameJIT(index);
79 if (name != 0)
80 {
81 return std::string(name);
82 }
83 return std::string();
84 }
85 virtual std::string namePlugin(unsigned index)
86 {
87 const char *name = ETISSINCLUDED_namePlugin(index);
88 if (name != 0)
89 {
90 return std::string(name);
91 }
92 return std::string();
93 }
94 virtual std::string nameCPUArch(unsigned index)
95 {
96 const char *name = ETISSINCLUDED_nameCPUArch(index);
97 if (name != 0)
98 {
99 return std::string(name);
100 }
101 return std::string();
102 }
103
104 virtual etiss::JIT *createJIT(unsigned index, std::map<std::string, std::string> options)
105 {
106 return ETISSINCLUDED_createJIT(index, options);
107 }
108 virtual etiss::CPUArch *createCPUArch(unsigned index, std::map<std::string, std::string> options)
109 {
111 }
112 virtual etiss::Plugin *createPlugin(unsigned index, std::map<std::string, std::string> options)
113 {
114 return ETISSINCLUDED_createPlugin(index, options);
115 }
116
117 virtual void deleteJIT(etiss::JIT *o) { delete o; }
118 virtual void deleteCPUArch(etiss::CPUArch *o) { delete o; }
119 virtual void deletePlugin(etiss::Plugin *o) { delete o; }
120};
121
122std::shared_ptr<etiss::LibraryInterface> etiss::LibraryInterface::openIntegratedLibrary()
123{
124 return std::shared_ptr<etiss::LibraryInterface>(new IntegratedLibrary());
125}
defines the functions needed for a library that provides etiss::CPUArch implementations
ETISS_PLUGIN_EXPORT etiss::CPUArch std::map< std::string, std::string > options
create new instance of the CPUArch type at index
ETISS_LIBRARYIF_VERSION_FUNC_IMPL unsigned ETISSINCLUDED_countJIT()
const char * ETISSINCLUDED_nameJIT(unsigned index)
unsigned ETISSINCLUDED_countCPUArch()
unsigned ETISSINCLUDED_countPlugin()
etiss::Plugin * ETISSINCLUDED_createPlugin(unsigned index, std::map< std::string, std::string > options)
etiss::CPUArch * ETISSINCLUDED_createCPUArch(unsigned index, std::map< std::string, std::string > options)
etiss::JIT * ETISSINCLUDED_createJIT(unsigned index, std::map< std::string, std::string > options)
const char * ETISSINCLUDED_namePlugin(unsigned index)
const char * ETISSINCLUDED_nameCPUArch(unsigned index)
defines the functions needed for a library that provides etiss::JIT implementations
class for simple library access.
defines the functions needed for a library that provides etiss::CPUArch implementations
LibraryInterface implementation for integrated JIT/CPUArch/Plugin implementations.
virtual etiss::Plugin * createPlugin(unsigned index, std::map< std::string, std::string > options)
virtual std::string versionInfo()
simple version info string. intended to present information in a human readable way.
virtual std::string nameCPUArch(unsigned index)
virtual etiss::JIT * createJIT(unsigned index, std::map< std::string, std::string > options)
virtual void deleteCPUArch(etiss::CPUArch *o)
virtual unsigned countJITs()
virtual void deleteJIT(etiss::JIT *o)
virtual etiss::CPUArch * createCPUArch(unsigned index, std::map< std::string, std::string > options)
virtual std::string nameJIT(unsigned index)
virtual unsigned countCPUArchs()
virtual unsigned countPlugins()
virtual std::string namePlugin(unsigned index)
virtual void deletePlugin(etiss::Plugin *o)
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.
static std::shared_ptr< LibraryInterface > openIntegratedLibrary()
LibraryInterface(std::string name)
base plugin class that provides access to different plugin functions if present
Definition Plugin.h:77
#define ETISS_VERSION_FULL
Definition config.h:67
Page Table Entry (PTE) defines the composition of Page Frame Number (PFN) and relavant flags.
Definition Benchmark.h:53