s390x/tcg: Implement VECTOR REPLICATE
Replicate via the special gvec helper. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: David Hildenbrand <david@redhat.com> Message-Id: <20190307121539.12842-23-david@redhat.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
This commit is contained in:
parent
66bb3333bc
commit
28d08731b1
@ -1023,6 +1023,8 @@
|
||||
F(0xe78c, VPERM, VRR_e, V, 0, 0, 0, 0, vperm, 0, IF_VEC)
|
||||
/* VECTOR PERMUTE DOUBLEWORD IMMEDIATE */
|
||||
F(0xe784, VPDI, VRR_c, V, 0, 0, 0, 0, vpdi, 0, IF_VEC)
|
||||
/* VECTOR REPLICATE */
|
||||
F(0xe74d, VREP, VRI_c, V, 0, 0, 0, 0, vrep, 0, IF_VEC)
|
||||
|
||||
#ifndef CONFIG_USER_ONLY
|
||||
/* COMPARE AND SWAP AND PURGE */
|
||||
|
@ -691,3 +691,19 @@ static DisasJumpType op_vpdi(DisasContext *s, DisasOps *o)
|
||||
tcg_temp_free_i64(t1);
|
||||
return DISAS_NEXT;
|
||||
}
|
||||
|
||||
static DisasJumpType op_vrep(DisasContext *s, DisasOps *o)
|
||||
{
|
||||
const uint8_t enr = get_field(s->fields, i2);
|
||||
const uint8_t es = get_field(s->fields, m4);
|
||||
|
||||
if (es > ES_64 || !valid_vec_element(enr, es)) {
|
||||
gen_program_exception(s, PGM_SPECIFICATION);
|
||||
return DISAS_NORETURN;
|
||||
}
|
||||
|
||||
tcg_gen_gvec_dup_mem(es, vec_full_reg_offset(get_field(s->fields, v1)),
|
||||
vec_reg_offset(get_field(s->fields, v3), enr, es),
|
||||
16, 16);
|
||||
return DISAS_NEXT;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user