From: Richard Henderson <richard.henderson@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Marek Vasut <marex@denx.de>, Chris Wulff <crwulff@gmail.com>,
QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [PATCH v2 6/7] target/nios2: Remove assignment to env in handle_instruction
Date: Mon, 28 Jun 2021 08:58:14 -0700 [thread overview]
Message-ID: <e8bc3392-34f6-4212-c158-b4e191bcb665@linaro.org> (raw)
In-Reply-To: <CAFEAcA-9h+vUQWR2GxZQZk+O_cE+-gyoKi3XeY1=VaTsTJXh_g@mail.gmail.com>
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~
next prev parent reply other threads:[~2021-06-28 15:59 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-20 22:10 [PATCH v2 0/7] target/nios2: Convert to TranslatorOps Richard Henderson
2021-06-20 22:10 ` [PATCH v2 1/7] target/nios2: Replace DISAS_TB_JUMP with DISAS_NORETURN Richard Henderson
2021-06-28 15:14 ` Peter Maydell
2021-06-20 22:10 ` [PATCH v2 2/7] target/nios2: Use global cpu_env Richard Henderson
2021-06-28 15:15 ` Peter Maydell
2021-06-20 22:10 ` [PATCH v2 3/7] target/nios2: Use global cpu_R Richard Henderson
2021-06-28 15:16 ` Peter Maydell
2021-06-20 22:10 ` [PATCH v2 4/7] target/nios2: Add DisasContextBase to DisasContext Richard Henderson
2021-06-28 15:28 ` Peter Maydell
2021-06-20 22:10 ` [PATCH v2 5/7] target/nios2: Convert to TranslatorOps Richard Henderson
2021-06-28 15:57 ` Peter Maydell
2021-06-28 16:04 ` Richard Henderson
2021-06-20 22:10 ` [PATCH v2 6/7] target/nios2: Remove assignment to env in handle_instruction Richard Henderson
2021-06-28 15:31 ` Peter Maydell
2021-06-28 15:58 ` Richard Henderson [this message]
2021-06-20 22:10 ` [PATCH v2 7/7] target/nios2: Clean up goto " Richard Henderson
2021-06-28 15:33 ` Peter Maydell
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=e8bc3392-34f6-4212-c158-b4e191bcb665@linaro.org \
--to=richard.henderson@linaro.org \
--cc=crwulff@gmail.com \
--cc=marex@denx.de \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/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).