Revision 056401ea target-ppc/helper_regs.h
b/target-ppc/helper_regs.h | ||
---|---|---|
58 | 58 |
env->tgpr[3] = tmp; |
59 | 59 |
} |
60 | 60 |
|
61 |
static always_inline void hreg_compute_mem_idx (CPUPPCState *env) |
|
62 |
{ |
|
63 |
#if defined (TARGET_PPC64H) |
|
64 |
/* Precompute MMU index */ |
|
65 |
if (msr_pr == 0 && msr_hv != 0) |
|
66 |
env->mmu_idx = 2; |
|
67 |
else |
|
68 |
#endif |
|
69 |
env->mmu_idx = 1 - msr_pr; |
|
70 |
} |
|
71 |
|
|
61 | 72 |
static always_inline void hreg_compute_hflags (CPUPPCState *env) |
62 | 73 |
{ |
63 | 74 |
target_ulong hflags_mask; |
... | ... | |
70 | 81 |
hflags_mask |= (1ULL << MSR_CM) | (1ULL << MSR_SF); |
71 | 82 |
#if defined (TARGET_PPC64H) |
72 | 83 |
hflags_mask |= 1ULL << MSR_HV; |
73 |
/* Precompute MMU index */ |
|
74 |
if (msr_pr == 0 && msr_hv != 0) |
|
75 |
env->mmu_idx = 2; |
|
76 |
else |
|
77 | 84 |
#endif |
78 | 85 |
#endif |
79 |
env->mmu_idx = 1 - msr_pr;
|
|
86 |
hreg_compute_mem_idx(env);
|
|
80 | 87 |
env->hflags = env->msr & hflags_mask; |
88 |
/* Merge with hflags coming from other registers */ |
|
89 |
env->hflags |= env->hflags_nmsr; |
|
81 | 90 |
} |
82 | 91 |
|
83 | 92 |
static always_inline int hreg_store_msr (CPUPPCState *env, target_ulong value) |
Also available in: Unified diff