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

4.2. Registration

To register the code emitter, the following code needs adding to the machine code target description archMCTargetDesc.cpp.

  // Register the MC code emitter
  TargetRegistry::RegisterMCCodeEmitter(ThearchTarget,
                                        llvm::createarchMCCodeEmitter);

        

The createarchMCCodeEmitter function is declared in the archMCTargetDesc.h header file and is defined in archMCCodeEmitter.cpp. This function simply creates and returns a new archMCCodeEmitter.

Embecosm divider strip