[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 10/32] s390x/tcg: Implement VECTOR LOAD ELEMENT I
From: |
David Hildenbrand |
Subject: |
[Qemu-devel] [PATCH v3 10/32] s390x/tcg: Implement VECTOR LOAD ELEMENT IMMEDIATE |
Date: |
Thu, 7 Mar 2019 13:15:17 +0100 |
Take care of properly sign-extending the immediate.
Reviewed-by: Richard Henderson <address@hidden>
Signed-off-by: David Hildenbrand <address@hidden>
---
target/s390x/insn-data.def | 5 +++++
target/s390x/translate_vx.inc.c | 17 +++++++++++++++++
2 files changed, 22 insertions(+)
diff --git a/target/s390x/insn-data.def b/target/s390x/insn-data.def
index aec0a3ba97..782d49e1db 100644
--- a/target/s390x/insn-data.def
+++ b/target/s390x/insn-data.def
@@ -991,6 +991,11 @@
E(0xe701, VLEH, VRX, V, la2, 0, 0, 0, vle, 0, ES_16, IF_VEC)
E(0xe703, VLEF, VRX, V, la2, 0, 0, 0, vle, 0, ES_32, IF_VEC)
E(0xe702, VLEG, VRX, V, la2, 0, 0, 0, vle, 0, ES_64, IF_VEC)
+/* VECTOR LOAD ELEMENT IMMEDIATE */
+ E(0xe740, VLEIB, VRI_a, V, 0, 0, 0, 0, vlei, 0, ES_8, IF_VEC)
+ E(0xe741, VLEIH, VRI_a, V, 0, 0, 0, 0, vlei, 0, ES_16, IF_VEC)
+ E(0xe743, VLEIF, VRI_a, V, 0, 0, 0, 0, vlei, 0, ES_32, IF_VEC)
+ E(0xe742, VLEIG, VRI_a, V, 0, 0, 0, 0, vlei, 0, ES_64, 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 9134324aa8..d450ce2d2b 100644
--- a/target/s390x/translate_vx.inc.c
+++ b/target/s390x/translate_vx.inc.c
@@ -280,3 +280,20 @@ static DisasJumpType op_vle(DisasContext *s, DisasOps *o)
tcg_temp_free_i64(tmp);
return DISAS_NEXT;
}
+
+static DisasJumpType op_vlei(DisasContext *s, DisasOps *o)
+{
+ const uint8_t es = s->insn->data;
+ const uint8_t enr = get_field(s->fields, m3);
+ TCGv_i64 tmp;
+
+ if (!valid_vec_element(enr, es)) {
+ gen_program_exception(s, PGM_SPECIFICATION);
+ return DISAS_NORETURN;
+ }
+
+ tmp = tcg_const_i64((int16_t)get_field(s->fields, i2));
+ write_vec_element_i64(tmp, get_field(s->fields, v1), enr, es);
+ tcg_temp_free_i64(tmp);
+ return DISAS_NEXT;
+}
--
2.17.2
- [Qemu-devel] [PATCH v3 01/32] s390x/tcg: Define vector instruction formats, (continued)
- [Qemu-devel] [PATCH v3 01/32] s390x/tcg: Define vector instruction formats, David Hildenbrand, 2019/03/07
- [Qemu-devel] [PATCH v3 04/32] s390x/tcg: Implement VECTOR GATHER ELEMENT, David Hildenbrand, 2019/03/07
- [Qemu-devel] [PATCH v3 03/32] s390x/tcg: Utilities for vector instruction helpers, David Hildenbrand, 2019/03/07
- [Qemu-devel] [PATCH v3 05/32] s390x/tcg: Implement VECTOR GENERATE BYTE MASK, David Hildenbrand, 2019/03/07
- [Qemu-devel] [PATCH v3 07/32] s390x/tcg: Implement VECTOR LOAD, David Hildenbrand, 2019/03/07
- [Qemu-devel] [PATCH v3 08/32] s390x/tcg: Implement VECTOR LOAD AND REPLICATE, David Hildenbrand, 2019/03/07
- [Qemu-devel] [PATCH v3 09/32] s390x/tcg: Implement VECTOR LOAD ELEMENT, David Hildenbrand, 2019/03/07
- [Qemu-devel] [PATCH v3 06/32] s390x/tcg: Implement VECTOR GENERATE MASK, David Hildenbrand, 2019/03/07
- [Qemu-devel] [PATCH v3 10/32] s390x/tcg: Implement VECTOR LOAD ELEMENT IMMEDIATE,
David Hildenbrand <=
- [Qemu-devel] [PATCH v3 13/32] s390x/tcg: Implement VECTOR LOAD MULTIPLE, David Hildenbrand, 2019/03/07
- [Qemu-devel] [PATCH v3 14/32] s390x/tcg: Implement VECTOR LOAD TO BLOCK BOUNDARY, David Hildenbrand, 2019/03/07
- [Qemu-devel] [PATCH v3 11/32] s390x/tcg: Implement VECTOR LOAD GR FROM VR ELEMENT, David Hildenbrand, 2019/03/07
- [Qemu-devel] [PATCH v3 12/32] s390x/tcg: Implement VECTOR LOAD LOGICAL ELEMENT AND ZERO, David Hildenbrand, 2019/03/07
- [Qemu-devel] [PATCH v3 16/32] s390x/tcg: Implement VECTOR LOAD VR FROM GRS DISJOINT, David Hildenbrand, 2019/03/07
- [Qemu-devel] [PATCH v3 17/32] s390x/tcg: Implement VECTOR LOAD WITH LENGTH, David Hildenbrand, 2019/03/07
- [Qemu-devel] [PATCH v3 15/32] s390x/tcg: Implement VECTOR LOAD VR ELEMENT FROM GR, David Hildenbrand, 2019/03/07
- [Qemu-devel] [PATCH v3 19/32] s390x/tcg: Implement VECTOR PACK *, David Hildenbrand, 2019/03/07
- [Qemu-devel] [PATCH v3 18/32] s390x/tcg: Implement VECTOR MERGE (HIGH|LOW), David Hildenbrand, 2019/03/07
- [Qemu-devel] [PATCH v3 20/32] s390x/tcg: Implement VECTOR PERMUTE, David Hildenbrand, 2019/03/07