[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 25/33] s390x/tcg: Implement VECTOR SCATTER ELEMENT
From: |
Cornelia Huck |
Subject: |
[Qemu-devel] [PULL 25/33] s390x/tcg: Implement VECTOR SCATTER ELEMENT |
Date: |
Mon, 11 Mar 2019 10:03:14 +0100 |
From: David Hildenbrand <address@hidden>
Similar to VECTOR GATHER ELEMENT, but the other direction.
Reviewed-by: Richard Henderson <address@hidden>
Signed-off-by: David Hildenbrand <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Cornelia Huck <address@hidden>
---
target/s390x/insn-data.def | 3 +++
target/s390x/translate_vx.inc.c | 22 ++++++++++++++++++++++
2 files changed, 25 insertions(+)
diff --git a/target/s390x/insn-data.def b/target/s390x/insn-data.def
index 99fb697d914b..8d7c834e7d4a 100644
--- a/target/s390x/insn-data.def
+++ b/target/s390x/insn-data.def
@@ -1027,6 +1027,9 @@
F(0xe74d, VREP, VRI_c, V, 0, 0, 0, 0, vrep, 0, IF_VEC)
/* VECTOR REPLICATE IMMEDIATE */
F(0xe745, VREPI, VRI_a, V, 0, 0, 0, 0, vrepi, 0, IF_VEC)
+/* VECTOR SCATTER ELEMENT */
+ E(0xe71b, VSCEF, VRV, V, la2, 0, 0, 0, vsce, 0, ES_32, IF_VEC)
+ E(0xe71a, VSCEG, VRV, V, la2, 0, 0, 0, vsce, 0, ES_64, 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 b6061d7acfec..cd8c173b36eb 100644
--- a/target/s390x/translate_vx.inc.c
+++ b/target/s390x/translate_vx.inc.c
@@ -721,3 +721,25 @@ static DisasJumpType op_vrepi(DisasContext *s, DisasOps *o)
gen_gvec_dupi(es, get_field(s->fields, v1), data);
return DISAS_NEXT;
}
+
+static DisasJumpType op_vsce(DisasContext *s, DisasOps *o)
+{
+ const uint8_t es = s->insn->data;
+ const uint8_t enr = get_field(s->fields, m3);
+ TCGv_i64 tmp;
+
+ if (!valid_vec_element(enr, es)) {
+ gen_program_exception(s, PGM_SPECIFICATION);
+ return DISAS_NORETURN;
+ }
+
+ tmp = tcg_temp_new_i64();
+ read_vec_element_i64(tmp, get_field(s->fields, v2), enr, es);
+ tcg_gen_add_i64(o->addr1, o->addr1, tmp);
+ gen_addi_and_wrap_i64(s, o->addr1, o->addr1, 0);
+
+ read_vec_element_i64(tmp, get_field(s->fields, v1), enr, es);
+ tcg_gen_qemu_st_i64(tmp, o->addr1, get_mem_index(s), MO_TE | es);
+ tcg_temp_free_i64(tmp);
+ return DISAS_NEXT;
+}
--
2.17.2
- [Qemu-devel] [PULL 14/33] s390x/tcg: Implement VECTOR LOAD MULTIPLE, (continued)
- [Qemu-devel] [PULL 14/33] s390x/tcg: Implement VECTOR LOAD MULTIPLE, Cornelia Huck, 2019/03/11
- [Qemu-devel] [PULL 13/33] s390x/tcg: Implement VECTOR LOAD LOGICAL ELEMENT AND ZERO, Cornelia Huck, 2019/03/11
- [Qemu-devel] [PULL 15/33] s390x/tcg: Implement VECTOR LOAD TO BLOCK BOUNDARY, Cornelia Huck, 2019/03/11
- [Qemu-devel] [PULL 16/33] s390x/tcg: Implement VECTOR LOAD VR ELEMENT FROM GR, Cornelia Huck, 2019/03/11
- [Qemu-devel] [PULL 17/33] s390x/tcg: Implement VECTOR LOAD VR FROM GRS DISJOINT, Cornelia Huck, 2019/03/11
- [Qemu-devel] [PULL 18/33] s390x/tcg: Implement VECTOR LOAD WITH LENGTH, Cornelia Huck, 2019/03/11
- [Qemu-devel] [PULL 19/33] s390x/tcg: Implement VECTOR MERGE (HIGH|LOW), Cornelia Huck, 2019/03/11
- [Qemu-devel] [PULL 20/33] s390x/tcg: Implement VECTOR PACK *, Cornelia Huck, 2019/03/11
- [Qemu-devel] [PULL 21/33] s390x/tcg: Implement VECTOR PERMUTE, Cornelia Huck, 2019/03/11
- [Qemu-devel] [PULL 22/33] s390x/tcg: Implement VECTOR PERMUTE DOUBLEWORD IMMEDIATE, Cornelia Huck, 2019/03/11
- [Qemu-devel] [PULL 25/33] s390x/tcg: Implement VECTOR SCATTER ELEMENT,
Cornelia Huck <=
- [Qemu-devel] [PULL 23/33] s390x/tcg: Implement VECTOR REPLICATE, Cornelia Huck, 2019/03/11
- [Qemu-devel] [PULL 24/33] s390x/tcg: Implement VECTOR REPLICATE IMMEDIATE, Cornelia Huck, 2019/03/11
- [Qemu-devel] [PULL 26/33] s390x/tcg: Implement VECTOR SELECT, Cornelia Huck, 2019/03/11
- [Qemu-devel] [PULL 27/33] s390x/tcg: Implement VECTOR SIGN EXTEND TO DOUBLEWORD, Cornelia Huck, 2019/03/11
- [Qemu-devel] [PULL 28/33] s390x/tcg: Provide probe_write_access helper, Cornelia Huck, 2019/03/11
- [Qemu-devel] [PULL 29/33] s390x/tcg: Implement VECTOR STORE, Cornelia Huck, 2019/03/11
- [Qemu-devel] [PULL 30/33] s390x/tcg: Implement VECTOR STORE ELEMENT, Cornelia Huck, 2019/03/11
- [Qemu-devel] [PULL 31/33] s390x/tcg: Implement VECTOR STORE MULTIPLE, Cornelia Huck, 2019/03/11
- [Qemu-devel] [PULL 32/33] s390x/tcg: Implement VECTOR STORE WITH LENGTH, Cornelia Huck, 2019/03/11
- [Qemu-devel] [PULL 33/33] s390x/tcg: Implement VECTOR UNPACK *, Cornelia Huck, 2019/03/11