summaryrefslogtreecommitdiffstats
path: root/qemu/target-sparc/int64_helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'qemu/target-sparc/int64_helper.c')
-rw-r--r--qemu/target-sparc/int64_helper.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/qemu/target-sparc/int64_helper.c b/qemu/target-sparc/int64_helper.c
index b02d22b19..29360fa5f 100644
--- a/qemu/target-sparc/int64_helper.c
+++ b/qemu/target-sparc/int64_helper.c
@@ -17,8 +17,10 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
+#include "qemu/osdep.h"
#include "cpu.h"
#include "exec/helper-proto.h"
+#include "exec/log.h"
#include "trace.h"
#define DEBUG_PCALL
@@ -156,9 +158,8 @@ void sparc_cpu_do_interrupt(CPUState *cs)
} else if ((intno & 0x1c0) == TT_FILL) {
cpu_set_cwp(env, cpu_cwp_inc(env, env->cwp + 1));
}
- env->tbr &= ~0x7fffULL;
- env->tbr |= ((env->tl > 1) ? 1 << 14 : 0) | (intno << 5);
- env->pc = env->tbr;
+ env->pc = env->tbr & ~0x7fffULL;
+ env->pc |= ((env->tl > 1) ? 1 << 14 : 0) | (intno << 5);
env->npc = env->pc + 4;
cs->exception_index = -1;
}