This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [m68k] fix return value extraction


On Tue, Jun 06, 2006 at 12:50:41PM +0200, Andreas Schwab wrote:
> Nathan Sidwell <nathan@codesourcery.com> writes:
> 
> > + /* a.out */
> > + 
> > + void
> > + m68k_aout_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
> > + {
> > +   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
> > + 
> > +   set_gdbarch_return_value (gdbarch, m68k_return_value);
> > + 
> > +   /* aout uses %a1 */
> > +   tdep->struct_value_regnum = M68K_A1_REGNUM;
> > +   tdep->struct_return = reg_struct_return;
> > +   /* Pointers are returned in %a0 */
> > +   tdep->ptr_value_regnum = M68K_A0_REGNUM;
> 
> I don't think this is correct.  The GCC default for m68k is the old Sun3
> ABI, which returns everything in %d0 and uses pcc structure return.

Ah - sort of, but not.  I spent a while last week disecting the
configuration defaults when Nathan asked me about this.  In fact, while
m68k.h defaults to pcc structure return, the "embedded" configurations
all turn it right back off again - including m68k-aout, m68k-coff,
m68k-elf, and m68k-rtems.  The only thing I saw which definitively used
it was NetBSD ELF.

-- 
Daniel Jacobowitz
CodeSourcery


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