qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <rth@twiddle.net>
To: Chen Gang S <gang.chen@sunrus.com.cn>,
	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: Mon, 16 Feb 2015 08:25:23 -0800	[thread overview]
Message-ID: <54E219F3.5090307@twiddle.net> (raw)
In-Reply-To: <54E1F56E.803@sunrus.com.cn>

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.


r~

  reply	other threads:[~2015-02-16 16:25 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 [this message]
2015-02-16 22:51     ` Chen Gang S
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=54E219F3.5090307@twiddle.net \
    --to=rth@twiddle.net \
    --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 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).