summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1995-12-26 01:34:39 +0000
committerbde <bde@FreeBSD.org>1995-12-26 01:34:39 +0000
commit8dd11ac8d714e7ff5cfdbd232f4ccf0d0b87e9f5 (patch)
tree912fbe015a5ce9247cf1fb56edda613abeec2c08 /gnu/usr.bin
parentb5a75e1d63da02d6e929d5917307022bdb4f292a (diff)
downloadFreeBSD-src-8dd11ac8d714e7ff5cfdbd232f4ccf0d0b87e9f5.zip
FreeBSD-src-8dd11ac8d714e7ff5cfdbd232f4ccf0d0b87e9f5.tar.gz
Enabled my FUNCTION_PROFILER_EPILOGUE code and added option
-mprofiler-epilogue to support it and documented the option. cc.1: Listed all the machine-dependent options, even the temporary debugging ones. invoke.texi: Fixed the sense of -mno-ieee-fp. Sorted the machine-dependent options.
Diffstat (limited to 'gnu/usr.bin')
-rw-r--r--gnu/usr.bin/cc/cc/cc.118
-rw-r--r--gnu/usr.bin/cc/doc/invoke.texi17
-rw-r--r--gnu/usr.bin/cc/include/tm.h22
3 files changed, 45 insertions, 12 deletions
diff --git a/gnu/usr.bin/cc/cc/cc.1 b/gnu/usr.bin/cc/cc/cc.1
index 223115c..1a52039 100644
--- a/gnu/usr.bin/cc/cc/cc.1
+++ b/gnu/usr.bin/cc/cc/cc.1
@@ -20,7 +20,7 @@
.if n .sp
.if t .sp 0.4
..
-.Id $Id: gcc.1,v 1.4 1993/10/13 23:19:12 pesch Exp $
+.Id $Id: cc.1,v 1.2 1994/11/15 04:51:29 phk Exp $
.TH GCC 1 "\*(Dt" "GNU Tools" "GNU Tools"
.SH NAME
gcc, g++ \- GNU project C and C++ Compiler (v2.6)
@@ -438,7 +438,17 @@ in the following sections.
\-m486
\-mno\-486
\-msoft\-float
+\-mrtd
+\-mregparm
+\-msvr3\-shlib
+\-mno\-ieee\-fp
\-mno\-fp\-ret\-in\-387
+\-mfancy\-math\-387
+\-mno\-wide\-multiply
+\-mdebug\-addr
+\-mno\-move
+\-mprofiler\-epilogue
+\-reg\-alloc=LIST
.Sp
.I HPPA Options
.br
@@ -3490,6 +3500,7 @@ assembler files (with a `\|\c
These `\|\c
.B \-m\c
\&\|' options are defined for the Intel 80386 family of computers:
+.TP
.B \-m486
.TP
.B \-mno\-486
@@ -3526,6 +3537,11 @@ The option `\|\c
.B \-mno-fp-ret-in-387\c
\&\|' causes such values to be returned
in ordinary CPU registers instead.
+.TP
+.B \-mprofiler-epilogue
+.TP
+.B \-mno-profiler-epilogue
+Generate extra code to write profile information for function exits.
.PP
These `\|\c
.B \-m\c
diff --git a/gnu/usr.bin/cc/doc/invoke.texi b/gnu/usr.bin/cc/doc/invoke.texi
index d3fc4f3..54534a0 100644
--- a/gnu/usr.bin/cc/doc/invoke.texi
+++ b/gnu/usr.bin/cc/doc/invoke.texi
@@ -274,9 +274,10 @@ in addition to the above:
-mstats -G @var{num} -nocpp
@emph{i386 Options}
--m486 -mieee-fp -mno-486 -mno-fancy-math-387
--mno-fp-ret-in-387 -msoft-float -msvr3-shlib
--mno-wide-multiply -mreg-alloc=@var{list}
+-m486 -mno-486 -mno-fancy-math-387
+-mno-fp-ret-in-387 -mno-ieee-fp -mno-wide-multiply
+-mprofiler-epilogue -msoft-float -msvr3-shlib
+-mreg-alloc=@var{list}
@emph{HPPA Options}
-mdisable-fpregs -mdisable-indexing -mjump-in-delay
@@ -3481,8 +3482,8 @@ These @samp{-m} options are defined for the i386 family of computers:
Control whether or not code is optimized for a 486 instead of an
386. Code generated for an 486 will run on a 386 and vice versa.
-@item -mieee-fp
-@itemx -m-no-ieee-fp
+@item -mno-ieee-fp
+@itemx -mieee-fp
Control whether or not the compiler uses IEEE floating point
comparisons. These handle correctly the case where the result of a
comparison is unordered.
@@ -3529,6 +3530,12 @@ Control whether GNU CC uses the @code{mul} and @code{imul} that produce
64 bit results in @code{eax:edx} from 32 bit operands to do @code{long
long} multiplies and 32-bit division by constants.
+@item -mprofiler-epilogue
+@itemx -mno-profiler-epilogue
+Generate extra code to write profile information for function exits.
+This option has no effect except in combination with @samp{-g} or
+@samp{-pg}.
+
@item -mreg-alloc=@var{regs}
Control the default allocation order of integer registers. The
string @var{regs} is a series of letters specifing a register. The
diff --git a/gnu/usr.bin/cc/include/tm.h b/gnu/usr.bin/cc/include/tm.h
index 4b2909b..14aa504 100644
--- a/gnu/usr.bin/cc/include/tm.h
+++ b/gnu/usr.bin/cc/include/tm.h
@@ -27,6 +27,15 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
/* Get perform_* macros to build libgcc.a. */
#include "i386/perform.h"
+#define MASK_PROFILER_EPILOGUE 010000000000
+
+#define TARGET_PROFILER_EPILOGUE (target_flags & MASK_PROFILER_EPILOGUE)
+
+#undef SUBTARGET_SWITCHES
+#define SUBTARGET_SWITCHES \
+ { "profiler-epilogue", MASK_PROFILER_EPILOGUE}, \
+ { "no-profiler-epilogue", -MASK_PROFILER_EPILOGUE},
+
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "-Dunix -Di386 -D__FreeBSD__=2 -Asystem(unix) -Asystem(FreeBSD) -Acpu(i386) -Amachine(i386)"
@@ -83,15 +92,16 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
fprintf (FILE, "\tcall mcount\n"); \
}
-#if 0 /* not ready for this; it should be decided at compile time */
#define FUNCTION_PROFILER_EPILOGUE(FILE) \
{ \
- if (flag_pic) \
- fprintf (FILE, "\tcall *mexitcount@GOT(%%ebx)\n"); \
- else \
- fprintf (FILE, "\tcall mexitcount\n"); \
+ if (TARGET_PROFILER_EPILOGUE) \
+ { \
+ if (flag_pic) \
+ fprintf (FILE, "\tcall *mexitcount@GOT(%%ebx)\n"); \
+ else \
+ fprintf (FILE, "\tcall mexitcount\n"); \
+ } \
}
-#endif
/* Override the default comment-starter of "/". */
OpenPOWER on IntegriCloud