aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2025-03-22 20:10:28 -0700
committerRichard Henderson <richard.henderson@linaro.org>2025-04-22 14:07:12 -0700
commit95d4f72d6a667c71adae8a3c8093efe32043d9b4 (patch)
tree946263bae881b1e93356c9fff9a84fe763a44ef2
parentc0f830cb6a756add847f9cd9d62d50397a1284c1 (diff)
downloadqemu-95d4f72d6a667c71adae8a3c8093efe32043d9b4.zip
qemu-95d4f72d6a667c71adae8a3c8093efe32043d9b4.tar.gz
qemu-95d4f72d6a667c71adae8a3c8093efe32043d9b4.tar.bz2
target/avr: Use do_stb in avr_cpu_do_interrupt
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>
-rw-r--r--target/avr/helper.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/target/avr/helper.c b/target/avr/helper.c
index 7d6954e..f23fa3e 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;