summaryrefslogtreecommitdiff
path: root/gcc/config/sparc/gmon-sol2.c
diff options
context:
space:
mode:
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>1999-03-07 05:46:30 +0000
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>1999-03-07 05:46:30 +0000
commitc4f04114ca61fb4f3fb85fb5ef172d9f8cc7b4bb (patch)
treee750714112ade3305dbee6b5b734542942face4d /gcc/config/sparc/gmon-sol2.c
parente54a8f52359ce0b08a753a4b6b2a104d2b61bded (diff)
downloadgcc-c4f04114ca61fb4f3fb85fb5ef172d9f8cc7b4bb.tar.gz
* gmon-sol2.c: Include config.h and system.h. Don't redundantly
include system header files. (sccsid): Remove. (moncontrol, monstartup, _mcleanup, internal_mcount): Prototype. (_mcleanup): Add the `const' keyword to a char*. (internal_mcount): Declare `etext' as a char[] not a function. Cast `etext' to char* when calling `monstartup'. * sparc.c (frame_base_name, save_regs, restore_regs, build_big_number, sparc_cmodel_string, sparc_align_loops_string, sparc_align_jumps_string, sparc_align_funcs_string, code_model, cpu_default, cpu_table, output_function_prologue, output_function_epilogue, output_return, sparc_flat_output_function_prologue, ultra_code_names, sparc_flat_output_function_epilogue): Constify a char*. (hypersparc_adjust_cost): Add a default case in a switch. * sparc.h (sparc_cmodel_string, OVERRIDE_OPTIONS, sparc_cpu_select, sparc_align_loops_string, sparc_align_jumps_string, sparc_align_funcs_string, output_return): Constify a char*. * sparc.md (movdi): Change the comparison of HOST_BITS_PER_WIDE_INT so that we check "== 32", instead of "!= 64". Cast a value to HOST_WIDE_INT when comparing against one. Hide the declaration for variable `chain'. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@25627 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/sparc/gmon-sol2.c')
-rw-r--r--gcc/config/sparc/gmon-sol2.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/gcc/config/sparc/gmon-sol2.c b/gcc/config/sparc/gmon-sol2.c
index 2a5b898353d..a6abcabcc51 100644
--- a/gcc/config/sparc/gmon-sol2.c
+++ b/gcc/config/sparc/gmon-sol2.c
@@ -35,16 +35,8 @@
* for Cygnus Support, July 1992.
*/
-#ifndef lint
-static char sccsid[] = "@(#)gmon.c 5.3 (Berkeley) 5/22/91";
-#endif /* not lint */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <limits.h>
-#include <unistd.h>
-#include <fcntl.h>
+#include "config.h"
+#include "system.h"
#if 0
#include "sparc/gmon.h"
@@ -96,7 +88,9 @@ static int s_scale;
#define MSG "No space for profiling buffer(s)\n"
-static void moncontrol();
+static void moncontrol PROTO ((int));
+extern void monstartup PROTO ((char *, char *));
+extern void _mcleanup PROTO ((void));
void monstartup(lowpc, highpc)
char *lowpc;
@@ -185,7 +179,7 @@ _mcleanup()
int toindex;
struct rawarc rawarc;
char *profdir;
- char *proffile;
+ const char *proffile;
char *progname;
char buf[PATH_MAX];
extern char **___Argv;
@@ -275,6 +269,8 @@ _mcleanup()
* -- [eichin:19920702.1107EST]
*/
+static void internal_mcount PROTO((char *, unsigned short *)) ATTRIBUTE_UNUSED;
+
/* i7 == last ret, -> frompcindex */
/* o7 == current ret, -> selfpc */
/* Solaris 2 libraries use _mcount. */
@@ -297,9 +293,9 @@ static void internal_mcount(selfpc, frompcindex)
*/
if(!already_setup) {
- extern etext();
+ extern char etext[];
already_setup = 1;
- monstartup(0, etext);
+ monstartup(0, (char *)etext);
#ifdef USE_ONEXIT
on_exit(_mcleanup, 0);
#else