From: Ian Lance Taylor <iant@google.com>
To: Ravishankar S <ravishankar.s@hathway.com>
Cc: gcc-help@gcc.gnu.org
Subject: Re: Arguments in registers
Date: Mon, 25 Sep 2006 17:05:00 -0000 [thread overview]
Message-ID: <m3d59jop22.fsf@dhcp-172-18-118-195.corp.google.com> (raw)
In-Reply-To: <000001c6e0b4$46998880$d346fe3c@lab102371>
Ravishankar S <ravishankar.s@hathway.com> writes:
> But TriCore's EABI specifies separate registers for passing arguments
> and returning values. D2-D3 for returning values and D4-D7 for passing
> arguments.
>
> My question is : Will it make a difference from a compiler writer's
> point for this type of calling convention. From experience, will it make
> for a differnce in performance.
It won't make much difference. There are other architectures with
similar characteristics. For example, on MIPS arguments are passed in
$4 through $7 or $11 (depending on the ABI), but values are returned
in $2 and $3.
> On the surface, it seems like it does, as there most of functions do not
> return values and most anyway don't return 64 bit values. So reusing the
> registers as PowerPC does may be better.
The return registers are essentially just caller-saved scratch
registers.
I suppose if you are short on registers you might prefer to have more
callee-saved registers. But if you have enough registers, it doesn't
matter much either way.
Ian
next prev parent reply other threads:[~2006-09-25 17:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-25 15:07 Ravishankar S
2006-09-25 17:05 ` Ian Lance Taylor [this message]
2006-09-27 15:31 ` Ravishankar S
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=m3d59jop22.fsf@dhcp-172-18-118-195.corp.google.com \
--to=iant@google.com \
--cc=gcc-help@gcc.gnu.org \
--cc=ravishankar.s@hathway.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).