Services and Modeling for Embedded Software Development
Embecosm divider strip
Prev  Next

3.2.  archASMParser Class

The assembly parser consists of one source file, archASMParser.cpp which contains the archASMParser class, inheriting from MCTargetAsmParser in addition to a second class for holding target-specific operand information.

[Note]Note

Information about this class can be found in LLVM's documentation at llvm.org/docs/doxygen/html/classllvm_1_1MCTargetAsmParser.html

The primary class consists of the MatchAndEmitInstruction function which is called for each instruction to be parsed, emitting out an internal representation of each instruction as well as supporting functions which help it parse instruction operands.

It should be noted that the following two lines appear in the class declaration to import functions generated by TableGen which will do most of the heavy lifting in the system.

#define GET_ASSEMBLER_HEADER
#include "archGenAsmMatcher.inc"
        
Embecosm divider strip