From: Richard Henderson <rth@twiddle.net>
To: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/5] target-tricore: Add trap handling
Date: Fri, 12 Feb 2016 13:44:17 +1100 [thread overview]
Message-ID: <56BD4701.1060106@twiddle.net> (raw)
In-Reply-To: <1455206520-6465-2-git-send-email-kbastian@mail.uni-paderborn.de>
On 02/12/2016 03:01 AM, Bastian Koppelmann wrote:
> +static inline void
> +generate_trap(DisasContext *ctx, int class, int tin)
> +{
> + TCGv_i32 classtemp = tcg_const_i32(class);
> + gen_save_pc(ctx->pc);
> + /* upper context cannot be saved, if the context list is empty */
> + if (class != TRAPC_SYSCALL) {
> + gen_helper_svucx(cpu_env);
> + }
> + /* Tin is loaded into d[15] */
> + tcg_gen_movi_tl(cpu_gpr_d[15], tin);
> + /* The return address in A[11] is updated. */
> + if (class == TRAPC_SYSCALL) {
> + tcg_gen_movi_tl(cpu_gpr_a[11], ctx->next_pc);
> + } else {
> + tcg_gen_movi_tl(cpu_gpr_a[11], ctx->pc);
> + }
> + gen_helper_raise_exception_err(cpu_env, classtemp, 0);
> + tcg_temp_free(classtemp);
> +}
Again, drop the inline. Missing ctx->bstate = BS_EXCP.
r~
next prev parent reply other threads:[~2016-02-12 2:44 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-11 16:01 [Qemu-devel] [PATCH 0/5] TriCore exception patches Bastian Koppelmann
2016-02-11 16:01 ` [Qemu-devel] [PATCH 1/5] target-tricore: Add trap handling Bastian Koppelmann
2016-02-12 2:39 ` Richard Henderson
2016-02-12 11:12 ` Bastian Koppelmann
2016-02-12 18:55 ` Richard Henderson
2016-02-12 20:08 ` Bastian Koppelmann
2016-02-12 2:44 ` Richard Henderson [this message]
2016-02-11 16:01 ` [Qemu-devel] [PATCH 2/5] target-tricore: Save the pc before CSA operations for exceptions Bastian Koppelmann
2016-02-11 16:01 ` [Qemu-devel] [PATCH 3/5] target-tricore: add context managment trap generation Bastian Koppelmann
2016-02-11 16:01 ` [Qemu-devel] [PATCH 4/5] target-tricore: add illegal opcode " Bastian Koppelmann
2016-02-11 16:02 ` [Qemu-devel] [PATCH 5/5] target-tricore: add opd " Bastian Koppelmann
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=56BD4701.1060106@twiddle.net \
--to=rth@twiddle.net \
--cc=kbastian@mail.uni-paderborn.de \
--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).