aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2005-06-08 14:29:36 -0700
committerRichard Henderson <rth@gcc.gnu.org>2005-06-08 14:29:36 -0700
commitbd8633a3c03adc21fb6720b0febfe0c29cb48f98 (patch)
tree4fceb7ba2edf24540914e2126dd69a0383502883 /gcc/config
parent8713190c2bad19c00c84838c04ece84b9069f01b (diff)
downloadgcc-bd8633a3c03adc21fb6720b0febfe0c29cb48f98.zip
gcc-bd8633a3c03adc21fb6720b0febfe0c29cb48f98.tar.gz
gcc-bd8633a3c03adc21fb6720b0febfe0c29cb48f98.tar.bz2
ia64.h (NO_PROFILE_COUNTERS): New.
* config/ia64/ia64.h (NO_PROFILE_COUNTERS): New. * config/ia64/ia64.c (ia64_output_function_profiler): Honor it. Emit out3 load right after alloc. From-SVN: r100781
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/ia64/ia64.c33
-rw-r--r--gcc/config/ia64/ia64.h3
2 files changed, 23 insertions, 13 deletions
diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c
index 5297f5e..3531d07 100644
--- a/gcc/config/ia64/ia64.c
+++ b/gcc/config/ia64/ia64.c
@@ -8554,26 +8554,33 @@ ia64_vector_mode_supported_p (enum machine_mode mode)
void
ia64_output_function_profiler (FILE *file, int labelno)
{
- char buf[20];
- ASM_GENERATE_INTERNAL_LABEL (buf, "LP", labelno);
-
if (TARGET_GNU_AS)
fputs ("\t.prologue 4, r40\n", file);
else
fputs ("\t.prologue\n\t.save ar.pfs, r40\n", file);
fputs ("\talloc out0 = ar.pfs, 8, 0, 4, 0\n", file);
+
+ if (NO_PROFILE_COUNTERS)
+ fputs ("\tmov out3 = r0\n\t;;\n", file);
+ else
+ {
+ char buf[20];
+ ASM_GENERATE_INTERNAL_LABEL (buf, "LP", labelno);
+
+ if (TARGET_AUTO_PIC)
+ fputs ("\tmovl out3 = @gprel(", file);
+ else
+ fputs ("\taddl out3 = @ltoff(", file);
+ assemble_name (file, buf);
+ if (TARGET_AUTO_PIC)
+ fputs (")\n\t;;\n", file);
+ else
+ fputs ("), r1\n\t;;\n", file);
+ }
+
fputs ("\t.save rp, r42\n", file);
- fputs ("\tmov out2 = b0\n\t;;\n", file);
+ fputs ("\tmov out2 = b0\n", file);
fputs ("\t.body\n", file);
- if (TARGET_AUTO_PIC)
- fputs ("\tmovl out3 = @gprel(", file);
- else
- fputs ("\taddl out3 = @ltoff(", file);
- assemble_name (file, buf);
- if (TARGET_AUTO_PIC)
- fputs (")\n", file);
- else
- fputs ("), r1\n", file);
fputs ("\tmov out1 = r1\n", file);
fputs ("\tbr.call.sptk.many b0 = _mcount\n\t;;\n", file);
}
diff --git a/gcc/config/ia64/ia64.h b/gcc/config/ia64/ia64.h
index b9b431a..9753a5d 100644
--- a/gcc/config/ia64/ia64.h
+++ b/gcc/config/ia64/ia64.h
@@ -1267,6 +1267,9 @@ do { \
#undef FUNCTION_PROFILER
#define FUNCTION_PROFILER(FILE, LABELNO) \
ia64_output_function_profiler(FILE, LABELNO)
+
+/* Neither hpux nor linux use profile counters. */
+#define NO_PROFILE_COUNTERS 1
/* Trampolines for Nested Functions. */