diff options
author | Alexander Graf <agraf@suse.de> | 2012-06-20 21:20:29 +0200 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2012-06-24 01:04:51 +0200 |
commit | e42a61f185f859246c14445b6e98e195eb3b977b (patch) | |
tree | 1e3ee47605c54b3986af5816dead928211b6f209 /target-ppc/excp_helper.c | |
parent | 84755ed51e6266b115322834933ce404a2fbf3f9 (diff) |
PPC: Add support for MSR_CM
The BookE variant of MSR_SF is MSR_CM. Implement everything it takes in TCG to
support running 64bit code with MSR_CM set.
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'target-ppc/excp_helper.c')
-rw-r--r-- | target-ppc/excp_helper.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/target-ppc/excp_helper.c b/target-ppc/excp_helper.c index c7762b99c5..1a593f6f3f 100644 --- a/target-ppc/excp_helper.c +++ b/target-ppc/excp_helper.c @@ -608,10 +608,11 @@ static inline void powerpc_excp(CPUPPCState *env, int excp_model, int excp) vector |= env->excp_prefix; #if defined(TARGET_PPC64) if (excp_model == POWERPC_EXCP_BOOKE) { - if (!msr_icm) { - vector = (uint32_t)vector; - } else { + if (env->spr[SPR_BOOKE_EPCR] & EPCR_ICM) { + /* Cat.64-bit: EPCR.ICM is copied to MSR.CM */ new_msr |= (target_ulong)1 << MSR_CM; + } else { + vector = (uint32_t)vector; } } else { if (!msr_isf && !(env->mmu_model & POWERPC_MMU_64)) { @@ -803,7 +804,7 @@ static inline void do_rfi(CPUPPCState *env, target_ulong nip, target_ulong msr, target_ulong msrm, int keep_msrh) { #if defined(TARGET_PPC64) - if (msr & (1ULL << MSR_SF)) { + if (msr_is_64bit(env, msr)) { nip = (uint64_t)nip; msr &= (uint64_t)msrm; } else { |