From: Richard Henderson <rth@twiddle.net>
To: "Chen Gang" <xili_gchen_5257@hotmail.com>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Andreas Färber" <afaerber@suse.de>,
"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 09/10 v11] target-tilegx: Generate tcg instructions to finish "Hello world"
Date: Tue, 02 Jun 2015 09:32:13 -0700 [thread overview]
Message-ID: <556DDA8D.8040508@twiddle.net> (raw)
In-Reply-To: <BLU436-SMTP255029207D28C6400E2143EB9B60@phx.gbl>
On 06/01/2015 01:54 PM, Chen Gang wrote:
>> Further, the < TILEGX_R_COUNT restriction is also incorrect. True, you don't
>> actually implement the top 7 special registers, but that doesn't matter, you
>> should still be incrementing them.
>>
>
> We did not implement them, so can not increment them, either.
>
> They are hidden to outside, or we have to define and implement them.
>
> So for me, the current code is correct.
It isn't correct, it's simply functional. These registers may eventually be
implemented, and at that point this code will fail. You'll note that your
store_add functions don't have the same problem, because they don't have this
R_COUNT check. It would be better to increase the number of buffer slots and
do the right thing here in load_add.
My suggestion is to expand tmp_regs to 4, drop tmp_regcur, and have dest_gr
manage all of the indexing. I.e.
static TCGv dest_gr(DisasContext *dc, uint8_t rdst)
{
int n = dc->n_tmp_regs++;
assert(n < ARRAY_SIZE(dc->tmp_regs));
dc->tmp_regs[n].idx = rdst;
return dc->tmp_regs[n].val = tcg_temp_new_i64();
}
In this way you can in fact call dest_gr twice within load_add and everything
will Just Work.
r~
next prev parent reply other threads:[~2015-06-02 16:32 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-30 21:07 [Qemu-devel] [PATCH 00/10 v11] tilegx: Firstly add tilegx target for linux-user Chen Gang
2015-05-30 21:10 ` [Qemu-devel] [PATCH 01/10 v11] linux-user: tilegx: Firstly add architecture related features Chen Gang
2015-06-02 17:06 ` Peter Maydell
2015-06-03 13:06 ` Chen Gang
2015-06-03 14:28 ` Peter Maydell
2015-05-30 21:10 ` [Qemu-devel] [PATCH 02/10 v11] linux-user: Support tilegx architecture in linux-user Chen Gang
2015-06-02 17:40 ` Peter Maydell
2015-06-03 12:30 ` Chen Gang
2015-06-03 12:34 ` Peter Maydell
2015-06-03 12:47 ` Chen Gang
2015-06-03 15:10 ` Chris Metcalf
2015-06-03 15:19 ` Peter Maydell
2015-06-03 15:20 ` Chris Metcalf
2015-06-04 12:25 ` Chen Gang
2015-06-04 12:29 ` Peter Maydell
2015-06-04 12:39 ` Chen Gang
2015-06-03 15:47 ` Richard Henderson
2015-06-04 12:32 ` Chen Gang
2015-07-07 0:19 ` Chris Metcalf
2015-07-07 20:47 ` Chen Gang
2015-07-07 20:50 ` Chen Gang
2015-07-08 19:24 ` Chris Metcalf
[not found] ` <559DC775.9080204@hotmail.com>
2015-07-09 1:09 ` gchen gchen
2015-05-30 21:12 ` [Qemu-devel] [PATCH 03/10 v11] linux-user/syscall.c: conditionalize syscalls which are not defined in tilegx Chen Gang
2015-06-02 17:41 ` Peter Maydell
2015-05-30 21:13 ` [Qemu-devel] [PATCH 04/10 v11] target-tilegx: Add opcode basic implementation from Tilera Corporation Chen Gang
2015-06-02 17:42 ` Peter Maydell
2015-05-30 21:14 ` [Qemu-devel] [PATCH 05/10 v11] arget-tilegx/opcode_tilegx.h: Modify it to fit qemu using Chen Gang
2015-06-02 17:43 ` Peter Maydell
2015-06-02 23:39 ` Andreas Färber
2015-06-03 11:59 ` Chen Gang
2015-05-30 21:15 ` [Qemu-devel] [PATCH 06/10 v11] target-tilegx: Add special register information from Tilera Corporation Chen Gang
2015-06-02 17:44 ` Peter Maydell
2015-06-02 20:52 ` Chen Gang
2015-06-02 20:53 ` Chen Gang
2015-05-30 21:15 ` [Qemu-devel] [PATCH 07/10 v11] target-tilegx: Add cpu basic features for linux-user Chen Gang
2015-06-02 17:51 ` Peter Maydell
2015-06-02 20:47 ` Chen Gang
2015-05-30 21:17 ` [Qemu-devel] [PATCH 08/10 v11] target-tilegx: Add several helpers for instructions translation Chen Gang
2015-06-01 16:02 ` Richard Henderson
2015-06-01 18:47 ` Chen Gang
2015-05-30 21:18 ` [Qemu-devel] [PATCH 09/10 v11] target-tilegx: Generate tcg instructions to finish "Hello world" Chen Gang
2015-06-01 18:40 ` Richard Henderson
2015-06-01 20:54 ` Chen Gang
2015-06-02 16:32 ` Richard Henderson [this message]
2015-06-02 21:30 ` Chen Gang
2015-06-07 22:20 ` Chen Gang
2015-06-02 17:54 ` Peter Maydell
2015-06-02 20:25 ` Chen Gang
2015-05-30 21:19 ` [Qemu-devel] [PATCH 10/10 v11] target-tilegx: Add TILE-Gx building files Chen Gang
2015-06-02 17:52 ` Peter Maydell
2015-06-02 20:26 ` Chen Gang
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=556DDA8D.8040508@twiddle.net \
--to=rth@twiddle.net \
--cc=afaerber@suse.de \
--cc=cmetcalf@ezchip.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=riku.voipio@iki.fi \
--cc=walt@tilera.com \
--cc=xili_gchen_5257@hotmail.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 NNTP newsgroup(s).