diff options
| author | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-07-13 04:40:23 +0000 |
|---|---|---|
| committer | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-07-13 04:40:23 +0000 |
| commit | bad4935b3dbe6d13f20e73e54918e8decedf07fe (patch) | |
| tree | 368fea8b37e9a35afe1a0e8331dd2883719c3905 | |
| parent | a5ac298a4a7f6eaf9a98b59ffb72faf95bb61407 (diff) | |
| download | ppe42-gcc-bad4935b3dbe6d13f20e73e54918e8decedf07fe.tar.gz ppe42-gcc-bad4935b3dbe6d13f20e73e54918e8decedf07fe.zip | |
* final.c (profile_function): Do not emit profile counters in
the data section, if NO_PROFILE_COUNTERS is defined.
* tm.texi: Document NO_PROFILE_COUNTERS. Update doc for
FUNCTION_PROFILER.
* config/i386/linux.h (NO_PROFILE_COUNTERS): Define.
(FUNCTION_PROFILER): Just emit a call to mcount.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35005 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/ChangeLog | 10 | ||||
| -rw-r--r-- | gcc/config/i386/linux.h | 18 | ||||
| -rw-r--r-- | gcc/final.c | 4 |
3 files changed, 21 insertions, 11 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ad325ba9068..38638132d4b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,15 @@ 2000-07-12 Zack Weinberg <zack@wolery.cumb.org> + * final.c (profile_function): Do not emit profile counters in + the data section, if NO_PROFILE_COUNTERS is defined. + * tm.texi: Document NO_PROFILE_COUNTERS. Update doc for + FUNCTION_PROFILER. + + * config/i386/linux.h (NO_PROFILE_COUNTERS): Define. + (FUNCTION_PROFILER): Just emit a call to mcount. + +2000-07-12 Zack Weinberg <zack@wolery.cumb.org> + * tradcpp.c (main): Rename 'perror' label to 'sys_error'. * cppexp.c, cpphash.c, cpphash.h, cppinit.c, cpplex.c, diff --git a/gcc/config/i386/linux.h b/gcc/config/i386/linux.h index c661e37b119..9cb332c3096 100644 --- a/gcc/config/i386/linux.h +++ b/gcc/config/i386/linux.h @@ -54,23 +54,19 @@ Boston, MA 02111-1307, USA. */ #undef DBX_REGISTER_NUMBER #define DBX_REGISTER_NUMBER(n) svr4_dbx_register_map[n] -/* Output assembler code to FILE to increment profiler label # LABELNO - for profiling a function entry. */ +/* Output assembler code to FILE to call the profiler. + To the best of my knowledge, no Linux libc has required the label + argument to mcount. */ + +#define NO_PROFILE_COUNTERS #undef FUNCTION_PROFILER #define FUNCTION_PROFILER(FILE, LABELNO) \ { \ if (flag_pic) \ - { \ - fprintf (FILE, "\tleal %sP%d@GOTOFF(%%ebx),%%edx\n", \ - LPREFIX, (LABELNO)); \ - fprintf (FILE, "\tcall *mcount@GOT(%%ebx)\n"); \ - } \ + fprintf (FILE, "\tcall\t*mcount@GOT(%%ebx)\n"); \ else \ - { \ - fprintf (FILE, "\tmovl $%sP%d,%%edx\n", LPREFIX, (LABELNO)); \ - fprintf (FILE, "\tcall mcount\n"); \ - } \ + fprintf (FILE, "\tcall\tmcount\n"); \ } #undef SIZE_TYPE diff --git a/gcc/final.c b/gcc/final.c index be4a01e0bc3..e655637644f 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -1705,7 +1705,9 @@ static void profile_function (file) FILE *file; { +#ifndef NO_PROFILE_COUNTERS int align = MIN (BIGGEST_ALIGNMENT, LONG_TYPE_SIZE); +#endif #if defined(ASM_OUTPUT_REG_PUSH) #if defined(STRUCT_VALUE_INCOMING_REGNUM) || defined(STRUCT_VALUE_REGNUM) int sval = current_function_returns_struct; @@ -1715,10 +1717,12 @@ profile_function (file) #endif #endif /* ASM_OUTPUT_REG_PUSH */ +#ifndef NO_PROFILE_COUNTERS 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 function_section (current_function_decl); |

