mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
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:
parent
c0f830cb6a
commit
95d4f72d6a
1 changed files with 6 additions and 6 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue