summaryrefslogtreecommitdiffstats
path: root/target/microblaze/cpu.h
diff options
context:
space:
mode:
authorRichard Henderson2020-08-18 06:52:15 +0200
committerRichard Henderson2020-09-01 16:41:38 +0200
commitd7ecb757d1991ff0a58dcecf6c8990dbc19636bd (patch)
treed4629b3519f9dce96f6584ea04421cd00df2e57c /target/microblaze/cpu.h
parenttarget/microblaze: Remove LOG_DIS (diff)
downloadqemu-d7ecb757d1991ff0a58dcecf6c8990dbc19636bd.tar.gz
qemu-d7ecb757d1991ff0a58dcecf6c8990dbc19636bd.tar.xz
qemu-d7ecb757d1991ff0a58dcecf6c8990dbc19636bd.zip
target/microblaze: Ensure imm constant is always available
Include the env->imm value in the TB values when IMM_FLAG is set. This means that we can always reconstruct the complete 32-bit imm. Discard env_imm when its contents can no longer be accessed. Fix user-mode checks for BRK/BRKI, which depend on IMM. Tested-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target/microblaze/cpu.h')
-rw-r--r--target/microblaze/cpu.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/target/microblaze/cpu.h b/target/microblaze/cpu.h
index 7066878ac7..013858b8e0 100644
--- a/target/microblaze/cpu.h
+++ b/target/microblaze/cpu.h
@@ -374,9 +374,9 @@ static inline void cpu_get_tb_cpu_state(CPUMBState *env, target_ulong *pc,
target_ulong *cs_base, uint32_t *flags)
{
*pc = env->pc;
- *cs_base = 0;
*flags = (env->iflags & IFLAGS_TB_MASK) |
(env->msr & (MSR_UM | MSR_VM | MSR_EE));
+ *cs_base = (*flags & IMM_FLAG ? env->imm : 0);
}
#if !defined(CONFIG_USER_ONLY)