mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-17 15:12:07 -06:00
target/arm: Enforce alignment for aa64 vector LDn/STn (single)
Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20210419202257.161730-31-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
c8f638d99a
commit
37abe399df
1 changed files with 5 additions and 4 deletions
|
@ -3815,6 +3815,7 @@ static void disas_ldst_single_struct(DisasContext *s, uint32_t insn)
|
||||||
int index = is_q << 3 | S << 2 | size;
|
int index = is_q << 3 | S << 2 | size;
|
||||||
int xs, total;
|
int xs, total;
|
||||||
TCGv_i64 clean_addr, tcg_rn, tcg_ebytes;
|
TCGv_i64 clean_addr, tcg_rn, tcg_ebytes;
|
||||||
|
MemOp mop;
|
||||||
|
|
||||||
if (extract32(insn, 31, 1)) {
|
if (extract32(insn, 31, 1)) {
|
||||||
unallocated_encoding(s);
|
unallocated_encoding(s);
|
||||||
|
@ -3876,6 +3877,7 @@ static void disas_ldst_single_struct(DisasContext *s, uint32_t insn)
|
||||||
|
|
||||||
clean_addr = gen_mte_checkN(s, tcg_rn, !is_load, is_postidx || rn != 31,
|
clean_addr = gen_mte_checkN(s, tcg_rn, !is_load, is_postidx || rn != 31,
|
||||||
total);
|
total);
|
||||||
|
mop = finalize_memop(s, scale);
|
||||||
|
|
||||||
tcg_ebytes = tcg_const_i64(1 << scale);
|
tcg_ebytes = tcg_const_i64(1 << scale);
|
||||||
for (xs = 0; xs < selem; xs++) {
|
for (xs = 0; xs < selem; xs++) {
|
||||||
|
@ -3883,8 +3885,7 @@ static void disas_ldst_single_struct(DisasContext *s, uint32_t insn)
|
||||||
/* Load and replicate to all elements */
|
/* Load and replicate to all elements */
|
||||||
TCGv_i64 tcg_tmp = tcg_temp_new_i64();
|
TCGv_i64 tcg_tmp = tcg_temp_new_i64();
|
||||||
|
|
||||||
tcg_gen_qemu_ld_i64(tcg_tmp, clean_addr,
|
tcg_gen_qemu_ld_i64(tcg_tmp, clean_addr, get_mem_index(s), mop);
|
||||||
get_mem_index(s), s->be_data + scale);
|
|
||||||
tcg_gen_gvec_dup_i64(scale, vec_full_reg_offset(s, rt),
|
tcg_gen_gvec_dup_i64(scale, vec_full_reg_offset(s, rt),
|
||||||
(is_q + 1) * 8, vec_full_reg_size(s),
|
(is_q + 1) * 8, vec_full_reg_size(s),
|
||||||
tcg_tmp);
|
tcg_tmp);
|
||||||
|
@ -3892,9 +3893,9 @@ static void disas_ldst_single_struct(DisasContext *s, uint32_t insn)
|
||||||
} else {
|
} else {
|
||||||
/* Load/store one element per register */
|
/* Load/store one element per register */
|
||||||
if (is_load) {
|
if (is_load) {
|
||||||
do_vec_ld(s, rt, index, clean_addr, scale | s->be_data);
|
do_vec_ld(s, rt, index, clean_addr, mop);
|
||||||
} else {
|
} else {
|
||||||
do_vec_st(s, rt, index, clean_addr, scale | s->be_data);
|
do_vec_st(s, rt, index, clean_addr, mop);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tcg_gen_add_i64(clean_addr, clean_addr, tcg_ebytes);
|
tcg_gen_add_i64(clean_addr, clean_addr, tcg_ebytes);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue