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>
This commit is contained in:
Richard Henderson 2025-03-22 20:10:28 -07:00
parent c0f830cb6a
commit 95d4f72d6a

View file

@ -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;