[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[qemu-s390x] [PATCH v1 23/33] s390x/tcg: Implement VECTOR PERMUTE DOUBLE
From: |
David Hildenbrand |
Subject: |
[qemu-s390x] [PATCH v1 23/33] s390x/tcg: Implement VECTOR PERMUTE DOUBLEWORD IMMEDIATE |
Date: |
Tue, 26 Feb 2019 12:39:05 +0100 |
Read the whole input before modifying the destination vector.
Signed-off-by: David Hildenbrand <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 b4b4be651b..eb4dea2e2d 100644
--- a/target/s390x/insn-data.def
+++ b/target/s390x/insn-data.def
@@ -1022,6 +1022,8 @@
F(0xe795, VPKLS, VRR_b, V, 0, 0, 0, 0, vpks, 0, IF_VEC)
/* VECTOR PERMUTE */
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 a57d4816c4..e67b47f262 100644
--- a/target/s390x/translate_vx.inc.c
+++ b/target/s390x/translate_vx.inc.c
@@ -614,3 +614,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, MO_64);
+ read_vec_element_i64(t1, get_field(s->fields, v3), i3, MO_64);
+ write_vec_element_i64(t0, get_field(s->fields, v1), 0, MO_64);
+ write_vec_element_i64(t1, get_field(s->fields, v1), 1, MO_64);
+ tcg_temp_free_i64(t0);
+ tcg_temp_free_i64(t1);
+ return DISAS_NEXT;
+}
--
2.17.2
- Re: [qemu-s390x] [Qemu-devel] [PATCH v1 19/33] s390x/tcg: Implement VECTOR MERGE (HIGH|LOW), (continued)
- [qemu-s390x] [PATCH v1 13/33] s390x/tcg: Implement VECTOR LOAD LOGICAL ELEMENT AND ZERO, David Hildenbrand, 2019/02/26
- [qemu-s390x] [PATCH v1 21/33] s390x/tcg: Implement VECTOR PACK (LOGICAL) SATURATE, David Hildenbrand, 2019/02/26
- [qemu-s390x] [PATCH v1 22/33] s390x/tcg: Implement VECTOR PERMUTE, David Hildenbrand, 2019/02/26
- [qemu-s390x] [PATCH v1 23/33] s390x/tcg: Implement VECTOR PERMUTE DOUBLEWORD IMMEDIATE,
David Hildenbrand <=
- [qemu-s390x] [PATCH v1 24/33] s390x/tcg: Implement VECTOR REPLICATE, David Hildenbrand, 2019/02/26
- [qemu-s390x] [PATCH v1 25/33] s390x/tcg: Implement VECTOR REPLICATE IMMEDIATE, David Hildenbrand, 2019/02/26
- [qemu-s390x] [PATCH v1 26/33] s390x/tcg: Implement VECTOR SCATTER ELEMENT, David Hildenbrand, 2019/02/26
- [qemu-s390x] [PATCH v1 28/33] s390x/tcg: Implement VECTOR SIGN EXTEND TO DOUBLEWORD, David Hildenbrand, 2019/02/26