mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 09:13:55 -06:00
target/arm: Add helper_mte_check_zva
Use a special helper for DC_ZVA, rather than the more general mte_checkN. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20200626033144.790098-28-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
5add824855
commit
46dc1bc060
3 changed files with 122 additions and 1 deletions
|
@ -1857,7 +1857,21 @@ static void handle_sys(DisasContext *s, uint32_t insn, bool isread,
|
|||
return;
|
||||
case ARM_CP_DC_ZVA:
|
||||
/* Writes clear the aligned block of memory which rt points into. */
|
||||
tcg_rt = clean_data_tbi(s, cpu_reg(s, rt));
|
||||
if (s->mte_active[0]) {
|
||||
TCGv_i32 t_desc;
|
||||
int desc = 0;
|
||||
|
||||
desc = FIELD_DP32(desc, MTEDESC, MIDX, get_mem_index(s));
|
||||
desc = FIELD_DP32(desc, MTEDESC, TBI, s->tbid);
|
||||
desc = FIELD_DP32(desc, MTEDESC, TCMA, s->tcma);
|
||||
t_desc = tcg_const_i32(desc);
|
||||
|
||||
tcg_rt = new_tmp_a64(s);
|
||||
gen_helper_mte_check_zva(tcg_rt, cpu_env, t_desc, cpu_reg(s, rt));
|
||||
tcg_temp_free_i32(t_desc);
|
||||
} else {
|
||||
tcg_rt = clean_data_tbi(s, cpu_reg(s, rt));
|
||||
}
|
||||
gen_helper_dc_zva(cpu_env, tcg_rt);
|
||||
return;
|
||||
default:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue