+2017-12-01 Segher Boessenkool <segher@kernel.crashing.org>
+
+ * final.c (output_asm_name): Print insn_cost. Shorten output. Print
+ which_alternative instead of which_alternative + 1.
+ (output_asm_insn): Print an extra tab if the template is short.
+
2017-12-01 Jim Wilson <jimw@sifive.com>
* common.opt (use_gnu_debug_info_extensions): Delete DWARF_DEBUG from
{
if (debug_insn)
{
- int num = INSN_CODE (debug_insn);
- fprintf (asm_out_file, "\t%s %d\t%s",
- ASM_COMMENT_START, INSN_UID (debug_insn),
- insn_data[num].name);
- if (insn_data[num].n_alternatives > 1)
- fprintf (asm_out_file, "/%d", which_alternative + 1);
+ fprintf (asm_out_file, "\t%s %d\t",
+ ASM_COMMENT_START, INSN_UID (debug_insn));
+ fprintf (asm_out_file, "[c=%d",
+ insn_cost (debug_insn, optimize_insn_for_speed_p ()));
if (HAVE_ATTR_length)
- fprintf (asm_out_file, "\t[length = %d]",
+ fprintf (asm_out_file, " l=%d",
get_attr_length (debug_insn));
+ fprintf (asm_out_file, "] ");
+
+ int num = INSN_CODE (debug_insn);
+ fprintf (asm_out_file, "%s", insn_data[num].name);
+ if (insn_data[num].n_alternatives > 1)
+ fprintf (asm_out_file, "/%d", which_alternative);
/* Clear this so only the first assembler insn
of any rtl insn will get the special comment for -dp. */
putc (c, asm_out_file);
}
+ /* Try to keep the asm a bit more readable. */
+ if ((flag_verbose_asm || flag_print_asm_name) && strlen (templ) < 9)
+ putc ('\t', asm_out_file);
+
/* Write out the variable names for operands, if we know them. */
if (flag_verbose_asm)
output_asm_operand_names (operands, oporder, ops);