Show known label in comment for label-less rjmp/branch

This commit is contained in:
stefanrueger
2025-05-26 17:39:29 +02:00
parent 946b11b5a5
commit f1f5d62ada

View File

@@ -1165,8 +1165,13 @@ static void disassemble(const char *buf, int addr, int opcode, AVR_mnemo mnemo,
} else {
if(is_relative) {
add_operand(lc, ".%+d", offset);
if(cx->dis_opts.addresses)
add_comment(line, str_ccprintf("L%0*x", awd, target));
if(cx->dis_opts.addresses) {
Dis_symbol *s = find_symbol('L', target);
if(s && s->name && *s->name)
add_comment(line, str_ccprintf("L%0*x (%s)", awd, target, s->name));
else
add_comment(line, str_ccprintf("L%0*x", awd, target));
}
} else
add_operand(lc, "0x%0*x", awd, target);
}