From: Richard Henderson <rth@redhat.com>
To: Chen Gang S <gang.chen@sunrus.com.cn>,
Peter Maydell <peter.maydell@linaro.org>,
Chris Metcalf <cmetcalf@ezchip.com>
Cc: "walt@tilera.com" <walt@tilera.com>,
Riku Voipio <riku.voipio@iki.fi>,
qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] target-tilegx: Execute _start and reach to __libc_start_main successfully
Date: Tue, 24 Feb 2015 06:42:27 -1000 [thread overview]
Message-ID: <54ECA9F3.3060903@redhat.com> (raw)
In-Reply-To: <54EC9B47.1040006@sunrus.com.cn>
On 02/24/2015 05:39 AM, Chen Gang S wrote:
> After read through target-arm/translate-a64.c, I guess, the main reason
> is: the zero register (r31) shares with the sp register (also r31).
>
> - So it uses cpu_reg() and cpu_reg_sp() for them.
>
> - For each zero register access, it will new a tcg temporary variable
> for it, and release it after finish decoding one insn (so it will not
> overwrite sp register.).
>
> For tilegx, zero register (r63) does not share with other registers (sp
> is r54), so we needn't use wrap functions for it.
Perhaps aarch64 is confusing for you. But Alpha also has zero registers, and
also uses wrapper functions. See load_gpr and dest_gpr.
The very most important reason to use a wrapper, and thus a tcg temporary that
keeps getting re-initialized to zero, is that the tcg optimizer gets to see
that zero and optimize the code accordingly.
r~
next prev parent reply other threads:[~2015-02-24 17:40 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-24 7:53 [Qemu-devel] [PATCH] target-tilegx: Execute _start and reach to __libc_start_main successfully Chen Gang S
2015-02-24 8:07 ` Chen Gang S
2015-02-24 14:21 ` Chris Metcalf
2015-02-24 14:38 ` Peter Maydell
2015-02-24 15:39 ` Chen Gang S
2015-02-24 16:42 ` Richard Henderson [this message]
2015-02-24 17:08 ` Chen Gang S
2015-02-24 16:31 ` Chen Gang S
2015-02-24 16:46 ` Chris Metcalf
2015-02-24 17:25 ` Chen Gang S
2015-02-24 18:18 ` Chris Metcalf
2015-02-25 1:01 ` Chen Gang S
2015-02-24 17:55 ` Richard Henderson
2015-02-25 3:40 ` Chen Gang S
2015-02-25 17:19 ` Richard Henderson
2015-02-26 1:44 ` Chen Gang S
2015-02-26 16:31 ` Richard Henderson
2015-02-26 23:30 ` Chen Gang S
2015-02-27 3:01 ` Chris Metcalf
2015-02-27 3:41 ` Chen Gang 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=54ECA9F3.3060903@redhat.com \
--to=rth@redhat.com \
--cc=cmetcalf@ezchip.com \
--cc=gang.chen@sunrus.com.cn \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=riku.voipio@iki.fi \
--cc=walt@tilera.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.