mips.h (FUNCTION_PROFILER): _mcount() doesn't pop 2 words in new abis.
authorChris Demetriou <cgd@broadcom.com>
Fri, 14 Mar 2003 15:53:48 +0000 (15:53 +0000)
committerAlexandre Oliva <aoliva@gcc.gnu.org>
Fri, 14 Mar 2003 15:53:48 +0000 (15:53 +0000)
* config/mips/mips.h (FUNCTION_PROFILER): _mcount() doesn't pop 2
words in new abis.

From-SVN: r64364

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

index 3069374696f0ce878a0b68de9ea80a432cdf00c0..75a31316d160052cc63ff3f7cd4ff76fcff4dfa2 100644 (file)
@@ -1,3 +1,8 @@
+2003-03-14  Chris Demetriou  <cgd@broadcom.com>, Alexandre Oliva  <aoliva@redhat.com>
+
+       * config/mips/mips.h (FUNCTION_PROFILER): _mcount() doesn't pop 2
+       words in new abis.
+
 2003-03-14  Eric Botcazou  <ebotcazou@libertysurf.fr>
 
        PR optimization/8396
index 2064ace96ebe17d88600338d6a316a3493f215af..9c6fefd298fd566e798a57b9e2cbbdbb9170e083 100644 (file)
@@ -2921,12 +2921,15 @@ typedef struct mips_args {
   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,                                                       \
-          "\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);                                   \
+  if (mips_abi != ABI_N32 && mips_abi != ABI_64)                       \
+    {                                                                  \
+      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, "\tjal\t_mcount\n");                                   \
   fprintf (FILE, "\t.set\tat\n");                                      \
 }