[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[qemu-s390x] [PATCH v1 09/33] s390x/tcg: Implement VECTOR LOAD AND REPLI
From: |
David Hildenbrand |
Subject: |
[qemu-s390x] [PATCH v1 09/33] s390x/tcg: Implement VECTOR LOAD AND REPLICATE |
Date: |
Tue, 26 Feb 2019 12:38:51 +0100 |
We can use tcg_gen_gvec_dup_i64() to carry out the duplication.
Signed-off-by: David Hildenbrand <address@hidden>
---
target/s390x/insn-data.def | 2 ++
target/s390x/translate_vx.inc.c | 17 +++++++++++++++++
2 files changed, 19 insertions(+)
diff --git a/target/s390x/insn-data.def b/target/s390x/insn-data.def
index c6dd70f2fd..5475f04561 100644
--- a/target/s390x/insn-data.def
+++ b/target/s390x/insn-data.def
@@ -984,6 +984,8 @@
/* VECTOR LOAD */
F(0xe706, VL, VRX, V, la2, 0, 0, 0, vl, 0, IF_VEC)
F(0xe756, VLR, VRR_a, V, 0, 0, 0, 0, vlr, 0, IF_VEC)
+/* VECTOR LOAD AND REPLICATE */
+ F(0xe705, VLREP, VRX, V, la2, 0, 0, 0, vlrep, 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 9af5639bfe..b898910cd9 100644
--- a/target/s390x/translate_vx.inc.c
+++ b/target/s390x/translate_vx.inc.c
@@ -227,3 +227,20 @@ static DisasJumpType op_vlr(DisasContext *s, DisasOps *o)
gen_gvec_mov(get_field(s->fields, v1), get_field(s->fields, v2));
return DISAS_NEXT;
}
+
+static DisasJumpType op_vlrep(DisasContext *s, DisasOps *o)
+{
+ const uint8_t es = get_field(s->fields, m3);
+ TCGv_i64 tmp;
+
+ if (es > MO_64) {
+ gen_program_exception(s, PGM_SPECIFICATION);
+ return DISAS_NORETURN;
+ }
+
+ tmp = tcg_temp_new_i64();
+ tcg_gen_qemu_ld_i64(tmp, o->addr1, get_mem_index(s), MO_TE | es);
+ gen_gvec_dup_i64(es, get_field(s->fields, v1), tmp);
+ tcg_temp_free_i64(tmp);
+ return DISAS_NEXT;
+}
--
2.17.2
- Re: [qemu-s390x] [Qemu-devel] [PATCH v1 07/33] s390x/tcg: Implement VECTOR GENERATE MASK, (continued)
- [qemu-s390x] [PATCH v1 02/33] s390x/tcg: Check vector register instructions at central point, David Hildenbrand, 2019/02/26
- [qemu-s390x] [PATCH v1 03/33] s390x: Add one temporary vector register in CPU state for TCG, David Hildenbrand, 2019/02/26
- [qemu-s390x] [PATCH v1 09/33] s390x/tcg: Implement VECTOR LOAD AND REPLICATE,
David Hildenbrand <=
- [qemu-s390x] [PATCH v1 10/33] s390x/tcg: Implement VECTOR LOAD ELEMENT, David Hildenbrand, 2019/02/26
- [qemu-s390x] [PATCH v1 04/33] s390x/tcg: Utilities for vector instruction helpers, David Hildenbrand, 2019/02/26
- [qemu-s390x] [PATCH v1 11/33] s390x/tcg: Implement VECTOR LOAD ELEMENT IMMEDIATE, David Hildenbrand, 2019/02/26
- [qemu-s390x] [PATCH v1 17/33] s390x/tcg: Implement VECTOR LOAD VR FROM GRS DISJOINT, David Hildenbrand, 2019/02/26
- [qemu-s390x] [PATCH v1 14/33] s390x/tcg: Implement VECTOR LOAD MULTIPLE, David Hildenbrand, 2019/02/26