diff options
author | David Hildenbrand <david@redhat.com> | 2019-03-18 00:04:51 +0100 |
---|---|---|
committer | David Hildenbrand <david@redhat.com> | 2019-05-17 10:54:13 +0200 |
commit | 4c1bd09a1d06e76036211d19ae35762ad131f6db (patch) | |
tree | 0260f31b4131ffe704ee06aa3819d3b673b4454a /target | |
parent | 8a931bb8ddcfa503e4dc2a8bff6d313c6a74f7c6 (diff) |
s390x/tcg: Implement VECTOR AND (WITH COMPLEMENT)
Easy, as we can reuse existing gvec helpers.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: David Hildenbrand <david@redhat.com>
Diffstat (limited to 'target')
-rw-r--r-- | target/s390x/insn-data.def | 4 | ||||
-rw-r--r-- | target/s390x/translate_vx.inc.c | 14 |
2 files changed, 18 insertions, 0 deletions
diff --git a/target/s390x/insn-data.def b/target/s390x/insn-data.def index a531b21908..456d5597ca 100644 --- a/target/s390x/insn-data.def +++ b/target/s390x/insn-data.def @@ -1064,6 +1064,10 @@ F(0xe7bb, VAC, VRR_d, V, 0, 0, 0, 0, vac, 0, IF_VEC) /* VECTOR ADD WITH CARRY COMPUTE CARRY */ F(0xe7b9, VACCC, VRR_d, V, 0, 0, 0, 0, vaccc, 0, IF_VEC) +/* VECTOR AND */ + F(0xe768, VN, VRR_c, V, 0, 0, 0, 0, vn, 0, IF_VEC) +/* VECTOR AND WITH COMPLEMENT */ + F(0xe769, VNC, VRR_c, V, 0, 0, 0, 0, vnc, 0, IF_VEC) #ifndef CONFIG_USER_ONLY /* COMPARE AND SWAP AND PURGE */ diff --git a/target/s390x/translate_vx.inc.c b/target/s390x/translate_vx.inc.c index 46b3fe0292..8b4bdb2d21 100644 --- a/target/s390x/translate_vx.inc.c +++ b/target/s390x/translate_vx.inc.c @@ -1178,3 +1178,17 @@ static DisasJumpType op_vaccc(DisasContext *s, DisasOps *o) get_field(s->fields, v4)); return DISAS_NEXT; } + +static DisasJumpType op_vn(DisasContext *s, DisasOps *o) +{ + gen_gvec_fn_3(and, ES_8, get_field(s->fields, v1), get_field(s->fields, v2), + get_field(s->fields, v3)); + return DISAS_NEXT; +} + +static DisasJumpType op_vnc(DisasContext *s, DisasOps *o) +{ + gen_gvec_fn_3(andc, ES_8, get_field(s->fields, v1), + get_field(s->fields, v2), get_field(s->fields, v3)); + return DISAS_NEXT; +} |