[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[qemu-s390x] [PATCH v2 22/32] s390x/tcg: Implement VECTOR REPLICATE
From: |
David Hildenbrand |
Subject: |
[qemu-s390x] [PATCH v2 22/32] s390x/tcg: Implement VECTOR REPLICATE |
Date: |
Fri, 1 Mar 2019 12:54:03 +0100 |
Load the element and replicate it using gvec_dup.
Reviewed-by: Richard Henderson <address@hidden>
Signed-off-by: David Hildenbrand <address@hidden>
---
target/s390x/insn-data.def | 2 ++
target/s390x/translate_vx.inc.c | 18 ++++++++++++++++++
2 files changed, 20 insertions(+)
diff --git a/target/s390x/insn-data.def b/target/s390x/insn-data.def
index 7314ae4704..14e010765d 100644
--- a/target/s390x/insn-data.def
+++ b/target/s390x/insn-data.def
@@ -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 */
diff --git a/target/s390x/translate_vx.inc.c b/target/s390x/translate_vx.inc.c
index 8afde8fe2c..63bb37d0a1 100644
--- a/target/s390x/translate_vx.inc.c
+++ b/target/s390x/translate_vx.inc.c
@@ -685,3 +685,21 @@ 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);
+ TCGv_i64 tmp;
+
+ if (es > ES_64 || !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, v3), enr, es);
+ gen_gvec_dup_i64(es, get_field(s->fields, v1), tmp);
+ tcg_temp_free_i64(tmp);
+ return DISAS_NEXT;
+}
--
2.17.2
- [qemu-s390x] [PATCH v2 14/32] s390x/tcg: Implement VECTOR LOAD TO BLOCK BOUNDARY, (continued)
- [qemu-s390x] [PATCH v2 14/32] s390x/tcg: Implement VECTOR LOAD TO BLOCK BOUNDARY, David Hildenbrand, 2019/03/01
- [qemu-s390x] [PATCH v2 15/32] s390x/tcg: Implement VECTOR LOAD VR ELEMENT FROM GR, David Hildenbrand, 2019/03/01
- [qemu-s390x] [PATCH v2 16/32] s390x/tcg: Implement VECTOR LOAD VR FROM GRS DISJOINT, David Hildenbrand, 2019/03/01
- [qemu-s390x] [PATCH v2 18/32] s390x/tcg: Implement VECTOR MERGE (HIGH|LOW), David Hildenbrand, 2019/03/01
- [qemu-s390x] [PATCH v2 17/32] s390x/tcg: Implement VECTOR LOAD WITH LENGTH, David Hildenbrand, 2019/03/01
- [qemu-s390x] [PATCH v2 20/32] s390x/tcg: Implement VECTOR PERMUTE, David Hildenbrand, 2019/03/01
- [qemu-s390x] [PATCH v2 19/32] s390x/tcg: Implement VECTOR PACK *, David Hildenbrand, 2019/03/01
- [qemu-s390x] [PATCH v2 21/32] s390x/tcg: Implement VECTOR PERMUTE DOUBLEWORD IMMEDIATE, David Hildenbrand, 2019/03/01
- [qemu-s390x] [PATCH v2 22/32] s390x/tcg: Implement VECTOR REPLICATE,
David Hildenbrand <=
- [qemu-s390x] [PATCH v2 23/32] s390x/tcg: Implement VECTOR REPLICATE IMMEDIATE, David Hildenbrand, 2019/03/01
- [qemu-s390x] [PATCH v2 24/32] s390x/tcg: Implement VECTOR SCATTER ELEMENT, David Hildenbrand, 2019/03/01
- [qemu-s390x] [PATCH v2 25/32] s390x/tcg: Implement VECTOR SELECT, David Hildenbrand, 2019/03/01
- [qemu-s390x] [PATCH v2 26/32] s390x/tcg: Implement VECTOR SIGN EXTEND TO DOUBLEWORD, David Hildenbrand, 2019/03/01
- [qemu-s390x] [PATCH v2 27/32] s390x/tcg: Provide probe_write helper, David Hildenbrand, 2019/03/01