LLVM Cookbook by Mayur Pandey & Suyog Sarda

LLVM Cookbook by Mayur Pandey & Suyog Sarda

Author:Mayur Pandey & Suyog Sarda [Pandey, Mayur & Sarda, Suyog]
Language: eng
Format: epub
Tags: C, Assembly Language, Compilers, Computers, Programming Languages
ISBN: 9781785286407
Google: WqS_CQAAQBAJ
Publisher: Packt Publishing Ltd
Published: 2015-05-30T21:00:01+00:00


Code emission

Now that the original high-level code has been translated into machine instructions, the next step is to emit the code. LLVM does this in two ways; the first is JIT, which directly emits the code to the memory. The second way is by using the MC framework to emit assembly and object files for all backend targets.The LLVMTargetMachine::addPassesToEmitFile function is responsible for defining the sequence of actions required to emit an object file. The actual MI-to-MCInst translation is done in the EmitInstruction function of the AsmPrinter interface. The static compiler tool, llc, generates assembly instructions for a target. Object file (or assembly code) emission is done by implementing the MCStreamer interface.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.