pa.c (hppa_expand_prologue): Don't save the PIC register into the stack for functions...
authorJeff Law <law@gcc.gnu.org>
Mon, 27 Feb 1995 07:30:31 +0000 (00:30 -0700)
committerJeff Law <law@gcc.gnu.org>
Mon, 27 Feb 1995 07:30:31 +0000 (00:30 -0700)
        * pa.c (hppa_expand_prologue): Don't save the PIC register into
        the stack for functions which have no stack of their own.

From-SVN: r9089

gcc/config/pa/pa.c

index 1b07661287c2ea25cbdbd645160eb8215771bb9e..e53949468df65e1bdee096f84926c4343d3fa1e4 100644 (file)
@@ -2198,8 +2198,11 @@ hppa_expand_prologue()
       }
   /* The hppa calling conventions say that that %r19, the pic offset
      register, is saved at sp - 32 (in this function's frame)  when
-     generating PIC code.  */
-  if (flag_pic)
+     generating PIC code.  FIXME:  What is the correct thing to do
+     for functions which make no calls and allocate no frame?  Do
+     we need to allocate a frame, or can we just omit the save?   For
+     now we'll just omit the save.  */
+  if (actual_fsize != 0 && flag_pic)
     store_reg (PIC_OFFSET_TABLE_REGNUM, -32, STACK_POINTER_REGNUM);
 
   /* Profiling code.