From: Richard Henderson <richard.henderson@linaro.org>
To: Laurent Vivier <laurent@vivier.eu>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [PATCH 2/3] target/m68k: Implement TRAPcc
Date: Tue, 30 Nov 2021 13:34:05 +0100 [thread overview]
Message-ID: <6c1495bf-83f8-c64c-4ae6-ab2e7830b5b2@linaro.org> (raw)
In-Reply-To: <0c97b116-4f8a-de89-e656-1630470046ac@vivier.eu>
On 11/30/21 12:57 PM, Laurent Vivier wrote:
>> +DISAS_INSN(trapcc)
>> +{
>> + /* Consume and discard the immediate operand. */
>> + switch (extract32(insn, 0, 3)) {
>> + case 2: /* trapcc.w */
>> + (void)read_im16(env, s);
>> + break;
>> + case 3: /* trapcc.l */
>> + (void)read_im32(env, s);
>> + break;
>
> Do we need to actually read the memory to trigger a fault if needed or can we only
> increase the PC?
Yes, and to pass the entire instruction to plugins.
>> + case 4: /* trapcc (no operand) */
>> + break;
>> + default:
>> + /* Illegal insn */
>> + disas_undef(env, s, insn);
>> + return;
>> + }
>> + do_trapcc(s, extract32(insn, 8, 4));
>> +}
>
> Do we need to change something in m68k_interrupt_all()?
Yes, and cpu_loop. Thanks,
r~
next prev parent reply other threads:[~2021-11-30 12:42 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
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 [this message]
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=6c1495bf-83f8-c64c-4ae6-ab2e7830b5b2@linaro.org \
--to=richard.henderson@linaro.org \
--cc=laurent@vivier.eu \
--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).