2002-02-01 Eric Christopher <echristo@redhat.com>
authorEric Christopher <echristo@gcc.gnu.org>
Sat, 2 Feb 2002 03:54:39 +0000 (03:54 +0000)
committerEric Christopher <echristo@gcc.gnu.org>
Sat, 2 Feb 2002 03:54:39 +0000 (03:54 +0000)
From Daniel Jacobowitz <dmj+@andrew.cmu.edu>
* config/mips/mips.h (FUNCTION_PROFILER): Fix function profiling.
* config/mips/linux.h (ASM_OUTPUT_REG_PUSH): Undefine.
(ASM_OUTPUT_REG_POP): Ditto.

From-SVN: r49423

gcc/ChangeLog
gcc/config/mips/linux.h
gcc/config/mips/mips.h

index 4086e1d2ff9c1fdf08c3cf23c2daf710c2bd1972..5279c5678514cdcd22ae7e005049eb25fece2453 100644 (file)
@@ -1,3 +1,10 @@
+2002-02-01  Eric Christopher  <echristo@redhat.com>
+
+       From Daniel Jacobowitz <dmj+@andrew.cmu.edu>
+       * config/mips/mips.h (FUNCTION_PROFILER): Fix function profiling.
+       * config/mips/linux.h (ASM_OUTPUT_REG_PUSH): Undefine.
+       (ASM_OUTPUT_REG_POP): Ditto.
+
 2002-02-02  Neil Booth  <neil@daikokuya.demon.co.uk>
 
        * c-decl.c, tree.c, tree.h, objc/objc-act.c: Revert bitfield
@@ -52,7 +59,7 @@
         (movqi): Likewise.
         * config/stormy16/stormy16.h (PREDICATE_CODES): Add
         nonimmediate_nonstack_operand.
-        * config/stormy16/stormy16.c (nonimmediate_nonstack_operand): 
+        * config/stormy16/stormy16.c (nonimmediate_nonstack_operand):
         New.
         * config/stormy16/stormy16-protos.h (nonimmediate_nonstack_operand)
         New.
index 70901e79e774e9d01709e46b271767efa531db4d..7d4fc9a32209c270eb183ac7655ee8eadb1b29e7 100644 (file)
@@ -279,3 +279,9 @@ void FN ()                                                  \
 /* Tell function_prologue in mips.c that we have already output the .ent/.end
    pseudo-ops.  */
 #define FUNCTION_NAME_ALREADY_DECLARED
+
+/* The glibc _mcount stub will save $v0 for us.  Don't mess with saving
+   it, since ASM_OUTPUT_REG_PUSH/ASM_OUTPUT_REG_POP do not work in the
+   presence of $gp-relative calls.  */
+#undef ASM_OUTPUT_REG_PUSH
+#undef ASM_OUTPUT_REG_POP
index 2471cfc5da15f37f63f73cb7efc552b01cd20218..64ddf58e7158f8fe400d97d1f29abafb6d347fd8 100644 (file)
@@ -2869,18 +2869,16 @@ typedef struct mips_args {
 {                                                                      \
   if (TARGET_MIPS16)                                                   \
     sorry ("mips16 function profiling");                               \
-  fprintf (FILE, "\t.set\tnoreorder\n");                               \
   fprintf (FILE, "\t.set\tnoat\n");                                    \
   fprintf (FILE, "\tmove\t%s,%s\t\t# save current return address\n",   \
           reg_names[GP_REG_FIRST + 1], reg_names[GP_REG_FIRST + 31]);  \
-  fprintf (FILE, "\tjal\t_mcount\n");                                  \
   fprintf (FILE,                                                       \
           "\t%s\t%s,%s,%d\t\t# _mcount pops 2 words from  stack\n",    \
           TARGET_64BIT ? "dsubu" : "subu",                             \
           reg_names[STACK_POINTER_REGNUM],                             \
           reg_names[STACK_POINTER_REGNUM],                             \
           Pmode == DImode ? 16 : 8);                                   \
-  fprintf (FILE, "\t.set\treorder\n");                                 \
+  fprintf (FILE, "\tjal\t_mcount\n");                                   \
   fprintf (FILE, "\t.set\tat\n");                                      \
 }