This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Correct internal prototype of __builtin_saveregs



  In message <20000803182702.A23598@wolery.cumb.org>you write:
  > On Thu, Aug 03, 2000 at 09:23:36AM -0600, Jeffrey A Law wrote:
  > > 
  > >   In message <20000802100815.D29910@wolery.cumb.org>you write:
  > >   > When compiling libgcc on targets that don't need a specialized
  > >   > __builtin_saveregs, we get a warning about no previous prototype for
  > >   > the function, despite the fact that it's prototyped in libgcc2.h. Thi
  > s
  > >   > is because the internal declaration has no prototype.
  > >   > 
  > >   > This patch changes c_common_nodes_and_builtins such that __builtin_sa
  > veregs
  > >   > is given a (void) prototype.  __builtin_apply_args and __builtin_next
  > _arg
  > >   > keep their unspecified prototype.
  > >   > 
  > >   > [Are these routines still used?  They appear to be only for the old
  > >   > varargs implementation.]
  > >   > 
  > >   > Bootstrapped i386-linux.  OK to commit?
  > >   > 
  > >   > zw
  > >   > 
  > >   > 	* c-common.c (c_common_nodes_and_builtins): Add ptr_ftype_any
  > >   > 	function type.  Change ptr_ftype to be void * (void).  Give
  > >   > 	__builtin_next_arg and __builtin_apply_args ptr_ftype_any.
  > > I don't think those routines are used anymore.  I'd rather remove them if
  > > they're no longer supported.
  > 
  > I'm not familiar with this code enough to say for sure, but it appears
  > to me that __builtin_saveregs is still used.  And even if it isn't, I
  > bet we're stuck with it, because it's an actual routine in libgcc.
  > (Remember __register_frame?)
__builtin_saveregs is still used.  The rest aren't.  

FWIW, I believe the only port which needed a libcall for __builtin_saveregs
was the m88k, others emitted it inline.  [ The sparc once called to libgcc
for __builtin_saveregs, but I believe that was fixed years ago. ]

jeff


  > 
  > zw
  > 



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]