aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/mips/mips.c
diff options
context:
space:
mode:
authorMichael Meissner <meissner@gcc.gnu.org>1992-09-16 19:59:37 +0000
committerMichael Meissner <meissner@gcc.gnu.org>1992-09-16 19:59:37 +0000
commit6f3c667fbe065bfd55007031150a56f8ccf086d2 (patch)
tree1c12bfd7c57580dc7ef3665b63a4448a2b1f05cc /gcc/config/mips/mips.c
parent4debb28042b93975d51261428f0ade39b4e02e8a (diff)
downloadgcc-6f3c667fbe065bfd55007031150a56f8ccf086d2.zip
gcc-6f3c667fbe065bfd55007031150a56f8ccf086d2.tar.gz
gcc-6f3c667fbe065bfd55007031150a56f8ccf086d2.tar.bz2
print correct number of half-pic ptrs/refs for -mstats
From-SVN: r2137
Diffstat (limited to 'gcc/config/mips/mips.c')
-rw-r--r--gcc/config/mips/mips.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index 3716aec..6cb808b 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -176,6 +176,10 @@ rtx branch_cmp[2];
/* what type of branch to use */
enum cmp_type branch_type;
+/* Number of previously seen half-pic pointers and references. */
+static int prev_half_pic_ptrs = 0;
+static int prev_half_pic_refs = 0;
+
/* which cpu are we scheduling for */
enum processor_type mips_cpu;
@@ -4428,11 +4432,17 @@ function_epilogue (file, size)
dslots_jump_total, dslots_jump_filled,
num_refs[0], num_refs[1], num_refs[2]);
- if (HALF_PIC_NUMBER_PTRS)
- fprintf (stderr, " half-pic=%3d", HALF_PIC_NUMBER_PTRS);
+ if (HALF_PIC_NUMBER_PTRS > prev_half_pic_ptrs)
+ {
+ fprintf (stderr, " half-pic=%3d", HALF_PIC_NUMBER_PTRS - prev_half_pic_ptrs);
+ prev_half_pic_ptrs = HALF_PIC_NUMBER_PTRS;
+ }
- if (HALF_PIC_NUMBER_REFS)
- fprintf (stderr, " pic-ref=%3d", HALF_PIC_NUMBER_REFS);
+ if (HALF_PIC_NUMBER_REFS > prev_half_pic_refs)
+ {
+ fprintf (stderr, " pic-ref=%3d", HALF_PIC_NUMBER_REFS - prev_half_pic_refs);
+ prev_half_pic_refs = HALF_PIC_NUMBER_REFS;
+ }
fputc ('\n', stderr);
}