From: David Hildenbrand <david@redhat.com>
To: Richard Henderson <richard.henderson@linaro.org>, qemu-devel@nongnu.org
Cc: qemu-s390x@nongnu.org, Cornelia Huck <cohuck@redhat.com>,
Thomas Huth <thuth@redhat.com>
Subject: Re: [PATCH v1 5/8] s390x/tcg: Implement BRANCH INDIRECT ON CONDITION (BIC)
Date: Mon, 28 Sep 2020 13:50:47 +0200 [thread overview]
Message-ID: <07264f80-a729-8fd9-658c-23b69dbf86ac@redhat.com> (raw)
In-Reply-To: <06b8deaa-75c3-b95c-398b-8dac0efc6718@linaro.org>
On 25.09.20 23:45, Richard Henderson wrote:
> On 9/22/20 3:31 AM, David Hildenbrand wrote:
>> +/* BRANCH INDIRECT ON CONDITION */
>> + C(0xe347, BIC, RXY_b, MIE2,0, m2_64, 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 b536491892..383edf7419 100644
>> --- a/target/s390x/translate.c
>> +++ b/target/s390x/translate.c
>> @@ -1626,6 +1626,11 @@ static DisasJumpType op_bc(DisasContext *s, DisasOps *o)
>> return DISAS_NEXT;
>> }
>>
>> + /* For BIC the address came from memory, we need to wrap it again. */
>> + if (s->fields.op2 == 0x47) {
>> + gen_addi_and_wrap_i64(s, o->in2, o->in2, 0);
>> + }
>
> I'm not keen on this sort of per-opcode checks.
>
> I'd prefer to add an in2_m2_64w() helper that performs the load and then wraps.
Makes sense, thanks!
--
Thanks,
David / dhildenb
next prev parent reply other threads:[~2020-09-28 11:54 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-22 10:31 [PATCH v1 0/8] s390x/tcg: Implement some z14 facilities David Hildenbrand
2020-09-22 10:31 ` [PATCH v1 1/8] s390x/tcg: Implement ADD HALFWORD (AGH) David Hildenbrand
2020-09-23 4:49 ` Thomas Huth
2020-09-23 4:53 ` Thomas Huth
2020-09-23 7:50 ` David Hildenbrand
2020-09-25 21:25 ` Richard Henderson
2020-09-22 10:31 ` [PATCH v1 2/8] s390x/tcg: Implement SUBTRACT HALFWORD (SGH) David Hildenbrand
2020-09-23 4:52 ` Thomas Huth
2020-09-25 21:25 ` Richard Henderson
2020-09-22 10:31 ` [PATCH v1 3/8] s390x/tcg: Implement MULTIPLY (MG, MGRK) David Hildenbrand
2020-09-25 21:36 ` Richard Henderson
2020-09-22 10:31 ` [PATCH v1 4/8] s390x/tcg: Implement MULTIPLY HALFWORD (MGH) David Hildenbrand
2020-09-25 21:39 ` Richard Henderson
2020-09-22 10:31 ` [PATCH v1 5/8] s390x/tcg: Implement BRANCH INDIRECT ON CONDITION (BIC) David Hildenbrand
2020-09-25 21:45 ` Richard Henderson
2020-09-28 11:50 ` David Hildenbrand [this message]
2020-09-22 10:31 ` [PATCH v1 6/8] s390x/tcg: Implement MULTIPLY SINGLE (MSC, MSGC, MSGRKC, MSRKC) David Hildenbrand
2020-09-22 16:14 ` Richard Henderson
2020-09-22 16:19 ` David Hildenbrand
2020-09-25 22:06 ` Richard Henderson
2020-09-28 12:13 ` David Hildenbrand
2020-09-22 10:31 ` [PATCH v1 7/8] s390x/tcg: We support Miscellaneous-Instruction-Extensions Facility 2 David Hildenbrand
2020-09-25 22:08 ` Richard Henderson
2020-09-22 10:31 ` [PATCH v1 8/8] s390x/tcg: Implement CIPHER MESSAGE WITH AUTHENTICATION (KMA) David Hildenbrand
2020-09-25 22:12 ` Richard Henderson
2020-09-22 15:41 ` [PATCH v1 0/8] s390x/tcg: Implement some z14 facilities no-reply
2020-09-25 22:43 ` Richard Henderson
2020-09-28 11:54 ` David Hildenbrand
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=07264f80-a729-8fd9-658c-23b69dbf86ac@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).