]> oss.titaniummirror.com Git - msp430-gcc.git/blobdiff - gcc/config/sparc/gmon-sol2.c
Imported gcc-4.4.3
[msp430-gcc.git] / gcc / config / sparc / gmon-sol2.c
index bcb0c060358aead42796712cd21a2a969727527f..aeead8922fad934176ab3b81c0a418b430f98d90 100644 (file)
  * SUCH DAMAGE.
  */
 
-/* Mangled into a form that works on Sparc Solaris 2 by Mark Eichin
+/* Mangled into a form that works on SPARC Solaris 2 by Mark Eichin
  * for Cygnus Support, July 1992.
  */
 
-#include "config.h"
-#include "system.h"
+#include "tconfig.h"
+#include "tsystem.h"
+#include <fcntl.h> /* for creat() */
+#include "coretypes.h"
+#include "tm.h"
 
 #if 0
 #include "sparc/gmon.h"
@@ -85,13 +88,11 @@ static int  s_scale;
 
 #define        MSG "No space for profiling buffer(s)\n"
 
-static void moncontrol PARAMS ((int));
-extern void monstartup PARAMS ((char *, char *));
-extern void _mcleanup  PARAMS ((void));
+static void moncontrol (int);
+extern void monstartup (char *, char *);
+extern void _mcleanup (void);
 
-void monstartup(lowpc, highpc)
-    char       *lowpc;
-    char       *highpc;
+void monstartup(char *lowpc, char *highpc)
 {
     int                        monsize;
     char               *buffer;
@@ -167,7 +168,7 @@ void monstartup(lowpc, highpc)
 }
 
 void
-_mcleanup()
+_mcleanup(void)
 {
     int                        fd;
     int                        fromindex;
@@ -232,7 +233,7 @@ _mcleanup()
 }
 
 /*
- * The Sparc stack frame is only held together by the frame pointers
+ * The SPARC stack frame is only held together by the frame pointers
  * in the register windows. According to the SVR4 SPARC ABI
  * Supplement, Low Level System Information/Operating System
  * Interface/Software Trap Types, a type 3 trap will flush all of the
@@ -266,7 +267,7 @@ _mcleanup()
  * -- [eichin:19920702.1107EST]
  */
 
-static void internal_mcount PARAMS ((char *, unsigned short *)) ATTRIBUTE_UNUSED;
+static void internal_mcount (char *, unsigned short *) __attribute__ ((used));
 
 /* i7 == last ret, -> frompcindex */
 /* o7 == current ret, -> selfpc */
@@ -275,9 +276,7 @@ asm(".global _mcount; _mcount: mov %i7,%o1; mov %o7,%o0;b,a internal_mcount");
 /* This is for compatibility with old versions of gcc which used mcount.  */
 asm(".global mcount; mcount: mov %i7,%o1; mov %o7,%o0;b,a internal_mcount");
 
-static void internal_mcount(selfpc, frompcindex)
-       register char                   *selfpc;
-       register unsigned short         *frompcindex;
+static void internal_mcount(char *selfpc, unsigned short *frompcindex)
 {
        register struct tostruct        *top;
        register struct tostruct        *prevtop;
@@ -407,8 +406,7 @@ overflow:
  *     profiling is what mcount checks to see if
  *     all the data structures are ready.
  */
-static void moncontrol(mode)
-    int mode;
+static void moncontrol(int mode)
 {
     if (mode) {
        /* start */