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

5.3. Integration

Integration of the disassembler occurs in the same way as the instruction assembler, with a static createarchDisassembler function being defined, which creates and returns a new archDisassembler.

static MCDisassembler *createarchDisassembler(const Target &T,
                                              const MCSubtargetInfo &STI) {
  return new archDisassembler(STI, T.createMCRegInfo(""));
}
        

The LLVMInitializearchDisassembler function is also defined which registers the disassembler with the rest of the system.

extern "C" void LLVMInitializearchDisassembler() {
  // Register the disassembler
  TargetRegistry::RegisterMCDisassembler(ThearchTarget,
                                         createarchDisassembler);
}
        
Embecosm divider strip