target/arm: Use MemOp for size + endian in aa64 vector ld/st
Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20210419202257.161730-29-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
acb07e08d6
commit
a9e89e539e
@ -1146,24 +1146,24 @@ static void write_vec_element_i32(DisasContext *s, TCGv_i32 tcg_src,
|
||||
|
||||
/* Store from vector register to memory */
|
||||
static void do_vec_st(DisasContext *s, int srcidx, int element,
|
||||
TCGv_i64 tcg_addr, int size, MemOp endian)
|
||||
TCGv_i64 tcg_addr, MemOp mop)
|
||||
{
|
||||
TCGv_i64 tcg_tmp = tcg_temp_new_i64();
|
||||
|
||||
read_vec_element(s, tcg_tmp, srcidx, element, size);
|
||||
tcg_gen_qemu_st_i64(tcg_tmp, tcg_addr, get_mem_index(s), endian | size);
|
||||
read_vec_element(s, tcg_tmp, srcidx, element, mop & MO_SIZE);
|
||||
tcg_gen_qemu_st_i64(tcg_tmp, tcg_addr, get_mem_index(s), mop);
|
||||
|
||||
tcg_temp_free_i64(tcg_tmp);
|
||||
}
|
||||
|
||||
/* Load from memory to vector register */
|
||||
static void do_vec_ld(DisasContext *s, int destidx, int element,
|
||||
TCGv_i64 tcg_addr, int size, MemOp endian)
|
||||
TCGv_i64 tcg_addr, MemOp mop)
|
||||
{
|
||||
TCGv_i64 tcg_tmp = tcg_temp_new_i64();
|
||||
|
||||
tcg_gen_qemu_ld_i64(tcg_tmp, tcg_addr, get_mem_index(s), endian | size);
|
||||
write_vec_element(s, tcg_tmp, destidx, element, size);
|
||||
tcg_gen_qemu_ld_i64(tcg_tmp, tcg_addr, get_mem_index(s), mop);
|
||||
write_vec_element(s, tcg_tmp, destidx, element, mop & MO_SIZE);
|
||||
|
||||
tcg_temp_free_i64(tcg_tmp);
|
||||
}
|
||||
@ -3734,9 +3734,9 @@ static void disas_ldst_multiple_struct(DisasContext *s, uint32_t insn)
|
||||
for (xs = 0; xs < selem; xs++) {
|
||||
int tt = (rt + r + xs) % 32;
|
||||
if (is_store) {
|
||||
do_vec_st(s, tt, e, clean_addr, size, endian);
|
||||
do_vec_st(s, tt, e, clean_addr, size | endian);
|
||||
} else {
|
||||
do_vec_ld(s, tt, e, clean_addr, size, endian);
|
||||
do_vec_ld(s, tt, e, clean_addr, size | endian);
|
||||
}
|
||||
tcg_gen_add_i64(clean_addr, clean_addr, tcg_ebytes);
|
||||
}
|
||||
@ -3885,9 +3885,9 @@ static void disas_ldst_single_struct(DisasContext *s, uint32_t insn)
|
||||
} else {
|
||||
/* Load/store one element per register */
|
||||
if (is_load) {
|
||||
do_vec_ld(s, rt, index, clean_addr, scale, s->be_data);
|
||||
do_vec_ld(s, rt, index, clean_addr, scale | s->be_data);
|
||||
} else {
|
||||
do_vec_st(s, rt, index, clean_addr, scale, s->be_data);
|
||||
do_vec_st(s, rt, index, clean_addr, scale | s->be_data);
|
||||
}
|
||||
}
|
||||
tcg_gen_add_i64(clean_addr, clean_addr, tcg_ebytes);
|
||||
|
Loading…
Reference in New Issue
Block a user