Lines Matching refs:sym

89 	ir_sym_node *sym;  in ir_disasm_add_symbol()  local
92 sym = ir_mem_pmalloc(sizeof(ir_sym_node) + len + 1); in ir_disasm_add_symbol()
93 if (!sym) { in ir_disasm_add_symbol()
96 sym->addr = addr; in ir_disasm_add_symbol()
97 sym->end = (addr + size - 1); in ir_disasm_add_symbol()
98 memcpy((char*)&sym->name, name, len + 1); in ir_disasm_add_symbol()
99 sym->parent = sym->child[0] = sym->child[1] = NULL; in ir_disasm_add_symbol()
100 sym->info = 1; in ir_disasm_add_symbol()
106 if (sym->addr > node->addr) { in ir_disasm_add_symbol()
107 IR_ASSERT(sym->addr > (node->end)); in ir_disasm_add_symbol()
111 node->child[1] = sym; in ir_disasm_add_symbol()
112 sym->parent = node; in ir_disasm_add_symbol()
115 } else if (sym->addr < node->addr) { in ir_disasm_add_symbol()
119 node->child[0] = sym; in ir_disasm_add_symbol()
120 sym->parent = node; in ir_disasm_add_symbol()
124 IR_ASSERT(sym->addr == node->addr); in ir_disasm_add_symbol()
125 if (strcmp(name, node->name) == 0 && sym->end < node->end) { in ir_disasm_add_symbol()
127 node->end = sym->end; in ir_disasm_add_symbol()
129 ir_mem_pfree(sym); in ir_disasm_add_symbol()
135 while (sym && sym != _symbols && sym->parent->info == 1) { in ir_disasm_add_symbol()
136 if (sym->parent == sym->parent->parent->child[0]) { in ir_disasm_add_symbol()
137 node = sym->parent->parent->child[1]; in ir_disasm_add_symbol()
139 sym->parent->info = 0; in ir_disasm_add_symbol()
141 sym->parent->parent->info = 1; in ir_disasm_add_symbol()
142 sym = sym->parent->parent; in ir_disasm_add_symbol()
144 if (sym == sym->parent->child[1]) { in ir_disasm_add_symbol()
145 sym = sym->parent; in ir_disasm_add_symbol()
146 ir_syms_rotateleft(sym); in ir_disasm_add_symbol()
148 sym->parent->info = 0; in ir_disasm_add_symbol()
149 sym->parent->parent->info = 1; in ir_disasm_add_symbol()
150 ir_syms_rotateright(sym->parent->parent); in ir_disasm_add_symbol()
153 node = sym->parent->parent->child[0]; in ir_disasm_add_symbol()
155 sym->parent->info = 0; in ir_disasm_add_symbol()
157 sym->parent->parent->info = 1; in ir_disasm_add_symbol()
158 sym = sym->parent->parent; in ir_disasm_add_symbol()
160 if (sym == sym->parent->child[0]) { in ir_disasm_add_symbol()
161 sym = sym->parent; in ir_disasm_add_symbol()
162 ir_syms_rotateright(sym); in ir_disasm_add_symbol()
164 sym->parent->info = 0; in ir_disasm_add_symbol()
165 sym->parent->parent->info = 1; in ir_disasm_add_symbol()
166 ir_syms_rotateleft(sym->parent->parent); in ir_disasm_add_symbol()
171 _symbols = sym; in ir_disasm_add_symbol()
348 const char *sym; local
553 } else if ((sym = ir_disasm_resolver(addr, &offset))) {
566 fputs(sym, f);
616 } else if ((sym = ir_disasm_resolver(addr, &offset))) {
629 fputs(sym, f);