Lines Matching refs:labels
37 struct local_labels *labels = data; in lookup_symbol() local
52 if (labels->print_phase) { in lookup_symbol()
53 for (i = 0; i < labels->cnt; ++i) in lookup_symbol()
54 if (labels->pcs[i] == ref_value) in lookup_symbol()
55 return labels->names[i]; in lookup_symbol()
57 if (labels->cnt < MAX_LOCAL_LABELS && ref_value < labels->prog_len) in lookup_symbol()
58 labels->pcs[labels->cnt++] = ref_value; in lookup_symbol()
95 struct local_labels labels = {}; in disasm_one_func() local
101 ctx = LLVMCreateDisasm(triple, &labels, 0, NULL, lookup_symbol); in disasm_one_func()
114 labels.prog_len = len; in disasm_one_func()
124 qsort(labels.pcs, labels.cnt, sizeof(*labels.pcs), cmp_u32); in disasm_one_func()
125 for (i = 0; i < labels.cnt; ++i) in disasm_one_func()
133 snprintf(labels.names[i], sizeof(labels.names[i]), "L%d", i % MAX_LOCAL_LABELS); in disasm_one_func()
136 labels.print_phase = true; in disasm_one_func()
144 label_pc = bsearch(&pc, labels.pcs, labels.cnt, sizeof(*labels.pcs), cmp_u32); in disasm_one_func()
148 label = labels.names[label_pc - labels.pcs]; in disasm_one_func()