Lines Matching refs:dl
713 static void disasm_line__init_ins(struct disasm_line *dl, struct map *map) in disasm_line__init_ins() argument
715 dl->ins = ins__find(dl->name); in disasm_line__init_ins()
717 if (dl->ins == NULL) in disasm_line__init_ins()
720 if (!dl->ins->ops) in disasm_line__init_ins()
723 if (dl->ins->ops->parse && dl->ins->ops->parse(&dl->ops, map) < 0) in disasm_line__init_ins()
724 dl->ins = NULL; in disasm_line__init_ins()
768 struct disasm_line *dl = zalloc(sizeof(*dl) + privsize); in disasm_line__new() local
770 if (dl != NULL) { in disasm_line__new()
771 dl->offset = offset; in disasm_line__new()
772 dl->line = strdup(line); in disasm_line__new()
773 dl->line_nr = line_nr; in disasm_line__new()
774 if (dl->line == NULL) in disasm_line__new()
778 if (disasm_line__parse(dl->line, &dl->name, &dl->ops.raw) < 0) in disasm_line__new()
781 disasm_line__init_ins(dl, map); in disasm_line__new()
785 return dl; in disasm_line__new()
788 zfree(&dl->line); in disasm_line__new()
790 free(dl); in disasm_line__new()
794 void disasm_line__free(struct disasm_line *dl) in disasm_line__free() argument
796 zfree(&dl->line); in disasm_line__free()
797 zfree(&dl->name); in disasm_line__free()
798 if (dl->ins && dl->ins->ops->free) in disasm_line__free()
799 dl->ins->ops->free(&dl->ops); in disasm_line__free()
801 ins__delete(&dl->ops); in disasm_line__free()
802 free(dl); in disasm_line__free()
805 int disasm_line__scnprintf(struct disasm_line *dl, char *bf, size_t size, bool raw) in disasm_line__scnprintf() argument
807 if (raw || !dl->ins) in disasm_line__scnprintf()
808 return scnprintf(bf, size, "%-6.6s %s", dl->name, dl->ops.raw); in disasm_line__scnprintf()
810 return ins__scnprintf(dl->ins, bf, size, &dl->ops); in disasm_line__scnprintf()
948 static int disasm_line__print(struct disasm_line *dl, struct symbol *sym, u64 start, in disasm_line__print() argument
955 if (dl->offset != -1) { in disasm_line__print()
964 s64 offset = dl->offset; in disasm_line__print()
969 next = disasm__get_next_ip_line(¬es->src->source, dl); in disasm_line__print()
1001 if (queue == dl) in disasm_line__print()
1040 color_fprintf(stdout, annotate__asm_color(br), "%s", dl->line); in disasm_line__print()
1061 if (!*dl->line) in disasm_line__print()
1064 printf(" %*s: %s\n", width, " ", dl->line); in disasm_line__print()
1095 struct disasm_line *dl; in symbol__parse_objdump_line() local
1153 dl = disasm_line__new(offset, parsed_line, privsize, *line_nr, map); in symbol__parse_objdump_line()
1157 if (dl == NULL) in symbol__parse_objdump_line()
1160 if (dl->ops.target.offset == UINT64_MAX) in symbol__parse_objdump_line()
1161 dl->ops.target.offset = dl->ops.target.addr - in symbol__parse_objdump_line()
1165 if (dl->ins && ins__is_call(dl->ins) && !dl->ops.target.name) { in symbol__parse_objdump_line()
1168 .addr = dl->ops.target.addr, in symbol__parse_objdump_line()
1173 dl->ops.target.name = strdup(target.sym->name); in symbol__parse_objdump_line()
1176 disasm__add(¬es->src->source, dl); in symbol__parse_objdump_line()
1190 struct disasm_line *dl; in delete_last_nop() local
1193 dl = list_entry(list->prev, struct disasm_line, node); in delete_last_nop()
1195 if (dl->ins && dl->ins->ops) { in delete_last_nop()
1196 if (dl->ins->ops != &nop_ops) in delete_last_nop()
1199 if (!strstr(dl->line, " nop ") && in delete_last_nop()
1200 !strstr(dl->line, " nopl ") && in delete_last_nop()
1201 !strstr(dl->line, " nopw ")) in delete_last_nop()
1205 list_del(&dl->node); in delete_last_nop()
1206 disasm_line__free(dl); in delete_last_nop()
1769 static size_t disasm_line__fprintf(struct disasm_line *dl, FILE *fp) in disasm_line__fprintf() argument
1773 if (dl->offset == -1) in disasm_line__fprintf()
1774 return fprintf(fp, "%s\n", dl->line); in disasm_line__fprintf()
1776 printed = fprintf(fp, "%#" PRIx64 " %s", dl->offset, dl->name); in disasm_line__fprintf()
1778 if (dl->ops.raw[0] != '\0') { in disasm_line__fprintf()
1780 dl->ops.raw); in disasm_line__fprintf()