diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2005-04-06 20:47:48 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2005-04-06 20:47:48 +0000 |
commit | 66321a11a4ef45942b3bee7377a36bb94831365a (patch) | |
tree | f038f1aef344fa93923d874d348d09542d4c5b68 /cpu-exec.c | |
parent | c44644bb966bd0cf7e09d94b043814ea0740fe8f (diff) | |
download | hqemu-66321a11a4ef45942b3bee7377a36bb94831365a.zip hqemu-66321a11a4ef45942b3bee7377a36bb94831365a.tar.gz |
sparc update (Blue Swirl)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1350 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'cpu-exec.c')
-rw-r--r-- | cpu-exec.c | 17 |
1 files changed, 13 insertions, 4 deletions
@@ -1,7 +1,7 @@ /* * i386 emulator main execution loop * - * Copyright (c) 2003 Fabrice Bellard + * Copyright (c) 2003-2005 Fabrice Bellard * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -285,9 +285,18 @@ int cpu_exec(CPUState *env1) } } #elif defined(TARGET_SPARC) - if (interrupt_request & CPU_INTERRUPT_HARD) { - do_interrupt(env->interrupt_index); - env->interrupt_request &= ~CPU_INTERRUPT_HARD; + if ((interrupt_request & CPU_INTERRUPT_HARD) && + (env->psret != 0)) { + int pil = env->interrupt_index & 15; + int type = env->interrupt_index & 0xf0; + + if (((type == TT_EXTINT) && + (pil == 15 || pil > env->psrpil)) || + type != TT_EXTINT) { + env->interrupt_request &= ~CPU_INTERRUPT_HARD; + do_interrupt(env->interrupt_index); + env->interrupt_index = 0; + } } else if (interrupt_request & CPU_INTERRUPT_TIMER) { //do_interrupt(0, 0, 0, 0, 0); env->interrupt_request &= ~CPU_INTERRUPT_TIMER; |