|
ACSE 2.0.3
Advanced Compiler System for Education
|
Functions to print the assembly code of the compiled program. More...
Functions | |
| char * | registerIDToString (t_regID regID, bool machineRegIDs) |
| bool | printInstruction (t_instruction *inst, FILE *fp, bool machineRegIDs) |
| bool | writeAssembly (t_program *program, const char *fn) |
Functions to print the assembly code of the compiled program.
At the end of compilation, the assembly code needs to be printed to a file to be later processed by the assembler. These functions are used to perform this task and related assembly printing operations when necessary for logging purposes.
| bool printInstruction | ( | t_instruction * | inst, |
| FILE * | fp, | ||
| bool | machineRegIDs ) |
Print the specified instruction to a file.
| inst | The instruction to be printed. |
| fp | The stream where to print the instruction. |
| machineRegIDs | True if the instruction uses physical registers (i.e. register allocation has already been performed) |
Definition at line 437 of file target_asm_print.c.
| char * registerIDToString | ( | t_regID | regID, |
| bool | machineRegIDs ) |
Format a register to a string.
| regID | The register ID that needs to be formatted. |
| machineRegIDs | True if the register ID needs to be treated as a physical register, false if the register ID is a temporary register. |
Definition at line 263 of file target_asm_print.c.
| bool writeAssembly | ( | t_program * | program, |
| const char * | fn ) |
Write the final assembly code for the program to the specified file.
| program | The program being compiled. |
| fn | The path of the output file. |
Definition at line 546 of file target_asm_print.c.