qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Vivier <laurent@vivier.eu>
To: Richard Henderson <richard.henderson@linaro.org>, qemu-devel@nongnu.org
Subject: Re: [PATCH 1/3] target/m68k: Implement TRAPV
Date: Tue, 30 Nov 2021 13:11:43 +0100	[thread overview]
Message-ID: <e38ca477-ed69-001a-9f11-80c413eb76ed@vivier.eu> (raw)
In-Reply-To: <20211130103752.72099-2-richard.henderson@linaro.org>

Le 30/11/2021 à 11:37, Richard Henderson a écrit :
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   target/m68k/translate.c | 17 +++++++++++++++++
>   1 file changed, 17 insertions(+)
> 
> diff --git a/target/m68k/translate.c b/target/m68k/translate.c
> index af43c8eab8..858ba761fc 100644
> --- a/target/m68k/translate.c
> +++ b/target/m68k/translate.c
> @@ -4863,6 +4863,22 @@ DISAS_INSN(trap)
>       gen_exception(s, s->base.pc_next, EXCP_TRAP0 + (insn & 0xf));
>   }
>   
> +static void do_trapcc(DisasContext *s, int cond)
> +{
> +    TCGLabel *over = gen_new_label();
> +
> +    /* Jump over if !cond. */
> +    gen_jmpcc(s, cond ^ 1, over);
> +
> +    gen_exception(s, s->base.pc_next, EXCP_TRAPCC);
> +    gen_set_label(over);
> +}
> +
> +DISAS_INSN(trapv)
> +{
> +    do_trapcc(s, 9); /* VS */
> +}
> +
>   static void gen_load_fcr(DisasContext *s, TCGv res, int reg)
>   {
>       switch (reg) {
> @@ -6026,6 +6042,7 @@ void register_m68k_insns (CPUM68KState *env)
>       BASE(nop,       4e71, ffff);
>       INSN(rtd,       4e74, ffff, RTD);
>       BASE(rts,       4e75, ffff);
> +    INSN(trapv,     4e76, ffff, M68000);
>       INSN(rtr,       4e77, ffff, M68000);
>       BASE(jump,      4e80, ffc0);
>       BASE(jump,      4ec0, ffc0);
> 

Same question as for PATCH 2 regarding m68k_interrupt_all()

Reviewed-by: Laurent Vivier <laurent@vivier.eu>


  reply	other threads:[~2021-11-30 12:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-30 10:37 [PATCH for-7.0 0/3] target/m68k: Implement conditional traps Richard Henderson
2021-11-30 10:37 ` [PATCH 1/3] target/m68k: Implement TRAPV Richard Henderson
2021-11-30 12:11   ` Laurent Vivier [this message]
2021-11-30 10:37 ` [PATCH 2/3] target/m68k: Implement TRAPcc Richard Henderson
2021-11-30 11:57   ` Laurent Vivier
2021-11-30 12:34     ` Richard Henderson
2021-11-30 10:37 ` [PATCH 3/3] target/m68k: Implement FTRAPcc Richard Henderson
2021-11-30 11:32   ` Richard Henderson

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=e38ca477-ed69-001a-9f11-80c413eb76ed@vivier.eu \
    --to=laurent@vivier.eu \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.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).