-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathasm_unparser.h
More file actions
executable file
·58 lines (40 loc) · 2.12 KB
/
asm_unparser.h
File metadata and controls
executable file
·58 lines (40 loc) · 2.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/* $Id: asm_unparser.h,v 1.9 2024/07/29 16:17:19 leavens Exp $ */
#ifndef _ASM_UNPARSER_H
#define _ASM_UNPARSER_H
#include <stdio.h>
#include "ast.h"
// Unparse prog, with output going to the file out
extern void unparseProgram(FILE *out, ast_program_t prog);
// Unparse the given AST, with output going to out
extern void unparseTextSection(FILE *out, ast_text_section_t ts);
// Unparse the given AST, with output going to out
extern void unparseEntryPoint(FILE *out, ast_addr_t ep);
// Unparse the given AST, with output going to out
extern void unparseAddr(FILE *out, ast_addr_t l);
// Unparse the given AST, with output going to out
extern void unparseAsmInstrs(FILE *out, ast_asm_instrs_t instrs);
// Unparse the given AST, with output going to out
extern void unparseAsmInstr(FILE *out, ast_asm_instr_t instr);
// Unparse the given AST, with output going to out
extern void unparseLabelOpt(FILE *out, ast_label_opt_t lopt);
// Unparse the given AST, with output going to out
extern void unparseInstr(FILE *out, ast_instr_t instr);
// Unparse the given AST, with output going to out
extern void unparseImmediateAddress(FILE *out, ast_addr_t addr);
// Unparse a register, returning a string for the register's name
extern const char *unparseReg(reg_num_type n);
// Unparse the given AST, with output going to out
extern void unparseDataSection(FILE *out, ast_data_section_t ds);
// Unparse the given AST, with output going to out
extern void unparseStaticDecls(FILE *out, ast_static_decls_t sds);
// Unparse the given AST, with output going to out
extern void unparseStaticDecl(FILE *out, ast_static_decl_t dcl);
// Unparse the data size declartion, with output going to out
void unparseDataSize(FILE *out, ast_static_decl_t dcl);
// Unparse the given AST, with output going to out
extern void unparseIdent(FILE *out, ast_ident_t id);
// Unparse the given AST, with output going to out
extern void unparseInitializer(FILE *out, ast_initializer_opt_t init);
// Unparse the given AST, with output going to out
extern void unparseStackSection(FILE *out, ast_stack_section_t ss);
#endif