qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/6 v2] target-tilegx: Firstly add to qemu with


From: Richard Henderson
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
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

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 via email to

[Prev in Thread] Current Thread [Next in Thread]