sparc.c:save_regs() offsets passed to dwarf2 code

David S. Miller davem@jenolan.rutgers.edu
Sun Sep 21 14:44:00 GMT 1997


   From: Jason Merrill <jason@cygnus.com>
   Date: 21 Sep 1997 13:34:29 -0700

   That may not be important, since the SPARC always uses a frame
   pointer, but you probably need to define INCOMING_FRAME_SP_OFFSET
   to STACK_BIAS.  That could reasonably be a default in dwarf2out.c.

Thanks for pointing this out.

Further inspection shows that there were some other problems because
the dwarf2out functions called by sparc.c have no prototypes, this
causes all sorts of headaches wrt. type promotions etc.

So for example, lack of prototype for dwarf2out_reg_save caused the
implicit types of the arguments to be int's, so when compiling in the
dwarf2 code, sparc.c is passing 32-bit signed quantities, and the
compiler has no reason not to expect that full 64-bit signed
quantities are being passed in.

I think all the functions exported by dwarf2out.c should be placed
into a header file, so this nonsense need not be addressed ever again,
and the next person on a 64-bit port using dwarf2 need not hit all the
headaches I have over the past few days. ;-)

Later,
David "Sparc" Miller
davem@caip.rutgers.edu



More information about the Gcc mailing list