diff options
| author | Lang Hames <lhames@gmail.com> | 2016-02-10 01:02:33 +0000 |
|---|---|---|
| committer | Lang Hames <lhames@gmail.com> | 2016-02-10 01:02:33 +0000 |
| commit | 4f8194e81d72bab350480fce872e0af115a4dcbf (patch) | |
| tree | dbddd750ce68b36e45b589ec568662ad5f46c0e0 /llvm/tools/lli/OrcLazyJIT.cpp | |
| parent | 5fd17ab1b093f6b59aabb27f6c2c2278e65c2707 (diff) | |
| download | bcm5719-llvm-4f8194e81d72bab350480fce872e0af115a4dcbf.tar.gz bcm5719-llvm-4f8194e81d72bab350480fce872e0af115a4dcbf.zip | |
[Orc] Add lazy-JITting support for i386.
This patch adds a new class, OrcI386, which contains the hooks needed to
support lazy-JITing on i386 (currently only for Pentium 2 or above, as the JIT
re-entry code uses the FXSAVE/FXRSTOR instructions).
Support for i386 is enabled in the LLI lazy JIT and the Orc C API, and
regression and unit tests are enabled for this architecture.
llvm-svn: 260338
Diffstat (limited to 'llvm/tools/lli/OrcLazyJIT.cpp')
| -rw-r--r-- | llvm/tools/lli/OrcLazyJIT.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/tools/lli/OrcLazyJIT.cpp b/llvm/tools/lli/OrcLazyJIT.cpp index 7f483f742b8..fee3c72d643 100644 --- a/llvm/tools/lli/OrcLazyJIT.cpp +++ b/llvm/tools/lli/OrcLazyJIT.cpp @@ -51,6 +51,11 @@ OrcLazyJIT::createCompileCallbackMgr(Triple T) { switch (T.getArch()) { default: return nullptr; + case Triple::x86: { + typedef orc::LocalJITCompileCallbackManager<orc::OrcI386> CCMgrT; + return llvm::make_unique<CCMgrT>(0); + } + case Triple::x86_64: { typedef orc::LocalJITCompileCallbackManager<orc::OrcX86_64> CCMgrT; return llvm::make_unique<CCMgrT>(0); @@ -63,6 +68,12 @@ OrcLazyJIT::createIndirectStubsMgrBuilder(Triple T) { switch (T.getArch()) { default: return nullptr; + case Triple::x86: + return [](){ + return llvm::make_unique< + orc::LocalIndirectStubsManager<orc::OrcI386>>(); + }; + case Triple::x86_64: return [](){ return llvm::make_unique< |

