Commit bd8633a3 by Richard Henderson Committed by Richard Henderson

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
parent 8713190c
2005-06-08 Richard Henderson <rth@redhat.com>
* config/ia64/ia64.h (NO_PROFILE_COUNTERS): New.
* config/ia64/ia64.c (ia64_output_function_profiler): Honor it.
Emit out3 load right after alloc.
2005-06-08 Aldy Hernandez <aldyh@redhat.com> 2005-06-08 Aldy Hernandez <aldyh@redhat.com>
* config/rs6000/linuxspe.h (SUBSUBTARGET_OVERRIDE_OPTIONS): Use * config/rs6000/linuxspe.h (SUBSUBTARGET_OVERRIDE_OPTIONS): Use
......
...@@ -8554,26 +8554,33 @@ ia64_vector_mode_supported_p (enum machine_mode mode) ...@@ -8554,26 +8554,33 @@ ia64_vector_mode_supported_p (enum machine_mode mode)
void void
ia64_output_function_profiler (FILE *file, int labelno) ia64_output_function_profiler (FILE *file, int labelno)
{ {
char buf[20];
ASM_GENERATE_INTERNAL_LABEL (buf, "LP", labelno);
if (TARGET_GNU_AS) if (TARGET_GNU_AS)
fputs ("\t.prologue 4, r40\n", file); fputs ("\t.prologue 4, r40\n", file);
else else
fputs ("\t.prologue\n\t.save ar.pfs, r40\n", file); fputs ("\t.prologue\n\t.save ar.pfs, r40\n", file);
fputs ("\talloc out0 = ar.pfs, 8, 0, 4, 0\n", file); fputs ("\talloc out0 = ar.pfs, 8, 0, 4, 0\n", file);
fputs ("\t.save rp, r42\n", file);
fputs ("\tmov out2 = b0\n\t;;\n", file); if (NO_PROFILE_COUNTERS)
fputs ("\t.body\n", file); fputs ("\tmov out3 = r0\n\t;;\n", file);
else
{
char buf[20];
ASM_GENERATE_INTERNAL_LABEL (buf, "LP", labelno);
if (TARGET_AUTO_PIC) if (TARGET_AUTO_PIC)
fputs ("\tmovl out3 = @gprel(", file); fputs ("\tmovl out3 = @gprel(", file);
else else
fputs ("\taddl out3 = @ltoff(", file); fputs ("\taddl out3 = @ltoff(", file);
assemble_name (file, buf); assemble_name (file, buf);
if (TARGET_AUTO_PIC) if (TARGET_AUTO_PIC)
fputs (")\n", file); fputs (")\n\t;;\n", file);
else else
fputs ("), r1\n", file); fputs ("), r1\n\t;;\n", file);
}
fputs ("\t.save rp, r42\n", file);
fputs ("\tmov out2 = b0\n", file);
fputs ("\t.body\n", file);
fputs ("\tmov out1 = r1\n", file); fputs ("\tmov out1 = r1\n", file);
fputs ("\tbr.call.sptk.many b0 = _mcount\n\t;;\n", file); fputs ("\tbr.call.sptk.many b0 = _mcount\n\t;;\n", file);
} }
......
...@@ -1268,6 +1268,9 @@ do { \ ...@@ -1268,6 +1268,9 @@ do { \
#define FUNCTION_PROFILER(FILE, LABELNO) \ #define FUNCTION_PROFILER(FILE, LABELNO) \
ia64_output_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. */ /* Trampolines for Nested Functions. */
/* We need 32 bytes, so we can save the sp, ar.rnat, ar.bsp, and ar.pfs of /* We need 32 bytes, so we can save the sp, ar.rnat, ar.bsp, and ar.pfs of
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment