[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 16/19] s390x/tcg: Implement BRANCH INDIRECT ON CONDITION (BIC)
From: |
Cornelia Huck |
Subject: |
[PULL 16/19] s390x/tcg: Implement BRANCH INDIRECT ON CONDITION (BIC) |
Date: |
Fri, 2 Oct 2020 14:11:15 +0200 |
From: David Hildenbrand <david@redhat.com>
Just like BRANCH ON CONDITION - however the address is read from memory
(always 8 bytes are read), we have to wrap the address manually. The
address is read using current CPU DAT/address-space controls, just like
ordinary data.
Signed-off-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20200928122717.30586-7-david@redhat.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
---
target/s390x/insn-data.def | 2 ++
target/s390x/translate.c | 8 ++++++++
2 files changed, 10 insertions(+)
diff --git a/target/s390x/insn-data.def b/target/s390x/insn-data.def
index bf18d8aaf43e..3322e5f2a504 100644
--- a/target/s390x/insn-data.def
+++ b/target/s390x/insn-data.def
@@ -115,6 +115,8 @@
/* BRANCH RELATIVE AND SAVE */
C(0xa705, BRAS, RI_b, Z, 0, 0, r1, 0, basi, 0)
C(0xc005, BRASL, RIL_b, Z, 0, 0, r1, 0, basi, 0)
+/* BRANCH INDIRECT ON CONDITION */
+ C(0xe347, BIC, RXY_b, MIE2,0, m2_64w, 0, 0, bc, 0)
/* BRANCH ON CONDITION */
C(0x0700, BCR, RR_b, Z, 0, r2_nz, 0, 0, bc, 0)
C(0x4700, BC, RX_b, Z, 0, a2, 0, 0, bc, 0)
diff --git a/target/s390x/translate.c b/target/s390x/translate.c
index 66a3693d128c..27fb7af8fb1c 100644
--- a/target/s390x/translate.c
+++ b/target/s390x/translate.c
@@ -5956,6 +5956,14 @@ static void in2_m2_64(DisasContext *s, DisasOps *o)
}
#define SPEC_in2_m2_64 0
+static void in2_m2_64w(DisasContext *s, DisasOps *o)
+{
+ in2_a2(s, o);
+ tcg_gen_qemu_ld64(o->in2, o->in2, get_mem_index(s));
+ gen_addi_and_wrap_i64(s, o->in2, o->in2, 0);
+}
+#define SPEC_in2_m2_64w 0
+
#ifndef CONFIG_USER_ONLY
static void in2_m2_64a(DisasContext *s, DisasOps *o)
{
--
2.25.4
- [PULL 05/19] s390/sclp: check sccb len before filling in data, (continued)
- [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, 2020/10/02
- [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 <=
- [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