qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: qemu-devel@nongnu.org
Cc: mrolnik@gmail.com
Subject: [PATCH 1/3] target/avr: Call avr_cpu_do_interrupt directly
Date: Fri, 26 Aug 2022 13:55:16 -0700	[thread overview]
Message-ID: <20220826205518.2339352-2-richard.henderson@linaro.org> (raw)
In-Reply-To: <20220826205518.2339352-1-richard.henderson@linaro.org>

There is no need to go through cc->tcg_ops when
we know what value that must have.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 target/avr/helper.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/target/avr/helper.c b/target/avr/helper.c
index 82284f8997..9614ccf3e4 100644
--- a/target/avr/helper.c
+++ b/target/avr/helper.c
@@ -29,14 +29,13 @@
 bool avr_cpu_exec_interrupt(CPUState *cs, int interrupt_request)
 {
     bool ret = false;
-    CPUClass *cc = CPU_GET_CLASS(cs);
     AVRCPU *cpu = AVR_CPU(cs);
     CPUAVRState *env = &cpu->env;
 
     if (interrupt_request & CPU_INTERRUPT_RESET) {
         if (cpu_interrupts_enabled(env)) {
             cs->exception_index = EXCP_RESET;
-            cc->tcg_ops->do_interrupt(cs);
+            avr_cpu_do_interrupt(cs);
 
             cs->interrupt_request &= ~CPU_INTERRUPT_RESET;
 
@@ -47,7 +46,7 @@ bool avr_cpu_exec_interrupt(CPUState *cs, int interrupt_request)
         if (cpu_interrupts_enabled(env) && env->intsrc != 0) {
             int index = ctz32(env->intsrc);
             cs->exception_index = EXCP_INT(index);
-            cc->tcg_ops->do_interrupt(cs);
+            avr_cpu_do_interrupt(cs);
 
             env->intsrc &= env->intsrc - 1; /* clear the interrupt */
             if (!env->intsrc) {
-- 
2.34.1



  reply	other threads:[~2022-08-26 20:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-26 20:55 [PATCH 0/3] target/avr: Fix skips vs interrupts Richard Henderson
2022-08-26 20:55 ` Richard Henderson [this message]
2022-08-27 19:14   ` [PATCH 1/3] target/avr: Call avr_cpu_do_interrupt directly Michael Rolnik
2022-08-26 20:55 ` [PATCH 2/3] target/avr: Only execute one interrupt at a time Richard Henderson
2022-08-27 19:13   ` Michael Rolnik
2022-08-26 20:55 ` [PATCH 3/3] target/avr: Disable interrupts when env->skip set Richard Henderson
2022-08-27 19:15   ` Michael Rolnik
2022-08-27 19:15 ` [PATCH 0/3] target/avr: Fix skips vs interrupts Michael Rolnik
2022-08-30 11:49 ` Philippe Mathieu-Daudé via

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=20220826205518.2339352-2-richard.henderson@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=mrolnik@gmail.com \
    --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).