[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[qemu-s390x] [PATCH v2 30/32] s390x/tcg: Implement VECTOR STORE MULTIPLE
From: |
David Hildenbrand |
Subject: |
[qemu-s390x] [PATCH v2 30/32] s390x/tcg: Implement VECTOR STORE MULTIPLE |
Date: |
Fri, 1 Mar 2019 12:54:11 +0100 |
Similar to VECTOR LOAD MULTIPLE, just the opposite direction. Probe
write access first.
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 | 30 ++++++++++++++++++++++++++++++
2 files changed, 32 insertions(+)
diff --git a/target/s390x/insn-data.def b/target/s390x/insn-data.def
index ff5b9e7302..17fd9a898b 100644
--- a/target/s390x/insn-data.def
+++ b/target/s390x/insn-data.def
@@ -1041,6 +1041,8 @@
E(0xe709, VSTEH, VRX, V, la2, 0, 0, 0, vste, 0, ES_16, IF_VEC)
E(0xe70b, VSTEF, VRX, V, la2, 0, 0, 0, vste, 0, ES_32, IF_VEC)
E(0xe70a, VSTEG, VRX, V, la2, 0, 0, 0, vste, 0, ES_64, IF_VEC)
+/* VECTOR STORE MULTIPLE */
+ F(0xe73e, VSTM, VRS_a, V, la2, 0, 0, 0, vstm, 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 2dc74ef2bc..cd69877270 100644
--- a/target/s390x/translate_vx.inc.c
+++ b/target/s390x/translate_vx.inc.c
@@ -848,3 +848,33 @@ static DisasJumpType op_vste(DisasContext *s, DisasOps *o)
tcg_temp_free_i64(tmp);
return DISAS_NEXT;
}
+
+static DisasJumpType op_vstm(DisasContext *s, DisasOps *o)
+{
+ const uint8_t v3 = get_field(s->fields, v3);
+ uint8_t v1 = get_field(s->fields, v1);
+ TCGv_i64 tmp;
+
+ while (v3 < v1 || (v3 - v1 + 1) > 16) {
+ gen_program_exception(s, PGM_SPECIFICATION);
+ return DISAS_NORETURN;
+ }
+
+ /* Probe write access before actually modifying memory */
+ tmp = tcg_const_i64((v3 - v1 + 1) * 16);
+ gen_helper_probe_write_access(cpu_env, o->addr1, tmp);
+
+ for (;; v1++) {
+ read_vec_element_i64(tmp, v1, 0, ES_64);
+ tcg_gen_qemu_st_i64(tmp, o->addr1, get_mem_index(s), MO_TEQ);
+ gen_addi_and_wrap_i64(s, o->addr1, o->addr1, 8);
+ read_vec_element_i64(tmp, v1, 1, ES_64);
+ tcg_gen_qemu_st_i64(tmp, o->addr1, get_mem_index(s), MO_TEQ);
+ if (v1 == v3) {
+ break;
+ }
+ gen_addi_and_wrap_i64(s, o->addr1, o->addr1, 8);
+ }
+ tcg_temp_free_i64(tmp);
+ return DISAS_NEXT;
+}
--
2.17.2
- [qemu-s390x] [PATCH v2 24/32] s390x/tcg: Implement VECTOR SCATTER ELEMENT, (continued)
- [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
- [qemu-s390x] [PATCH v2 28/32] s390x/tcg: Implement VECTOR STORE, David Hildenbrand, 2019/03/01
- [qemu-s390x] [PATCH v2 29/32] s390x/tcg: Implement VECTOR STORE ELEMENT, David Hildenbrand, 2019/03/01
- [qemu-s390x] [PATCH v2 30/32] s390x/tcg: Implement VECTOR STORE MULTIPLE,
David Hildenbrand <=
- [qemu-s390x] [PATCH v2 31/32] s390x/tcg: Implement VECTOR STORE WITH LENGTH, David Hildenbrand, 2019/03/01
- [qemu-s390x] [PATCH v2 32/32] s390x/tcg: Implement VECTOR UNPACK *, David Hildenbrand, 2019/03/01
- Re: [qemu-s390x] [Qemu-devel] [PATCH v2 00/32] s390x/tcg: Vector Instruction Support Part 1, no-reply, 2019/03/01
- Re: [qemu-s390x] [Qemu-devel] [PATCH v2 00/32] s390x/tcg: Vector Instruction Support Part 1, no-reply, 2019/03/01
- Re: [qemu-s390x] [Qemu-devel] [PATCH v2 00/32] s390x/tcg: Vector Instruction Support Part 1, no-reply, 2019/03/01
- Re: [qemu-s390x] [Qemu-devel] [PATCH v2 00/32] s390x/tcg: Vector Instruction Support Part 1, no-reply, 2019/03/01
- Re: [qemu-s390x] [Qemu-devel] [PATCH v2 00/32] s390x/tcg: Vector Instruction Support Part 1, no-reply, 2019/03/01
- Re: [qemu-s390x] [Qemu-devel] [PATCH v2 00/32] s390x/tcg: Vector Instruction Support Part 1, no-reply, 2019/03/01