qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2 6/7] target/nios2: Remove assignment to env in handle_inst


From: Richard Henderson
Subject: Re: [PATCH v2 6/7] target/nios2: Remove assignment to env in handle_instruction
Date: Mon, 28 Jun 2021 08:58:14 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

On 6/28/21 8:31 AM, Peter Maydell wrote:
On Sun, 20 Jun 2021 at 23:15, Richard Henderson
<richard.henderson@linaro.org> wrote:

Direct assignments to env during translation do not work.

As it happens, the only way we can get here is if env->pc
is already set to dc->pc.

More to the point, t_gen_helper_raise_exception() does
     tcg_gen_movi_tl(dc->cpu_R[R_PC], dc->pc);
before raising the exception (as you would expect it to).

Ah, didn't notice that.  My comment works from the other direction:

Within the page, 0x1000-0x1fff, any insn executed will raise the 0xaa exception, which means pc will be set for that insn.


r~



reply via email to

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