summaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
Diffstat (limited to 'target')
-rw-r--r--target/microblaze/cpu.h4
-rw-r--r--target/microblaze/helper.c2
-rw-r--r--target/microblaze/translate.c12
3 files changed, 8 insertions, 10 deletions
diff --git a/target/microblaze/cpu.h b/target/microblaze/cpu.h
index 2fc7cf26f1..a5df1fa28f 100644
--- a/target/microblaze/cpu.h
+++ b/target/microblaze/cpu.h
@@ -231,7 +231,6 @@ typedef struct CPUMBState CPUMBState;
struct CPUMBState {
uint32_t btaken;
uint32_t btarget;
- uint32_t bimm;
uint32_t imm;
uint32_t regs[32];
@@ -253,7 +252,8 @@ struct CPUMBState {
uint32_t res_val;
/* Internal flags. */
-#define IMM_FLAG 4
+#define IMM_FLAG (1 << 0)
+#define BIMM_FLAG (1 << 1)
/* MSR_EE (1 << 8) */
/* MSR_UM (1 << 11) */
/* MSR_VM (1 << 13) */
diff --git a/target/microblaze/helper.c b/target/microblaze/helper.c
index f8e2ca12a9..06f4322e09 100644
--- a/target/microblaze/helper.c
+++ b/target/microblaze/helper.c
@@ -166,7 +166,7 @@ void mb_cpu_do_interrupt(CPUState *cs)
/* Reexecute the branch. */
env->regs[17] -= 4;
/* was the branch immprefixed?. */
- if (env->bimm) {
+ if (env->iflags & BIMM_FLAG) {
env->regs[17] -= 4;
log_cpu_state_mask(CPU_LOG_INT, cs, 0);
}
diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c
index d2baa7db0e..97a436c8d5 100644
--- a/target/microblaze/translate.c
+++ b/target/microblaze/translate.c
@@ -1351,13 +1351,11 @@ static void eval_cond_jmp(DisasContext *dc, TCGv_i32 pc_true, TCGv_i32 pc_false)
static void dec_setup_dslot(DisasContext *dc)
{
- TCGv_i32 tmp = tcg_const_i32(dc->type_b && (dc->tb_flags & IMM_FLAG));
-
- dc->delayed_branch = 2;
- dc->tb_flags |= D_FLAG;
-
- tcg_gen_st_i32(tmp, cpu_env, offsetof(CPUMBState, bimm));
- tcg_temp_free_i32(tmp);
+ dc->delayed_branch = 2;
+ dc->tb_flags |= D_FLAG;
+ if (dc->type_b && (dc->tb_flags & IMM_FLAG)) {
+ dc->tb_flags |= BIMM_FLAG;
+ }
}
static void dec_bcc(DisasContext *dc)