qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: Pavel Zbitskiy <pavel.zbitskiy@gmail.com>, qemu-devel@nongnu.org
Cc: David Hildenbrand <david@redhat.com>,
	qemu-trivial@nongnu.org, Cornelia Huck <cohuck@redhat.com>,
	Alexander Graf <agraf@suse.de>,
	"open list:S390" <qemu-s390x@nongnu.org>,
	Richard Henderson <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH 3/6] target/s390x: fix ipm polluting irrelevant bits
Date: Mon, 6 Aug 2018 08:24:44 -0700	[thread overview]
Message-ID: <15c06ae1-5262-85fe-df70-afd570f7efa7@linaro.org> (raw)
In-Reply-To: <20180805182832.3012-4-pavel.zbitskiy@gmail.com>

On 08/05/2018 11:28 AM, Pavel Zbitskiy wrote:
> +    tcg_gen_andi_i64(t1, psw_mask, 0x00000f0000000000);
> +    tcg_gen_shri_i64(t1, t1, 16);

It would be better to swap these two operations, so that a 64-bit constant
isn't needed for the mask, e.g:

    tcg_gen_shri_i64(t1, psw_mask, 16);
    tcg_gen_andi_i64(t1, t1, 0xf000000);

Or maybe rewrite this whole function with extract/deposit:

    tcg_gen_extract_i64(t1, psw_mask, 40, 4);
    tcg_gen_extu_i32_i64(t2, cc_op);
    tcg_gen_deposit_i64(t1, t1, t2, 4, 60);
    tcg_gen_deposit_i64(o->out, o->out, t1, 24, 8);

But what you have is not wrong so,
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~

  parent reply	other threads:[~2018-08-06 15:24 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-05 18:28 [Qemu-devel] [PATCH 0/6] Some improvements in z/Arch instructions support Pavel Zbitskiy
2018-08-05 18:28 ` [Qemu-devel] [PATCH 1/6] target/s390x: add BAL and BALR instructions Pavel Zbitskiy
2018-08-06 10:49   ` David Hildenbrand
2018-08-05 18:28 ` [Qemu-devel] [PATCH 2/6] target/s390x: fix CSST decoding and runtime alignment check Pavel Zbitskiy
2018-08-06 11:05   ` David Hildenbrand
2018-08-05 18:28 ` [Qemu-devel] [PATCH 3/6] target/s390x: fix ipm polluting irrelevant bits Pavel Zbitskiy
2018-08-06 11:18   ` David Hildenbrand
2018-08-06 15:24   ` Richard Henderson [this message]
2018-08-05 18:28 ` [Qemu-devel] [PATCH 4/6] target/s390x: add EX support for TRT and TRTR Pavel Zbitskiy
2018-08-05 18:28 ` [Qemu-devel] [PATCH 5/6] target/s390x: fix PACK reading 1 byte less and writing 1 byte more Pavel Zbitskiy
2018-08-06 11:34   ` David Hildenbrand
2018-08-07  9:42   ` [Qemu-devel] [qemu-s390x] " Thomas Huth
2018-08-05 18:28 ` [Qemu-devel] [PATCH 6/6] target/s390x: implement CVB, CVBY and CVBG Pavel Zbitskiy
2018-08-06 12:55   ` David Hildenbrand
2018-08-06 15:06 ` [Qemu-devel] [PATCH 0/6] Some improvements in z/Arch instructions support 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=15c06ae1-5262-85fe-df70-afd570f7efa7@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=agraf@suse.de \
    --cc=cohuck@redhat.com \
    --cc=david@redhat.com \
    --cc=pavel.zbitskiy@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=rth@twiddle.net \
    /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).