|
ACSE 2.0.3
Advanced Compiler System for Education
|
Generation of the output assembly program implementation. More...
#include <string.h>#include <stdint.h>#include <stdlib.h>#include "list.h"#include "errors.h"#include "target_asm_print.h"#include "target_info.h"Go to the source code of this file.
Macros | |
| #define | BUF_LENGTH 256 |
| #define | FORMAT_AUTO -1 |
| #define | FORMAT_OP 0 |
| #define | FORMAT_OPIMM 1 |
| #define | FORMAT_LOAD 2 |
| #define | FORMAT_LOAD_GL 3 |
| #define | FORMAT_STORE 4 |
| #define | FORMAT_STORE_GL 5 |
| #define | FORMAT_BRANCH 6 |
| #define | FORMAT_JUMP 7 |
| #define | FORMAT_LI 8 |
| #define | FORMAT_LA 9 |
| #define | FORMAT_SYSTEM 10 |
| #define | FORMAT_FUNC 11 |
Functions | |
| const char * | opcodeToString (int opcode) |
| char * | registerIDToString (t_regID regID, bool machineRegIDs) |
| char * | registerToString (t_instrArg *reg, bool machineRegIDs) |
| int | labelToString (char *buf, int bufsz, t_label *label, int finalColon) |
| int | instructionToString (char *buf, int bufsz, t_instruction *instr, bool machineRegIDs) |
| bool | translateForwardDeclarations (t_program *program, FILE *fp) |
| bool | printInstruction (t_instruction *instr, FILE *fp, bool machineRegIDs) |
| bool | translateCodeSegment (t_program *program, FILE *fp) |
| int | printGlobalDeclaration (t_symbol *data, FILE *fp) |
| bool | translateDataSegment (t_program *program, FILE *fp) |
| bool | writeAssembly (t_program *program, const char *fn) |
Generation of the output assembly program implementation.
Definition in file target_asm_print.c.
| #define BUF_LENGTH 256 |
Definition at line 12 of file target_asm_print.c.
| #define FORMAT_AUTO -1 |
Definition at line 163 of file target_asm_print.c.
| #define FORMAT_BRANCH 6 |
Definition at line 170 of file target_asm_print.c.
| #define FORMAT_FUNC 11 |
Definition at line 175 of file target_asm_print.c.
| #define FORMAT_JUMP 7 |
Definition at line 171 of file target_asm_print.c.
| #define FORMAT_LA 9 |
Definition at line 173 of file target_asm_print.c.
| #define FORMAT_LI 8 |
Definition at line 172 of file target_asm_print.c.
| #define FORMAT_LOAD 2 |
Definition at line 166 of file target_asm_print.c.
| #define FORMAT_LOAD_GL 3 |
Definition at line 167 of file target_asm_print.c.
| #define FORMAT_OP 0 |
Definition at line 164 of file target_asm_print.c.
| #define FORMAT_OPIMM 1 |
Definition at line 165 of file target_asm_print.c.
| #define FORMAT_STORE 4 |
Definition at line 168 of file target_asm_print.c.
| #define FORMAT_STORE_GL 5 |
Definition at line 169 of file target_asm_print.c.
| #define FORMAT_SYSTEM 10 |
Definition at line 174 of file target_asm_print.c.
| int instructionToString | ( | char * | buf, |
| int | bufsz, | ||
| t_instruction * | instr, | ||
| bool | machineRegIDs ) |
Definition at line 313 of file target_asm_print.c.
| int labelToString | ( | char * | buf, |
| int | bufsz, | ||
| t_label * | label, | ||
| int | finalColon ) |
Definition at line 293 of file target_asm_print.c.
| const char * opcodeToString | ( | int | opcode | ) |
Definition at line 15 of file target_asm_print.c.
| int printGlobalDeclaration | ( | t_symbol * | data, |
| FILE * | fp ) |
Definition at line 488 of file target_asm_print.c.
| char * registerToString | ( | t_instrArg * | reg, |
| bool | machineRegIDs ) |
Definition at line 285 of file target_asm_print.c.
| bool translateCodeSegment | ( | t_program * | program, |
| FILE * | fp ) |
Definition at line 462 of file target_asm_print.c.
| bool translateDataSegment | ( | t_program * | program, |
| FILE * | fp ) |
Definition at line 519 of file target_asm_print.c.
| bool translateForwardDeclarations | ( | t_program * | program, |
| FILE * | fp ) |
Definition at line 412 of file target_asm_print.c.