VMSTATE_UINT32(iflags, CPUMBState),
VMSTATE_UINT32(res_val, CPUMBState),
- VMSTATE_UINTTL(res_addr, CPUMBState),
+ VMSTATE_UINT32(res_addr, CPUMBState),
VMSTATE_STRUCT(mmu, CPUMBState, 0, vmstate_mmu, MicroBlazeMMU),
static const VMStateDescription vmstate_env = {
.name = "env",
- .version_id = 0,
- .minimum_version_id = 0,
+ .version_id = 1,
+ .minimum_version_id = 1,
.fields = vmstate_env_fields,
};
static TCGv_i32 cpu_bvalue;
static TCGv_i32 cpu_btarget;
static TCGv_i32 cpu_iflags;
-static TCGv cpu_res_addr;
+static TCGv_i32 cpu_res_addr;
static TCGv_i32 cpu_res_val;
/* This is the state at translation time. */
tcg_gen_qemu_ld_i32(cpu_res_val, addr, dc->mem_index,
mo_endian(dc) | MO_UL);
- tcg_gen_mov_tl(cpu_res_addr, addr);
+ tcg_gen_mov_i32(cpu_res_addr, addr);
if (arg->rd) {
tcg_gen_mov_i32(cpu_R[arg->rd], cpu_res_val);
* branch, but we know we can use the equal version in the global.
* In either case, addr is no longer needed.
*/
- tcg_gen_brcond_tl(TCG_COND_NE, cpu_res_addr, addr, swx_fail);
+ tcg_gen_brcond_i32(TCG_COND_NE, cpu_res_addr, addr, swx_fail);
/*
* Compare the value loaded during lwx with current contents of
* Prevent the saved address from working again without another ldx.
* Akin to the pseudocode setting reservation = 0.
*/
- tcg_gen_movi_tl(cpu_res_addr, -1);
+ tcg_gen_movi_i32(cpu_res_addr, RES_ADDR_NONE);
return true;
}
tcg_gen_movi_i32(cpu_R[arg->rd], dc->base.pc_next);
}
tcg_gen_ori_i32(cpu_msr, cpu_msr, MSR_BIP);
- tcg_gen_movi_tl(cpu_res_addr, -1);
+ tcg_gen_movi_i32(cpu_res_addr, RES_ADDR_NONE);
dc->base.is_jmp = DISAS_EXIT;
return true;
if (arg->rd) {
tcg_gen_movi_i32(cpu_R[arg->rd], dc->base.pc_next);
}
- tcg_gen_movi_tl(cpu_res_addr, -1);
+ tcg_gen_movi_i32(cpu_res_addr, RES_ADDR_NONE);
#ifdef CONFIG_USER_ONLY
switch (imm) {
tcg_global_mem_new_i32(tcg_env, i32s[i].ofs, i32s[i].name);
}
- cpu_res_addr =
- tcg_global_mem_new(tcg_env, offsetof(CPUMBState, res_addr), "res_addr");
+ cpu_res_addr = tcg_global_mem_new_i32(tcg_env,
+ offsetof(CPUMBState, res_addr),
+ "res_addr");
}