next up previous contents
Next: Putting It All Together Up: SALTO Target Description Specifications Previous: Instruction Sets

Target-Specific Functionalities

Target-specific preprocessing of assembly files is implemented in files named arch.cc for each supported target system arch. These files must provide the implementation of the following functions:

void prog_db::setTargetDependentInfo(void):
the main interface function which sets up the appropriate pseudo-opcode table and performs any additional initialization tasks that might be required for the current target;
void target_emit_hook(FILE *fg):
code to be executed before the transformed program is output to file *fg.
void target_label_hook(symbolS *xsymb):
function to be executed when a user-defined label (i.e., potentially a procedure entry point) is encountered. xsymb points to the symbol object associated with the label.

The pseudo-opcode table provides the list of supported assembler directives and the associated actions. Entries in the table contain the name of the directive with the leading dot ('.') stripped, and the name of the function to be executed when that directive is encountered.

A generic set of directives and their associated actions is implemented by the class generic_pseudotab. Additional directives and actions (including replacement actions for generic directive names) are provided in target-specific derived class target_pseudotab. The definition and the implementation of class target_pseudotab must be supplied by the user in file target.cc.



Erven Rohou
Fri Oct 17 09:15:29 MET DST 1997