qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Pierrick Bouvier" <pierrick.bouvier@linaro.org>
Subject: [PULL 7/9] target/avr: Use do_stb in avr_cpu_do_interrupt
Date: Tue, 22 Apr 2025 14:11:22 -0700	[thread overview]
Message-ID: <20250422211124.305724-8-richard.henderson@linaro.org> (raw)
In-Reply-To: <20250422211124.305724-1-richard.henderson@linaro.org>

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 target/avr/helper.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/target/avr/helper.c b/target/avr/helper.c
index 7d6954ec26..f23fa3e8ba 100644
--- a/target/avr/helper.c
+++ b/target/avr/helper.c
@@ -88,14 +88,14 @@ void avr_cpu_do_interrupt(CPUState *cs)
     }
 
     if (avr_feature(env, AVR_FEATURE_3_BYTE_PC)) {
-        cpu_stb_data(env, env->sp--, (ret & 0x0000ff));
-        cpu_stb_data(env, env->sp--, (ret & 0x00ff00) >> 8);
-        cpu_stb_data(env, env->sp--, (ret & 0xff0000) >> 16);
+        do_stb(env, env->sp--, ret, 0);
+        do_stb(env, env->sp--, ret >> 8, 0);
+        do_stb(env, env->sp--, ret >> 16, 0);
     } else if (avr_feature(env, AVR_FEATURE_2_BYTE_PC)) {
-        cpu_stb_data(env, env->sp--, (ret & 0x0000ff));
-        cpu_stb_data(env, env->sp--, (ret & 0x00ff00) >> 8);
+        do_stb(env, env->sp--, ret, 0);
+        do_stb(env, env->sp--, ret >> 8, 0);
     } else {
-        cpu_stb_data(env, env->sp--, (ret & 0x0000ff));
+        do_stb(env, env->sp--, ret, 0);
     }
 
     env->pc_w = base + vector * size;
-- 
2.43.0



  parent reply	other threads:[~2025-04-22 21:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-22 21:11 [PULL 0/9] target/avr: Increase TARGET_PAGE_BITS to 10 Richard Henderson
2025-04-22 21:11 ` [PULL 1/9] target/avr: Improve decode of LDS, STS Richard Henderson
2025-04-22 21:11 ` [PULL 2/9] target/avr: Remove OFFSET_CPU_REGISTERS Richard Henderson
2025-04-22 21:11 ` [PULL 3/9] target/avr: Add defines for i/o port registers Richard Henderson
2025-04-22 21:11 ` [PULL 4/9] target/avr: Move cpu register accesses into system memory Richard Henderson
2025-04-22 21:11 ` [PULL 5/9] target/avr: Remove NUMBER_OF_IO_REGISTERS Richard Henderson
2025-04-22 21:11 ` [PULL 6/9] target/avr: Use cpu_stb_mmuidx_ra in helper_fullwr Richard Henderson
2025-04-22 21:11 ` Richard Henderson [this message]
2025-04-22 21:11 ` [PULL 8/9] hw/avr: Prepare for TARGET_PAGE_SIZE > 256 Richard Henderson
2025-04-22 21:11 ` [PULL 9/9] target/avr: Increase TARGET_PAGE_BITS to 10 Richard Henderson
2025-04-23 17:57 ` [PULL 0/9] " Stefan Hajnoczi

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=20250422211124.305724-8-richard.henderson@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=philmd@linaro.org \
    --cc=pierrick.bouvier@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).