Fix O32 -p bug reported by Ralf Baechle.
authorJim Wilson <wilson@cygnus.com>
Mon, 20 Oct 1997 21:16:21 +0000 (21:16 +0000)
committerJim Wilson <wilson@gcc.gnu.org>
Mon, 20 Oct 1997 21:16:21 +0000 (14:16 -0700)
* mips/mips.c (compute_frame_size): Not a leaf function if
profile_flag set.

From-SVN: r16110

gcc/ChangeLog
gcc/config/mips/mips.c

index f68a31fd135008fdde05a301436dfda16581b7fb..fbed64afa57eef7036d4af5196c75a1c0a754950 100644 (file)
@@ -1,3 +1,8 @@
+Mon Oct 20 14:15:02 1997  Jim Wilson  <wilson@cygnus.com>
+
+       * mips/mips.c (compute_frame_size): Not a leaf function if
+       profile_flag set.
+
 Mon Oct 20 14:16:38 1997  Geoffrey KEATING  <geoffk@ozemail.com.au>
 
        * rs6000/t-ppccomm: Use -msdata=none for crtstuff.
index 9cf2cc31507d37a9e9ae7ee305c0ec6b355609f5..28650fa6b134f2b48752bb6aeaeb8f2980f743f0 100644 (file)
@@ -4855,8 +4855,10 @@ compute_frame_size (size)
   /* The gp reg is caller saved in the 32 bit ABI, so there is no need
      for leaf routines (total_size == extra_size) to save the gp reg.
      The gp reg is callee saved in the 64 bit ABI, so all routines must
-     save the gp reg.  */
-  if (total_size == extra_size && (mips_abi == ABI_32 || mips_abi == ABI_EABI))
+     save the gp reg.  This is not a leaf routine if -p, because of the
+     call to mcount.  */
+  if (total_size == extra_size && (mips_abi == ABI_32 || mips_abi == ABI_EABI)
+      && ! profile_flag)
     total_size = extra_size = 0;
   else if (TARGET_ABICALLS)
     {