[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[qemu-s390x] [PULL 22/33] s390x/tcg: Implement VECTOR PERMUTE DOUBLEWORD
From: |
Cornelia Huck |
Subject: |
[qemu-s390x] [PULL 22/33] s390x/tcg: Implement VECTOR PERMUTE DOUBLEWORD IMMEDIATE |
Date: |
Mon, 11 Mar 2019 10:03:11 +0100 |
From: David Hildenbrand <address@hidden>
Read the whole input before modifying the destination vector.
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 | 2 ++
target/s390x/translate_vx.inc.c | 16 ++++++++++++++++
2 files changed, 18 insertions(+)
diff --git a/target/s390x/insn-data.def b/target/s390x/insn-data.def
index 5f77462bb1a2..7314ae4704b9 100644
--- a/target/s390x/insn-data.def
+++ b/target/s390x/insn-data.def
@@ -1021,6 +1021,8 @@
/* VECTOR PACK LOGICAL SATURATE */
F(0xe795, VPKLS, VRR_b, V, 0, 0, 0, 0, vpk, 0, IF_VEC)
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)
#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 d8cf4360cf61..b23955b8481e 100644
--- a/target/s390x/translate_vx.inc.c
+++ b/target/s390x/translate_vx.inc.c
@@ -675,3 +675,19 @@ static DisasJumpType op_vperm(DisasContext *s, DisasOps *o)
0, gen_helper_gvec_vperm);
return DISAS_NEXT;
}
+
+static DisasJumpType op_vpdi(DisasContext *s, DisasOps *o)
+{
+ const uint8_t i2 = extract32(get_field(s->fields, m4), 2, 1);
+ const uint8_t i3 = extract32(get_field(s->fields, m4), 0, 1);
+ TCGv_i64 t0 = tcg_temp_new_i64();
+ TCGv_i64 t1 = tcg_temp_new_i64();
+
+ read_vec_element_i64(t0, get_field(s->fields, v2), i2, ES_64);
+ read_vec_element_i64(t1, get_field(s->fields, v3), i3, ES_64);
+ write_vec_element_i64(t0, get_field(s->fields, v1), 0, ES_64);
+ write_vec_element_i64(t1, get_field(s->fields, v1), 1, ES_64);
+ tcg_temp_free_i64(t0);
+ tcg_temp_free_i64(t1);
+ return DISAS_NEXT;
+}
--
2.17.2
- [qemu-s390x] [PULL 12/33] s390x/tcg: Implement VECTOR LOAD GR FROM VR ELEMENT, (continued)
- [qemu-s390x] [PULL 12/33] s390x/tcg: Implement VECTOR LOAD GR FROM VR ELEMENT, Cornelia Huck, 2019/03/11
- [qemu-s390x] [PULL 11/33] s390x/tcg: Implement VECTOR LOAD ELEMENT IMMEDIATE, Cornelia Huck, 2019/03/11
- [qemu-s390x] [PULL 13/33] s390x/tcg: Implement VECTOR LOAD LOGICAL ELEMENT AND ZERO, Cornelia Huck, 2019/03/11
- [qemu-s390x] [PULL 14/33] s390x/tcg: Implement VECTOR LOAD MULTIPLE, Cornelia Huck, 2019/03/11
- [qemu-s390x] [PULL 17/33] s390x/tcg: Implement VECTOR LOAD VR FROM GRS DISJOINT, Cornelia Huck, 2019/03/11
- [qemu-s390x] [PULL 15/33] s390x/tcg: Implement VECTOR LOAD TO BLOCK BOUNDARY, Cornelia Huck, 2019/03/11
- [qemu-s390x] [PULL 16/33] s390x/tcg: Implement VECTOR LOAD VR ELEMENT FROM GR, Cornelia Huck, 2019/03/11
- [qemu-s390x] [PULL 19/33] s390x/tcg: Implement VECTOR MERGE (HIGH|LOW), Cornelia Huck, 2019/03/11
- [qemu-s390x] [PULL 20/33] s390x/tcg: Implement VECTOR PACK *, Cornelia Huck, 2019/03/11
- [qemu-s390x] [PULL 21/33] s390x/tcg: Implement VECTOR PERMUTE, Cornelia Huck, 2019/03/11
- [qemu-s390x] [PULL 22/33] s390x/tcg: Implement VECTOR PERMUTE DOUBLEWORD IMMEDIATE,
Cornelia Huck <=
- [qemu-s390x] [PULL 23/33] s390x/tcg: Implement VECTOR REPLICATE, Cornelia Huck, 2019/03/11
- [qemu-s390x] [PULL 25/33] s390x/tcg: Implement VECTOR SCATTER ELEMENT, Cornelia Huck, 2019/03/11
- [qemu-s390x] [PULL 24/33] s390x/tcg: Implement VECTOR REPLICATE IMMEDIATE, Cornelia Huck, 2019/03/11
- [qemu-s390x] [PULL 26/33] s390x/tcg: Implement VECTOR SELECT, Cornelia Huck, 2019/03/11
- [qemu-s390x] [PULL 27/33] s390x/tcg: Implement VECTOR SIGN EXTEND TO DOUBLEWORD, Cornelia Huck, 2019/03/11
- [qemu-s390x] [PULL 28/33] s390x/tcg: Provide probe_write_access helper, Cornelia Huck, 2019/03/11
- [qemu-s390x] [PULL 29/33] s390x/tcg: Implement VECTOR STORE, Cornelia Huck, 2019/03/11
- [qemu-s390x] [PULL 31/33] s390x/tcg: Implement VECTOR STORE MULTIPLE, Cornelia Huck, 2019/03/11
- [qemu-s390x] [PULL 30/33] s390x/tcg: Implement VECTOR STORE ELEMENT, Cornelia Huck, 2019/03/11
- [qemu-s390x] [PULL 33/33] s390x/tcg: Implement VECTOR UNPACK *, Cornelia Huck, 2019/03/11