Debian Codegraph @

src/asm/label.h

raw symbols SCIP
1 //
2 // ACME - a crossassembler for producing 6502/65c02/65816 code.
3 // Copyright (C) 1998-2006 Marco Baye
4 // Have a look at "acme.c" for further info
5 //
6 // Label stuff
7 #ifndef label_H
8 #define label_H
9
10 #include <stdio.h>
11
12
13 // "label" structure type definition
14 struct label_t {
15 struct result_t result; // Expression flags and value
16 int usage; // usage count
17 int pass; // pass of creation (for anon counters)
18 };
19
20
21 // Variables
22 extern node_ra_t* Label_forest[]; // trees (because of 8-bit hash)
23
24
25 // Prototypes
26
27 // register pseudo opcodes and clear label forest
28 extern void Label_init(void);
29 // function acts upon the label's flag bits and produces an error if needed.
30 extern void Label_set_value(label_t*, result_t*, bool change_allowed);
31 // Parse implicit label definition (can be either global or local).
32 // Name must be held in GlobalDynaBuf.
33 extern void Label_implicit_definition(zone_t zone, int stat_flags, int force_bit, bool change);
34 // Parse label definition (can be either global or local).
35 // Name must be held in GlobalDynaBuf.
36 extern void Label_parse_definition(zone_t zone, int stat_flags);
37 // Search for label. Create if nonexistant. If created, assign flags.
38 // Name must be held in GlobalDynaBuf.
39 extern label_t* Label_find(zone_t, int flags);
40 // Dump global labels to file
41 extern void Label_dump_all(FILE* fd);
42 // Fix name of anonymous forward label (held in GlobalDynaBuf, NOT TERMINATED!)
43 // so it references the *next* anonymous forward label definition.
44 extern label_t* Label_fix_forward_name(void);
45
46
47 #endif