summaryrefslogtreecommitdiffstats
path: root/contrib/gcc
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2002-05-09 21:41:12 +0000
committerobrien <obrien@FreeBSD.org>2002-05-09 21:41:12 +0000
commit65d1b51533ea2f08a2c426134353cdb510ad2757 (patch)
treea358780ded4d5459d63513182944986b5db2f316 /contrib/gcc
parent03d718bf2580a83e8ed889fdaf397ea1099ddb72 (diff)
downloadFreeBSD-src-65d1b51533ea2f08a2c426134353cdb510ad2757.zip
FreeBSD-src-65d1b51533ea2f08a2c426134353cdb510ad2757.tar.gz
Use the stock 3.1 prerelease file now. Rev 1.2 (add_bb) just doesn't
cleanly fit in any more.
Diffstat (limited to 'contrib/gcc')
-rw-r--r--contrib/gcc/final.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/contrib/gcc/final.c b/contrib/gcc/final.c
index 35f9666..969b3c9 100644
--- a/contrib/gcc/final.c
+++ b/contrib/gcc/final.c
@@ -21,7 +21,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
/* $FreeBSD$ */
-
/* This is the final pass of the compiler.
It looks at the rtl code for a function and outputs assembler code.
@@ -173,10 +172,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;
@@ -298,8 +293,6 @@ end_final (filename)
/* Zero word. */
assemble_integer (const0_rtx, long_bytes, align2, 1);
- fprintf(asm_out_file,".stabs \"bbset\", 25, 0, 0, LPBX0\n");
-
/* Address of filename. */
ASM_GENERATE_INTERNAL_LABEL (name, "LPBX", 1);
assemble_integer (gen_rtx_SYMBOL_REF (Pmode, name), pointer_bytes,
@@ -1529,9 +1522,6 @@ final_start_function (first, file, optimize)
leaf_renumber_regs (first);
#endif
- if (profile_block_flag)
- add_bb (file);
-
/* The Sun386i and perhaps other machines don't work right
if the profiling code comes after the prologue. */
#ifdef PROFILE_BEFORE_PROLOGUE
@@ -1572,8 +1562,6 @@ final_start_function (first, file, optimize)
if (! HAVE_prologue)
#endif
profile_after_prologue (file);
-
- profile_label_no++;
}
static void
@@ -1605,7 +1593,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
@@ -1635,7 +1623,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)
@@ -1680,9 +1668,6 @@ final_end_function ()
/* And debug output. */
(*debug_hooks->end_epilogue) ();
- if (profile_block_flag)
- add_bb (file);
-
#if defined (DWARF2_UNWIND_INFO)
if (write_symbols != DWARF2_DEBUG && write_symbols != VMS_AND_DWARF2_DEBUG
&& dwarf2out_do_frame ())
@@ -1862,6 +1847,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:
@@ -2975,13 +2961,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. */
@@ -3227,7 +3226,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");
@@ -3319,7 +3318,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);
}
@@ -3471,6 +3470,7 @@ output_addr_const (file, x)
case ZERO_EXTEND:
case SIGN_EXTEND:
+ case SUBREG:
output_addr_const (file, XEXP (x, 0));
break;
OpenPOWER on IntegriCloud