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


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.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


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