1 /* bc-emit.h - declare entry points for producing object files of bytecodes. */
3 /* Internal format of symbol table for the object file. */
6 /* Private copy separately malloc'd. */
9 /* Symbol has a defined value. */
10 unsigned int defined
:1;
12 /* Symbol has been globalized. */
13 unsigned int global
:1;
15 /* Symbol is common. */
16 unsigned int common
:1;
18 /* Value if defined. */
19 unsigned long int val
;
21 /* Used in internal symbol table structure. */
26 /* List of symbols defined in a particular segment. */
30 struct bc_segsym
*next
;
34 /* List of relocations needed in a particular segment. */
37 /* Offset of datum to be relocated. */
40 /* Symbol to be relocated by. */
43 struct bc_segreloc
*next
;
47 /* Segment of an object file. */
50 /* Size allocated to contents. */
53 /* Pointer to base of contents. */
56 /* Actual size of contents. */
59 /* List of symbols defined in this segment. */
60 struct bc_segsym
*syms
;
62 /* List of relocations for this segment. */
63 struct bc_segreloc
*relocs
;
67 /* Anonymous bytecode label within a single function. */
70 /* Offset of label from start of segment. */
73 /* True when offset is valid. */
74 unsigned int defined
:1;
76 /* Unique bytecode ID, used to determine innermost
80 /* Next node in list */
81 struct bc_label
*next
;
85 /* Reference to a bc_label; a list of all such references is kept for
86 the function, then when it is finished they are backpatched to
87 contain the correct values. */
91 /* Label referenced. */
92 struct bc_label
*label
;
94 /* Code offset of reference. */
97 /* Next labelref in list */
98 struct bc_labelref
*next
;
103 extern void bc_initialize();
104 extern int bc_begin_function();
105 extern char *bc_emit_trampoline();
106 extern void bc_emit_bytecode();
107 extern void bc_emit_bytecode_const();
108 extern struct bc_label
*bc_get_bytecode_label();
109 extern int bc_emit_bytecode_labeldef();
110 extern void bc_emit_bytecode_labelref();
111 extern void bc_emit_code_labelref();
112 extern char *bc_end_function();
113 extern void bc_align_const();
114 extern void bc_emit_const();
115 extern void bc_emit_const_skip();
116 extern int bc_emit_const_labeldef();
117 extern void bc_emit_const_labelref();
118 extern void bc_align_data();
119 extern void bc_emit_data();
120 extern void bc_emit_data_skip();
121 extern int bc_emit_data_labeldef();
122 extern void bc_emit_data_labelref();
123 extern int bc_define_pointer ();
124 extern int bc_emit_common();
125 extern void bc_globalize_label();
126 extern void bc_text();
127 extern void bc_data();
128 extern void bc_align();
129 extern void bc_emit();
130 extern void bc_emit_skip();
131 extern int bc_emit_labeldef();
132 extern void bc_emit_labelref();
133 extern void bc_write_file();