Similar to VECTOR LOAD MULTIPLE, just the opposite direction. Signed-off-by: David Hildenbrand <da...@redhat.com> --- target/s390x/insn-data.def | 2 ++ target/s390x/translate_vx.inc.c | 25 +++++++++++++++++++++++++ 2 files changed, 27 insertions(+)
diff --git a/target/s390x/insn-data.def b/target/s390x/insn-data.def index bf9786120b..60e4895f60 100644 --- a/target/s390x/insn-data.def +++ b/target/s390x/insn-data.def @@ -1042,6 +1042,8 @@ E(0xe709, VSTEH, VRX, V, la2, 0, 0, 0, vste, 0, MO_16, IF_VEC) E(0xe70b, VSTEF, VRX, V, la2, 0, 0, 0, vste, 0, MO_32, IF_VEC) E(0xe70a, VSTEG, VRX, V, la2, 0, 0, 0, vste, 0, MO_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 9ec135d1a9..7e7c96c974 100644 --- a/target/s390x/translate_vx.inc.c +++ b/target/s390x/translate_vx.inc.c @@ -804,3 +804,28 @@ 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); + + while (v3 < v1 || (v3 - v1 + 1) > 16) { + gen_program_exception(s, PGM_SPECIFICATION); + return DISAS_NORETURN; + } + + /* + * FIXME: On exceptions we must not modify any memory. + */ + for (;; v1++) { + store_vec_element(s, v1, 0, o->addr1, MO_64); + gen_addi_and_wrap_i64(s, o->addr1, o->addr1, 8); + store_vec_element(s, v1, 1, o->addr1, MO_64); + if (v1 == v3) { + break; + } + gen_addi_and_wrap_i64(s, o->addr1, o->addr1, 8); + } + return DISAS_NEXT; +} -- 2.17.2