[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 14/19] s390x/tcg: Implement MULTIPLY (MG, MGRK)
From: |
Cornelia Huck |
Subject: |
[PULL 14/19] s390x/tcg: Implement MULTIPLY (MG, MGRK) |
Date: |
Fri, 2 Oct 2020 14:11:13 +0200 |
From: David Hildenbrand <david@redhat.com>
Multiply two signed 64bit values and store the 128bit result in r1 (0-63)
and r1 + 1 (64-127).
Signed-off-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20200928122717.30586-5-david@redhat.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
---
target/s390x/insn-data.def | 2 ++
target/s390x/translate.c | 13 +++++++++++++
2 files changed, 15 insertions(+)
diff --git a/target/s390x/insn-data.def b/target/s390x/insn-data.def
index e994d32d96bd..13c4ffdaf5b3 100644
--- a/target/s390x/insn-data.def
+++ b/target/s390x/insn-data.def
@@ -653,8 +653,10 @@
/* MULTIPLY */
C(0x1c00, MR, RR_a, Z, r1p1_32s, r2_32s, new, r1_D32, mul, 0)
+ C(0xb9ec, MGRK, RRF_a, MIE2,r3_o, r2_o, r1_P, 0, muls128, 0)
C(0x5c00, M, RX_a, Z, r1p1_32s, m2_32s, new, r1_D32, mul, 0)
C(0xe35c, MFY, RXY_a, GIE, r1p1_32s, m2_32s, new, r1_D32, mul, 0)
+ C(0xe384, MG, RXY_a, MIE2,r1p1_o, m2_64, r1_P, 0, muls128, 0)
F(0xb317, MEEBR, RRE, Z, e1, e2, new, e1, meeb, 0, IF_BFP)
F(0xb31c, MDBR, RRE, Z, f1, f2, new, f1, mdb, 0, IF_BFP)
F(0xb34c, MXBR, RRE, Z, x2h, x2l, x1, x1, mxb, 0, IF_BFP)
diff --git a/target/s390x/translate.c b/target/s390x/translate.c
index 7ea666b9a7fb..66a3693d128c 100644
--- a/target/s390x/translate.c
+++ b/target/s390x/translate.c
@@ -3539,6 +3539,12 @@ static DisasJumpType op_mul128(DisasContext *s, DisasOps
*o)
return DISAS_NEXT;
}
+static DisasJumpType op_muls128(DisasContext *s, DisasOps *o)
+{
+ tcg_gen_muls2_i64(o->out2, o->out, o->in1, o->in2);
+ return DISAS_NEXT;
+}
+
static DisasJumpType op_meeb(DisasContext *s, DisasOps *o)
{
gen_helper_meeb(o->out, cpu_env, o->in1, o->in2);
@@ -5563,6 +5569,13 @@ static void in1_r1p1(DisasContext *s, DisasOps *o)
}
#define SPEC_in1_r1p1 SPEC_r1_even
+static void in1_r1p1_o(DisasContext *s, DisasOps *o)
+{
+ o->in1 = regs[get_field(s, r1) + 1];
+ o->g_in1 = true;
+}
+#define SPEC_in1_r1p1_o SPEC_r1_even
+
static void in1_r1p1_32s(DisasContext *s, DisasOps *o)
{
o->in1 = tcg_temp_new_i64();
--
2.25.4
- [PULL 07/19] s390/sclp: add extended-length sccb support for kvm guest, (continued)
- [PULL 07/19] s390/sclp: add extended-length sccb support for kvm guest, Cornelia Huck, 2020/10/02
- [PULL 03/19] s390/sclp: rework sclp boundary checks, Cornelia Huck, 2020/10/02
- [PULL 05/19] s390/sclp: check sccb len before filling in data, Cornelia Huck, 2020/10/02
- [PULL 08/19] s390: guest support for diagnose 0x318, Cornelia Huck, 2020/10/02
- [PULL 06/19] s390/sclp: use cpu offset to locate cpu entries, Cornelia Huck, 2020/10/02
- [PULL 09/19] s390x/tcg: Implement MONITOR CALL, Cornelia Huck, 2020/10/02
- [PULL 10/19] vfio-ccw: plug memory leak while getting region info, Cornelia Huck, 2020/10/02
- [PULL 13/19] s390x/tcg: Implement SUBTRACT HALFWORD (SGH), Cornelia Huck, 2020/10/02
- [PULL 11/19] s390x/cpumodel: S390_FEAT_MISC_INSTRUCTION_EXT -> S390_FEAT_MISC_INSTRUCTION_EXT2, Cornelia Huck, 2020/10/02
- [PULL 12/19] s390x/tcg: Implement ADD HALFWORD (AGH), Cornelia Huck, 2020/10/02
- [PULL 14/19] s390x/tcg: Implement MULTIPLY (MG, MGRK),
Cornelia Huck <=
- [PULL 15/19] s390x/tcg: Implement MULTIPLY HALFWORD (MGH), Cornelia Huck, 2020/10/02
- [PULL 16/19] s390x/tcg: Implement BRANCH INDIRECT ON CONDITION (BIC), Cornelia Huck, 2020/10/02
- [PULL 17/19] s390x/tcg: Implement MULTIPLY SINGLE (MSC, MSGC, MSGRKC, MSRKC), Cornelia Huck, 2020/10/02
- [PULL 18/19] s390x/tcg: We support Miscellaneous-Instruction-Extensions Facility 2, Cornelia Huck, 2020/10/02
- [PULL 19/19] s390x/tcg: Implement CIPHER MESSAGE WITH AUTHENTICATION (KMA), Cornelia Huck, 2020/10/02
- Re: [PULL 00/19] s390x changes, Peter Maydell, 2020/10/02