qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: Lijun Pan <ljp@linux.ibm.com>,
	qemu-ppc@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [PATCH 4/6] target/ppc: add vmulh{su}d instructions
Date: Thu, 18 Jun 2020 16:32:09 -0700	[thread overview]
Message-ID: <04e49d12-6bdd-38d9-47e5-13c95284cd2e@linaro.org> (raw)
In-Reply-To: <20200613042029.22321-5-ljp@linux.ibm.com>

On 6/12/20 9:20 PM, Lijun Pan wrote:
> +void helper_vmulhsd(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b)
> +{
> +	int i;
> +	uint64_t h64 = 0;
> +	uint64_t l64 = 0;
> +
> +	for (i = 0; i < 2; i++) {
> +		muls64(&l64, &h64, a->s64[i], b->s64[i]);
> +		r->s64[i] = h64;
> +	}
> +}

Indentation is off.

This can just as easily be written as

    uint64_t discard;

    muls64(&discard, &r->u64[0], a->s64[0], b->s64[0]);
    muls64(&discard, &r->u64[1], a->s64[1], b->s64[1]);

and similarly for helper_vmulhud.


r~


  reply	other threads:[~2020-06-18 23:33 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-13  4:20 [PATCH 0/6] Add several Power ISA 3.1 32/64-bit vector instructions Lijun Pan
2020-06-13  4:20 ` [PATCH 1/6] target/ppc: add byte-reverse br[dwh] instructions Lijun Pan
2020-06-18 23:19   ` Richard Henderson
2020-06-19  5:24     ` Lijun Pan
2020-06-19 21:08       ` Richard Henderson
2020-06-13  4:20 ` [PATCH 2/6] target/ppc: add vmulld instruction Lijun Pan
2020-06-18 23:27   ` Richard Henderson
2020-06-19  5:30     ` Lijun Pan
2020-06-19 21:16       ` Richard Henderson
2020-06-13  4:20 ` [PATCH 3/6] targetc/ppc: add vmulh{su}w instructions Lijun Pan
2020-06-18 23:29   ` Richard Henderson
2020-06-19  5:37     ` Lijun Pan
2020-06-19 21:17       ` Richard Henderson
2020-06-13  4:20 ` [PATCH 4/6] target/ppc: add vmulh{su}d instructions Lijun Pan
2020-06-18 23:32   ` Richard Henderson [this message]
2020-06-13  4:20 ` [PATCH 5/6] fix the prototype of muls64/mulu64 Lijun Pan
2020-06-18 23:46   ` Richard Henderson
2020-06-13  4:20 ` [PATCH 6/6] target/ppc: add vdiv{su}{wd} vmod{su}{wd} instructions Lijun Pan
2020-06-18 23:46   ` Richard Henderson
2020-06-13  4:47 ` [PATCH 0/6] Add several Power ISA 3.1 32/64-bit vector instructions no-reply
2020-06-15  8:49   ` David Gibson
2020-06-15 17:36 ` Cédric Le Goater
2020-06-15 20:54   ` Lijun Pan
2020-06-16  6:00     ` Cédric Le Goater
2020-06-18 23:51 ` Richard Henderson

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=04e49d12-6bdd-38d9-47e5-13c95284cd2e@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=ljp@linux.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /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).