Skip to content

Commit 792a557

Browse files
rth7680pm215
authored andcommitted
target/arm: Implement SVE copy to vector (predicated)
Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20180613015641.5667-8-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
1 parent ef23cb7 commit 792a557

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

target/arm/sve.decode

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,12 @@ LASTB_v 00000101 .. 10001 1 100 ... ..... ..... @rd_pg_rn
450450
LASTA_r 00000101 .. 10000 0 101 ... ..... ..... @rd_pg_rn
451451
LASTB_r 00000101 .. 10000 1 101 ... ..... ..... @rd_pg_rn
452452

453+
# SVE copy element from SIMD&FP scalar register
454+
CPY_m_v 00000101 .. 100000 100 ... ..... ..... @rd_pg_rn
455+
456+
# SVE copy element from general register to vector (predicated)
457+
CPY_m_r 00000101 .. 101000 101 ... ..... ..... @rd_pg_rn
458+
453459
### SVE Predicate Logical Operations Group
454460

455461
# SVE predicate logical operations

target/arm/translate-sve.c

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2624,6 +2624,25 @@ static bool trans_LASTB_r(DisasContext *s, arg_rpr_esz *a, uint32_t insn)
26242624
return do_last_general(s, a, true);
26252625
}
26262626

2627+
static bool trans_CPY_m_r(DisasContext *s, arg_rpr_esz *a, uint32_t insn)
2628+
{
2629+
if (sve_access_check(s)) {
2630+
do_cpy_m(s, a->esz, a->rd, a->rd, a->pg, cpu_reg_sp(s, a->rn));
2631+
}
2632+
return true;
2633+
}
2634+
2635+
static bool trans_CPY_m_v(DisasContext *s, arg_rpr_esz *a, uint32_t insn)
2636+
{
2637+
if (sve_access_check(s)) {
2638+
int ofs = vec_reg_offset(s, a->rn, 0, a->esz);
2639+
TCGv_i64 t = load_esz(cpu_env, ofs, a->esz);
2640+
do_cpy_m(s, a->esz, a->rd, a->rd, a->pg, t);
2641+
tcg_temp_free_i64(t);
2642+
}
2643+
return true;
2644+
}
2645+
26272646
/*
26282647
*** SVE Memory - 32-bit Gather and Unsized Contiguous Group
26292648
*/

0 commit comments

Comments
 (0)