diff options
author | Richard Stallman <rms@gnu.org> | 1992-11-22 22:40:53 +0000 |
---|---|---|
committer | Richard Stallman <rms@gnu.org> | 1992-11-22 22:40:53 +0000 |
commit | 275bb158dce4de2138b982f1155b34739e14be8c (patch) | |
tree | 55ada5296ae1e00c48ad08d7b965554c2437c72a /gcc | |
parent | 3418a1da8baf5d6c8d86d9853a5cecaefd734eb1 (diff) | |
download | gcc-275bb158dce4de2138b982f1155b34739e14be8c.zip gcc-275bb158dce4de2138b982f1155b34739e14be8c.tar.gz gcc-275bb158dce4de2138b982f1155b34739e14be8c.tar.bz2 |
(FUNCTION_PROFILER): Complete replacement.
From-SVN: r2776
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/m68k/hp320.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc/config/m68k/hp320.h b/gcc/config/m68k/hp320.h index eedf94e..312c205 100644 --- a/gcc/config/m68k/hp320.h +++ b/gcc/config/m68k/hp320.h @@ -611,7 +611,12 @@ do{ if (PREFIX[0] == 'L' && PREFIX[1] == 'I') \ #else /* not HPUX_ASM */ #undef FUNCTION_PROFILER -#define FUNCTION_PROFILER(FILE, LABELNO) \ - fprintf (FILE, "\tmovl #LP%d,d0\n\tjsr mcount\n", (LABELNO)); + +/* HP-UX needs the call to mcount before the link instruction. + Copy the return address onto the stack before the call to fake it out. */ +#define FUNCTION_PROFILER(FILE, LABEL_NO) \ + fprintf (FILE, "\tmovel a6@(4),sp@-\n" \ + "\tmovl #LP%d,a0\n\tjsr mcount\n" \ + "\taddqw #4,sp\n", (LABEL_NO)); #endif /* not HPUX_ASM */ |