X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=qemu%2Ftarget-sparc%2Fint64_helper.c;fp=qemu%2Ftarget-sparc%2Fint64_helper.c;h=29360fa5fe78ff786a888a514803f63b99d41c27;hb=437fd90c0250dee670290f9b714253671a990160;hp=b02d22b1994ce430d057decec123ad22fa85ae57;hpb=5bbd6fe9b8bab2a93e548c5a53b032d1939eec05;p=kvmfornfv.git 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 . */ +#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; }