From e42a61f185f859246c14445b6e98e195eb3b977b Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Wed, 20 Jun 2012 21:20:29 +0200 Subject: 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 --- target-ppc/cpu.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'target-ppc/cpu.h') diff --git a/target-ppc/cpu.h b/target-ppc/cpu.h index 12200ab..7a77fff 100644 --- a/target-ppc/cpu.h +++ b/target-ppc/cpu.h @@ -2212,6 +2212,15 @@ static inline uint32_t booke206_tlbnps(CPUPPCState *env, const int tlbn) #endif +static inline bool msr_is_64bit(CPUPPCState *env, target_ulong msr) +{ + if (env->mmu_model == POWERPC_MMU_BOOKE206) { + return msr & (1ULL << MSR_CM); + } + + return msr & (1ULL << MSR_SF); +} + extern void (*cpu_ppc_hypercall)(CPUPPCState *); static inline bool cpu_has_work(CPUPPCState *env) -- cgit v1.1