diff options
Diffstat (limited to 'contrib/gcc/final.c')
-rw-r--r-- | contrib/gcc/final.c | 37 |
1 files changed, 23 insertions, 14 deletions
diff --git a/contrib/gcc/final.c b/contrib/gcc/final.c index ec3b1c7..34eda6c 100644 --- a/contrib/gcc/final.c +++ b/contrib/gcc/final.c @@ -170,10 +170,6 @@ char regs_ever_live[FIRST_PSEUDO_REGISTER]; int frame_pointer_needed; -/* Assign unique numbers to labels generated for profiling. */ - -int profile_label_no; - /* Number of unmatched NOTE_INSN_BLOCK_BEG notes we have seen. */ static int block_depth; @@ -1564,8 +1560,6 @@ final_start_function (first, file, optimize) if (! HAVE_prologue) #endif profile_after_prologue (file); - - profile_label_no++; } static void @@ -1597,7 +1591,7 @@ profile_function (file) #ifndef NO_PROFILE_COUNTERS data_section (); ASM_OUTPUT_ALIGN (file, floor_log2 (align / BITS_PER_UNIT)); - ASM_OUTPUT_INTERNAL_LABEL (file, "LP", profile_label_no); + ASM_OUTPUT_INTERNAL_LABEL (file, "LP", current_function_profile_label_no); assemble_integer (const0_rtx, LONG_TYPE_SIZE / BITS_PER_UNIT, align, 1); #endif @@ -1627,7 +1621,7 @@ profile_function (file) #endif #endif - FUNCTION_PROFILER (file, profile_label_no); + FUNCTION_PROFILER (file, current_function_profile_label_no); #if defined(STATIC_CHAIN_INCOMING_REGNUM) && defined(ASM_OUTPUT_REG_PUSH) if (cxt) @@ -1851,6 +1845,7 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes) case NOTE_INSN_DELETED: case NOTE_INSN_LOOP_BEG: case NOTE_INSN_LOOP_END: + case NOTE_INSN_LOOP_END_TOP_COND: case NOTE_INSN_LOOP_CONT: case NOTE_INSN_LOOP_VTOP: case NOTE_INSN_FUNCTION_END: @@ -2964,13 +2959,26 @@ alter_cond (cond) In an `asm', it's the user's fault; otherwise, the compiler's fault. */ void -output_operand_lossage (msgid) - const char *msgid; +output_operand_lossage VPARAMS ((const char *msgid, ...)) { + char *fmt_string; + char *new_message; + const char *pfx_str; + VA_OPEN (ap, msgid); + VA_FIXEDARG (ap, const char *, msgid); + + pfx_str = this_is_asm_operands ? _("invalid `asm': ") : "output_operand: "; + asprintf (&fmt_string, "%s%s", pfx_str, _(msgid)); + vasprintf (&new_message, fmt_string, ap); + if (this_is_asm_operands) - error_for_asm (this_is_asm_operands, "invalid `asm': %s", _(msgid)); + error_for_asm (this_is_asm_operands, "%s", new_message); else - internal_error ("output_operand: %s", _(msgid)); + internal_error ("%s", new_message); + + free (fmt_string); + free (new_message); + VA_CLOSE (ap); } /* Output of assembler code from a template, and its subroutines. */ @@ -3216,7 +3224,7 @@ output_asm_insn (template, operands) c = atoi (p); if (! ISDIGIT (*p)) - output_operand_lossage ("operand number missing after %-letter"); + output_operand_lossage ("operand number missing after %%-letter"); else if (this_is_asm_operands && (c < 0 || (unsigned int) c >= insn_noperands)) output_operand_lossage ("operand number out of range"); @@ -3308,7 +3316,7 @@ output_asm_label (x) && NOTE_LINE_NUMBER (x) == NOTE_INSN_DELETED_LABEL)) ASM_GENERATE_INTERNAL_LABEL (buf, "L", CODE_LABEL_NUMBER (x)); else - output_operand_lossage ("`%l' operand isn't a label"); + output_operand_lossage ("`%%l' operand isn't a label"); assemble_name (asm_out_file, buf); } @@ -3460,6 +3468,7 @@ output_addr_const (file, x) case ZERO_EXTEND: case SIGN_EXTEND: + case SUBREG: output_addr_const (file, XEXP (x, 0)); break; |