target-ppc: Introduce tm_enabled Bit to CPU State
Add a bit (tm_enabled) to CPU state that mirrors the MSR[TM] bit. This is analogous to the other "available" bits in the MSR (FP, VSX, etc.). NOTE: Since MSR[TM] occupies big-endian bit 31, the code is wrapped with a PPC64 bit check. Signed-off-by: Tom Musta <tommusta@gmail.com> Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
parent
e43668a7d2
commit
69d1a93774
|
@ -203,6 +203,7 @@ typedef struct DisasContext {
|
||||||
int altivec_enabled;
|
int altivec_enabled;
|
||||||
int vsx_enabled;
|
int vsx_enabled;
|
||||||
int spe_enabled;
|
int spe_enabled;
|
||||||
|
int tm_enabled;
|
||||||
ppc_spr_t *spr_cb; /* Needed to check rights for mfspr/mtspr */
|
ppc_spr_t *spr_cb; /* Needed to check rights for mfspr/mtspr */
|
||||||
int singlestep_enabled;
|
int singlestep_enabled;
|
||||||
uint64_t insns_flags;
|
uint64_t insns_flags;
|
||||||
|
@ -11342,6 +11343,13 @@ static inline void gen_intermediate_code_internal(PowerPCCPU *cpu,
|
||||||
} else {
|
} else {
|
||||||
ctx.vsx_enabled = 0;
|
ctx.vsx_enabled = 0;
|
||||||
}
|
}
|
||||||
|
#if defined(TARGET_PPC64)
|
||||||
|
if ((env->flags & POWERPC_FLAG_TM) && msr_tm) {
|
||||||
|
ctx.tm_enabled = msr_tm;
|
||||||
|
} else {
|
||||||
|
ctx.tm_enabled = 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
if ((env->flags & POWERPC_FLAG_SE) && msr_se)
|
if ((env->flags & POWERPC_FLAG_SE) && msr_se)
|
||||||
ctx.singlestep_enabled = CPU_SINGLE_STEP;
|
ctx.singlestep_enabled = CPU_SINGLE_STEP;
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue