From: Andreas Schwab <schwab@suse.de>
To: Mark Kettenis <kettenis@chello.nl>
Cc: msnyder@redhat.com, cagney@gnu.org, gdb-patches@sources.redhat.com
Subject: Re: [PATCH/RFC/RFA] Print in-memory struct return values
Date: Sat, 15 May 2004 22:12:00 -0000 [thread overview]
Message-ID: <jead09xru0.fsf@sykes.suse.de> (raw)
In-Reply-To: <200405152125.i4FLPr7E000952@elgar.kettenis.dyndns.org>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1156 bytes --]
Mark Kettenis <kettenis@chello.nl> writes:
> Anyway, to what extent are the m68k ABI's documented to return the
> structure return address in %d0 and/or %a0? For the
> PCC_STATIC_STRUCT_RETURN targets this is clear, but how is this for
> the systems where the caller is supposed to pass the memory area. Do
> you have access to the m68k SVR4 ABI? What does it say about this?
From the 68000 supplement:
Functions Returning Structures or Unions
As mentioned above, when a function returns a structure or union, it
expects the caller to provide space for the return value and to place
its address in register %a0. Having the caller supply the return
object's space allows re-entrancy.
A function returning a structure or union also sets %a0 to the value
it finds in %a0. Thus when the caller receives control again, the
address of the returned object resides in register %a0. ...
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, MaxfeldstraÃe 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
next prev parent reply other threads:[~2004-05-15 22:12 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-07 17:07 Mark Kettenis
2004-05-07 22:35 ` Andrew Cagney
2004-05-07 23:10 ` Mark Kettenis
2004-05-08 19:58 ` Mark Kettenis
2004-05-12 17:47 ` Michael Snyder
2004-05-15 21:26 ` Mark Kettenis
2004-05-15 22:12 ` Andreas Schwab [this message]
2004-05-16 10:28 ` Mark Kettenis
[not found] ` <200405081958.i48JwlUU000353@elgar.kettenis.dyndns.org>
[not found] ` <409D4216.4050401@gnu.org>
[not found] ` <200405082101.i48L1NUK000503@elgar.kettenis.dyndns.org>
2004-05-08 21:14 ` Andrew Cagney
2004-05-08 23:02 ` Mark Kettenis
2004-05-09 13:59 ` Andrew Cagney
2004-05-09 14:03 ` Mark Kettenis
2004-05-11 23:53 ` Andrew Cagney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jead09xru0.fsf@sykes.suse.de \
--to=schwab@suse.de \
--cc=cagney@gnu.org \
--cc=gdb-patches@sources.redhat.com \
--cc=kettenis@chello.nl \
--cc=msnyder@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox