target/arm: Use tcg_constant for v7m MRS, MSR
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 20220426163043.100432-31-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
302d3343df
commit
2f28a5b3ac
@ -6369,8 +6369,8 @@ static bool trans_MRS_v7m(DisasContext *s, arg_MRS_v7m *a)
|
|||||||
if (!arm_dc_feature(s, ARM_FEATURE_M)) {
|
if (!arm_dc_feature(s, ARM_FEATURE_M)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
tmp = tcg_const_i32(a->sysm);
|
tmp = tcg_temp_new_i32();
|
||||||
gen_helper_v7m_mrs(tmp, cpu_env, tmp);
|
gen_helper_v7m_mrs(tmp, cpu_env, tcg_constant_i32(a->sysm));
|
||||||
store_reg(s, a->rd, tmp);
|
store_reg(s, a->rd, tmp);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -6382,10 +6382,9 @@ static bool trans_MSR_v7m(DisasContext *s, arg_MSR_v7m *a)
|
|||||||
if (!arm_dc_feature(s, ARM_FEATURE_M)) {
|
if (!arm_dc_feature(s, ARM_FEATURE_M)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
addr = tcg_const_i32((a->mask << 10) | a->sysm);
|
addr = tcg_constant_i32((a->mask << 10) | a->sysm);
|
||||||
reg = load_reg(s, a->rn);
|
reg = load_reg(s, a->rn);
|
||||||
gen_helper_v7m_msr(cpu_env, addr, reg);
|
gen_helper_v7m_msr(cpu_env, addr, reg);
|
||||||
tcg_temp_free_i32(addr);
|
|
||||||
tcg_temp_free_i32(reg);
|
tcg_temp_free_i32(reg);
|
||||||
/* If we wrote to CONTROL, the EL might have changed */
|
/* If we wrote to CONTROL, the EL might have changed */
|
||||||
gen_rebuild_hflags(s, true);
|
gen_rebuild_hflags(s, true);
|
||||||
|
Loading…
Reference in New Issue
Block a user