May 2015
Intermediate to advanced
296 pages
5h 10m
English
Printing an assembly instruction is an important step in generating target code. Various classes are defined that work as a gateway to the streamers. The instruction string is provided by the .td file defined earlier.
The first and foremost step for printing instructions is to define the instruction string in the .td file, which was done in the Defining the instruction set recipe.
Perform the following steps:
InstPrinter inside the TOY folder:$ cd lib/Target/TOY $ mkdir InstPrinter
TOYInstrFormats.td, define the AsmString variable:class InstTOY<dag outs, dag ins, string asmstr, list<dag> pattern> : Instruction { field bits<32> Inst; let Namespace = ...Read now
Unlock full access