From: Chen Gang S <gang.chen@sunrus.com.cn>
To: Richard Henderson <rth@twiddle.net>,
Peter Maydell <peter.maydell@linaro.org>,
Chris Metcalf <cmetcalf@ezchip.com>,
Riku Voipio <riku.voipio@iki.fi>,
"walt@tilera.com" <walt@tilera.com>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH 1/6 v2] target-tilegx: Firstly add to qemu with minimized features
Date: Tue, 17 Feb 2015 06:51:49 +0800 [thread overview]
Message-ID: <54E27485.9010908@sunrus.com.cn> (raw)
In-Reply-To: <54E219F3.5090307@twiddle.net>
On 2/17/15 00:25, Richard Henderson wrote:
> On 02/16/2015 05:49 AM, Chen Gang S wrote:
>> +#define TILEGX_R_PC 55 /* LR register, pc pointer */
>
> No, register 55 is the link register, not the PC.
> I.e. it is only special in that it receives the
> return address from the JAL instructions.
>
>> +typedef struct CPUTLState {
>> + uint64_t regs[56];
>> + CPU_COMMON
>> +} CPUTLState;
>
> Which means you need another entry here for the PC.
>
>> +static inline void cpu_get_tb_cpu_state(CPUTLState *env, target_ulong *pc,
>> + target_ulong *cs_base, int *flags)
>> +{
>> + *pc = env->regs[TILEGX_R_PC];
>
> And you should not reference the link register here.
>
>
OK, thanks. What you said sound reasonable to me. I shall send patch v3
if no any additiona reply for patch v2 within 3 days (2015-02-20).
And excuse me, I still want to know, is there a real world register as a
PC register for tile (e.g. just like 'rip' for x86_64) which can be used
by software programer? (is it in SPR?)
Thanks.
--
Chen Gang
Open, share, and attitude like air, water, and life which God blessed
next prev parent reply other threads:[~2015-02-16 22:44 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-16 13:48 [Qemu-devel] [PATCH 0/6 v2] tile: Can load elf64 tilegx binary successfully for linux-user Chen Gang S
2015-02-16 13:49 ` [Qemu-devel] [PATCH 1/6 v2] target-tilegx: Firstly add to qemu with minimized features Chen Gang S
2015-02-16 16:25 ` Richard Henderson
2015-02-16 22:51 ` Chen Gang S [this message]
2015-02-17 0:28 ` Chris Metcalf
2015-02-17 2:05 ` Chen Gang S
2015-02-17 2:15 ` Richard Henderson
2015-02-17 2:59 ` Chen Gang S
2015-02-17 15:58 ` Richard Henderson
2015-02-17 23:10 ` Chen Gang S
2015-02-16 13:50 ` [Qemu-devel] [PATCH 2/6 v2] linux-user: tilegx: Firstly add architecture related features Chen Gang S
2015-02-16 13:50 ` [Qemu-devel] [PATCH 3/6 v2] linux-user: tilegx: Add target features support within qemu Chen Gang S
2015-02-16 13:51 ` [Qemu-devel] [PATCH 4/6 v2] linux-user: Support tilegx architecture in syscall Chen Gang S
2015-02-16 13:52 ` [Qemu-devel] [PATCH 5/6 v2] linux-user: Support tilegx architecture in linux-user Chen Gang S
2015-02-16 13:53 ` [Qemu-devel] [PATCH 6/6 v2] linux-user/syscall.c: Switch all macros which are not defined in tilegx 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=54E27485.9010908@sunrus.com.cn \
--to=gang.chen@sunrus.com.cn \
--cc=cmetcalf@ezchip.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=riku.voipio@iki.fi \
--cc=rth@twiddle.net \
--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.