From: David Hildenbrand <david@redhat.com>
To: qemu-devel@nongnu.org
Cc: qemu-s390x@nongnu.org, Cornelia Huck <cohuck@redhat.com>,
Richard Henderson <richard.henderson@linaro.org>,
Thomas Huth <thuth@redhat.com>,
David Hildenbrand <david@redhat.com>
Subject: [PATCH v2 6/9] s390x/tcg: Implement BRANCH INDIRECT ON CONDITION (BIC)
Date: Mon, 28 Sep 2020 14:27:14 +0200 [thread overview]
Message-ID: <20200928122717.30586-7-david@redhat.com> (raw)
In-Reply-To: <20200928122717.30586-1-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>
---
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 455efe73da..cb40aea9a3 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 f20ebd7c6a..893b1f54a8 100644
--- a/target/s390x/translate.c
+++ b/target/s390x/translate.c
@@ -5935,6 +5935,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.26.2
next prev parent reply other threads:[~2020-09-28 12:37 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-28 12:27 [PATCH v2 0/9] s390x/tcg: Implement some z14 facilities David Hildenbrand
2020-09-28 12:27 ` [PATCH v2 1/9] s390x/cpu_model: S390_FEAT_MISC_INSTRUCTION_EXT -> S390_FEAT_MISC_INSTRUCTION_EXT2 David Hildenbrand
2020-09-28 12:50 ` Christian Borntraeger
2020-09-28 12:55 ` David Hildenbrand
2020-09-28 12:27 ` [PATCH v2 2/9] s390x/tcg: Implement ADD HALFWORD (AGH) David Hildenbrand
2020-09-28 12:27 ` [PATCH v2 3/9] s390x/tcg: Implement SUBTRACT HALFWORD (SGH) David Hildenbrand
2020-09-28 12:27 ` [PATCH v2 4/9] s390x/tcg: Implement MULTIPLY (MG, MGRK) David Hildenbrand
2020-09-28 12:27 ` [PATCH v2 5/9] s390x/tcg: Implement MULTIPLY HALFWORD (MGH) David Hildenbrand
2020-09-28 12:27 ` David Hildenbrand [this message]
2020-10-01 14:53 ` [PATCH v2 6/9] s390x/tcg: Implement BRANCH INDIRECT ON CONDITION (BIC) Richard Henderson
2020-09-28 12:27 ` [PATCH v2 7/9] s390x/tcg: Implement MULTIPLY SINGLE (MSC, MSGC, MSGRKC, MSRKC) David Hildenbrand
2020-10-01 14:54 ` Richard Henderson
2020-09-28 12:27 ` [PATCH v2 8/9] s390x/tcg: We support Miscellaneous-Instruction-Extensions Facility 2 David Hildenbrand
2020-09-28 12:27 ` [PATCH v2 9/9] s390x/tcg: Implement CIPHER MESSAGE WITH AUTHENTICATION (KMA) David Hildenbrand
2020-09-28 13:36 ` [PATCH v2 0/9] s390x/tcg: Implement some z14 facilities no-reply
2020-10-01 7:00 ` Cornelia Huck
2020-10-01 17:02 ` Cornelia Huck
2020-10-01 17:03 ` David Hildenbrand
2020-10-01 17:06 ` Cornelia Huck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200928122717.30586-7-david@redhat.com \
--to=david@redhat.com \
--cc=cohuck@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).