summaryrefslogtreecommitdiff
path: root/lang/gcc-ooo/files/patch-ai
diff options
context:
space:
mode:
authorJohn Polstra <jdp@FreeBSD.org>1998-10-08 21:33:02 +0000
committerJohn Polstra <jdp@FreeBSD.org>1998-10-08 21:33:02 +0000
commit71e64d35d1945c6fe5b34a508464ecb4fe67c97a (patch)
tree5ed597ae91fff10a35e6521c2091ab56661367d4 /lang/gcc-ooo/files/patch-ai
parentCosmetic changes (diff)
Make profiling work.
Notes
Notes: svn path=/head/; revision=13754
Diffstat (limited to 'lang/gcc-ooo/files/patch-ai')
-rw-r--r--lang/gcc-ooo/files/patch-ai54
1 files changed, 54 insertions, 0 deletions
diff --git a/lang/gcc-ooo/files/patch-ai b/lang/gcc-ooo/files/patch-ai
new file mode 100644
index 000000000000..4395574d635a
--- /dev/null
+++ b/lang/gcc-ooo/files/patch-ai
@@ -0,0 +1,54 @@
+--- gcc/final.c.orig Sat Sep 5 22:52:01 1998
++++ gcc/final.c Wed Oct 7 17:06:58 1998
+@@ -383,6 +383,8 @@
+ /* zero word */
+ assemble_integer (const0_rtx, long_bytes, 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, 1);
+@@ -1635,6 +1637,9 @@
+ 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
+@@ -1696,7 +1701,9 @@
+ profile_function (file)
+ FILE *file;
+ {
++#ifndef NO_PROFILE_DATA
+ int align = MIN (BIGGEST_ALIGNMENT, LONG_TYPE_SIZE);
++#endif /* not NO_PROFILE_DATA */
+ #if defined(ASM_OUTPUT_REG_PUSH)
+ #if defined(STRUCT_VALUE_INCOMING_REGNUM) || defined(STRUCT_VALUE_REGNUM)
+ int sval = current_function_returns_struct;
+@@ -1706,10 +1713,12 @@
+ #endif
+ #endif /* ASM_OUTPUT_REG_PUSH */
+
++#ifndef NO_PROFILE_DATA
+ data_section ();
+ ASM_OUTPUT_ALIGN (file, floor_log2 (align / BITS_PER_UNIT));
+ ASM_OUTPUT_INTERNAL_LABEL (file, "LP", profile_label_no);
+ assemble_integer (const0_rtx, LONG_TYPE_SIZE / BITS_PER_UNIT, 1);
++#endif /* not NO_PROFILE_DATA */
+
+ function_section (current_function_decl);
+
+@@ -1800,6 +1809,9 @@
+ code to restore the stack frame and return to the caller. */
+ FUNCTION_EPILOGUE (file, get_frame_size ());
+ #endif
++
++ if (profile_block_flag)
++ add_bb (file);
+
+ #ifdef SDB_DEBUGGING_INFO
+ if (write_symbols == SDB_DEBUG)