[llvm-commits] [PATCH] Basic MCJIT for ELF with ExecutionEngine tests
Thirumurthi, Ashok
ashok.thirumurthi at intel.com
Tue Jan 31 13:52:32 PST 2012
Hello,
Following the email that Eli Bendersky sent to LLVMdev (http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-January/046671.html ), attached is the second patch in the MCJIT/ELF series which Eli and I refined based on Andy Kaylor's work.
This patches modifies ExecutionEngine/MCJIT to allocate executable memory for the result of MC code emission. In turn, RuntimeDyldELF uses DyldELFObject (http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20120116/135091.html ) to rebase section addresses and then performs x86 relocations to create a live memory-mapped object-file. The result should be a 100% pass rate on ExecutionEngine tests on 32/64-bit Linux and should set the stage for GDB-JIT integration for debugging.
In addition, RuntimeDyldELF was modified to extensively check return codes in the debug build. As discussed with Jim Grosbach (http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20120116/135177.html), this patch also backs out the section-based dy-load (which might well trade functionality for performance), but please stay tuned for its re-incarnation.
The patch also removes behavior related to the function-based RuntimeDyldImpl that was recently deprecated on MachO (thanks Jim!).
Note that this patch enables mcjit testing for ExecutionEngine tests using a second RUN line that uses mcjit only on Linux. Note that mcjit does not yet work on Windows (blocked on review: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20120123/135703.html ), and is in mid-development on the MachO side.
Thanks in advance for your review,
- Ashok Thirumurthi
Intel of Canada
-------------- next part --------------
A non-text attachment was scrubbed...
Name: elf-mcjit.diff
Type: application/octet-stream
Size: 56395 bytes
Desc: elf-mcjit.diff
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120131/432cc473/attachment.obj>
More information about the llvm-commits
mailing list