[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[qemu-s390x] [PULL 16/33] s390x/tcg: Implement VECTOR LOAD VR ELEMENT FR
From: |
Cornelia Huck |
Subject: |
[qemu-s390x] [PULL 16/33] s390x/tcg: Implement VECTOR LOAD VR ELEMENT FROM GR |
Date: |
Mon, 11 Mar 2019 10:03:05 +0100 |
From: David Hildenbrand <address@hidden>
Very similar to VECTOR LOAD GR FROM VR ELEMENT, just the opposite
direction. Also provide a fast path in case we don't care about the
register content.
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 | 41 +++++++++++++++++++++++++++++++++
2 files changed, 43 insertions(+)
diff --git a/target/s390x/insn-data.def b/target/s390x/insn-data.def
index ad8df5283cfd..68140612045e 100644
--- a/target/s390x/insn-data.def
+++ b/target/s390x/insn-data.def
@@ -1004,6 +1004,8 @@
F(0xe736, VLM, VRS_a, V, la2, 0, 0, 0, vlm, 0, IF_VEC)
/* VECTOR LOAD TO BLOCK BOUNDARY */
F(0xe707, VLBB, VRX, V, la2, 0, 0, 0, vlbb, 0, IF_VEC)
+/* VECTOR LOAD VR ELEMENT FROM GR */
+ F(0xe722, VLVG, VRS_b, V, la2, r3, 0, 0, vlvg, 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 f1eb45890201..287bd9627d34 100644
--- a/target/s390x/translate_vx.inc.c
+++ b/target/s390x/translate_vx.inc.c
@@ -471,3 +471,44 @@ static DisasJumpType op_vlbb(DisasContext *s, DisasOps *o)
tcg_temp_free_ptr(a0);
return DISAS_NEXT;
}
+
+static DisasJumpType op_vlvg(DisasContext *s, DisasOps *o)
+{
+ const uint8_t es = get_field(s->fields, m4);
+ TCGv_ptr ptr;
+
+ if (es > ES_64) {
+ gen_program_exception(s, PGM_SPECIFICATION);
+ return DISAS_NORETURN;
+ }
+
+ /* fast path if we don't need the register content */
+ if (!get_field(s->fields, b2)) {
+ uint8_t enr = get_field(s->fields, d2) & (NUM_VEC_ELEMENTS(es) - 1);
+
+ write_vec_element_i64(o->in2, get_field(s->fields, v1), enr, es);
+ return DISAS_NEXT;
+ }
+
+ ptr = tcg_temp_new_ptr();
+ get_vec_element_ptr_i64(ptr, get_field(s->fields, v1), o->addr1, es);
+ switch (es) {
+ case ES_8:
+ tcg_gen_st8_i64(o->in2, ptr, 0);
+ break;
+ case ES_16:
+ tcg_gen_st16_i64(o->in2, ptr, 0);
+ break;
+ case ES_32:
+ tcg_gen_st32_i64(o->in2, ptr, 0);
+ break;
+ case ES_64:
+ tcg_gen_st_i64(o->in2, ptr, 0);
+ break;
+ default:
+ g_assert_not_reached();
+ }
+ tcg_temp_free_ptr(ptr);
+
+ return DISAS_NEXT;
+}
--
2.17.2
- [qemu-s390x] [PULL 08/33] s390x/tcg: Implement VECTOR LOAD, (continued)
- [qemu-s390x] [PULL 08/33] s390x/tcg: Implement VECTOR LOAD, Cornelia Huck, 2019/03/11
- [qemu-s390x] [PULL 07/33] s390x/tcg: Implement VECTOR GENERATE MASK, Cornelia Huck, 2019/03/11
- [qemu-s390x] [PULL 10/33] s390x/tcg: Implement VECTOR LOAD ELEMENT, Cornelia Huck, 2019/03/11
- [qemu-s390x] [PULL 09/33] s390x/tcg: Implement VECTOR LOAD AND REPLICATE, Cornelia Huck, 2019/03/11
- [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 <=
- [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, 2019/03/11
- [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